Try with max232 and mode T9600.
Also check if pin 2 is an input... If you use same cable as for PC port, then your Tx should be same as on PC, pin 3.
If you trying to send data to PC, then you should connect portb.0 to PC pin 2...
Try with max232 and mode T9600.
Also check if pin 2 is an input... If you use same cable as for PC port, then your Tx should be same as on PC, pin 3.
If you trying to send data to PC, then you should connect portb.0 to PC pin 2...
Read about CCP1CON, section 9 of the data sheet. Turn it off.
9600 baud can be too fast for 4MHz.
For testing try sending a string to a terminal. MCS has one built in.
Use SEROUT2 with an inverted mode less than 9600. No MAX232 required for this test.
Dave
Always wear safety glasses while programming.
it's been said countless time here (and probably the manual state it too) SEROUT/SEROUT2 @ 9600 bauds & @ 4mhz aren't going to work accurately.. worst when using an old PIC model AND it's internal OSC.
Your best bet it at least to use the internal USART (with the according dedicated pins & hardware + DEFINEs) OR worst case use DEBUG.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks