According to the datasheet......
ADCON1 = 7 ' Set all pins to digital , then use TRIS to set input or output
As for serial output. Look at the manual for serout commands, this should get you what you need.
According to the datasheet......
ADCON1 = 7 ' Set all pins to digital , then use TRIS to set input or output
As for serial output. Look at the manual for serout commands, this should get you what you need.
Hello Kitcat,
On the 16F872 only Port A pins are analog or digital. The ADCON1=7 command sets PortA to all digital. If you are looking for serial operation, any pin on the chip can be used as a serial I/O pin. If you intend to use a hardware serial setup with a RS232 level shifter then you want to use RC.6 for Tx and RC.7 for Rx. I don't mean to sound like a broken record but you should go to microchip.com and download the datasheet on the 16F872 to get all the info you will need to work with this uP.
BobK
Bookmarks