ASM
ifndef __18F2221
error "Wrong Processor Type"
endif
ENDASM
DEFINE OSC 32
DEFINE NO_CLRWDT 1
DEFINE HSER_RCSTA 90H
DEFINE HSER_TXSTA 24H
DEFINE HSER_CLROERR 1
DEFINE LOADER_USED 1 ' Tell compiler to relocate code for bootloader
Define USE_LFSR 1
TRISA = %11111111
TRISB = %11111110
TRISC = %10111111
ADCON1 = $FF ' Start as all digital
CMCON = %00000111 ' No Comparator used, turn it off
ADCON2 = %10000110 ' Right Justify, /64
OSCTUNE =%01000000 ' bit 6 to turn on the PLL
OSCCON = %01110000 ' %11110000
TopLoop:
Toggle PORTB.0
PAUSE 10
GOTO TopLoop
Bookmarks