How would I go about configuring the 18f4685 so I can use the pins as simple I/O ports along with the serial communication pins 25 and 26? I have this configuration so far but it doesn't seem to work.
The program I'm using was previously written on the 16f887, and the program work fine on that chip, so I'm assuming the 18f4685 isn't configured properly. The datasheet for the 18f4685 is below. Thanks for the help.Code:define device 18f4685 OSCTUNE = %11000000 OSCCON = %01110000 define OSC 8 CMCON = 0 ADCON0 = 7 ADCON1 = 7 ADRESH = 7 ADRESL = 7 INTCON = 0 INTCON2 = 0 INTCON3 = 0 IPR1 = 0 PIR1 = 0 PIE1 = 0 DEFINE HSER_RCSTA 90h ' Enable Serial PORT DEFINE HSER_TXSTA 24h ' Enable transmit DEFINE HSER_SPBRG 129 ' set USART to 9600 baud (when BRGH=1) DEFINE HSER_CLROERR 1 ' Enable automatic overrun error DEFINE LOADER_USED 1
http://ww1.microchip.com/downloads/e...doc/39761b.pdf





Bookmarks