News:

PROTON pic BASIC Compilers for PIC, PIC24, dsPIC33

Main Menu

PIC18F886 OR PIC16F887 CONFIGURATION

Started by Oskar-svr, Nov 10, 2021, 03:30 PM

Previous topic - Next topic

Oskar-svr

HELLO FRIENDS GREETINGS TO ALL
WITH THIS CONFIGURATION YOU WILL BE ABLE TO ACTIVATE OR DEACTIVATE SOME OF THE RECORDS THAT YOU REQUIRE
ESPECIALLY I USE IT FOR THE INTERNAL 8 MHZ CLOCK I HOPE IT WILL BE HELPFUL

'***************************************************************************************************
'***************************************************************************************************         
Device 16F886                                              ' CARPETA SEP 2015  =CONTROL DE PWM
'***************************************************************************************************
'***************************************************************************************************
@__idlocs 0x00302
            OSCCON = %01110111                  'osc set at 8MHz
            Declare Xtal=8

            Asm
            CONFIG_REQ
            __CONFIG _CONFIG1, INTRC_OSC_CLKOUT & WDT_OFF & DEBUG_OFF & FCMEN_OFF & IESO_OFF & BOR_OFF & LVP_OFF & CPD_OFF & CP_On & MCLRE_On & PWRTE_OFF
            __CONFIG _CONFIG2, WRT_OFF & BOR21V
            EndAsm

            ANSEL=%00000000                        'all analog ports to digital
            ANSELH=%00000000                    'all analog ports to digital
            ADCON0.0=0                                  'disable ADC
            CM1CON0=%00000000                'disable COMPARATOR 1
            CM2CON0=%00000000                'disable COMPARATOR 2
            SSPCON=%00000000                    'disable SERIAL PORT
            RCSTA=%00000000                        'disable SERIAL PORT
            PCON=%00000000                        'disable BOR and ULPW
            OPTION_REG=%00000000              ' ENABLE BIT 7 INTERNAL PULLUPS
            WPUB=%00000111                        'disable INDIVIDUAL PULLUPS
            IOCB=%00000000                          'disable INTERRUPT ON CHANGE
            CCP1CON=%00000000                  'disable ECCP1
            CCP2CON=%00000000                  'disable ECCP1
            PSTRCON=%00000000                  'disable PULSE STEERING MODE
            T1CON=%00000000                      'disable TIMER1
            WPUB.7=0                                      'ENABLE PULL UP
            OSCTUNE  =%00001111
'***************************************************************************************************
'**************************************************************************************************

Dompie

Perhaps you can switch your CapsLock off, your text is very difficult to read in only uppercase and I also experience that as a kind of screaming.