I also had problems with this and I used a 16f876 with a bildin usart.
now i use an other instuction and never had any problems with the uart anymore.
here is an example: 2400 baud
DEFINE OSC 4
DEFINE SER2_BITS 8
TRISC = %10010000
pinin VAR PORTC.7
pinout VAR PORTC.6
B1 var byte
for taking data in I use:
SerIn2 pinin,396,[B1]
The data will be put in B1
sending data to device
SerOut2 pinout,396,[B1]
succes
Bookmarks