I continue where I left off ...
This is code:
Use this or notCode:define OSC 4 OSCCON=%01010110 DEFINE HSER_CLROERR 1 'Hser clear overflow automatically ' SPBRG = 25 ' 9600 Baud @ 4MHz, 0.16% ' TXSTA = $24 ' Enable transmit, BRGH = 1 ' RCSTA = $90 ' Enable serial port & continuous receive DEFINE HSER_BAUD 9600 'Set Baud rate to 9600bps DEFINE HSER_BITS 9 'Set to 9 bit mode DEFINE HSER_EVEN 1 'Set Even Parity TRISB.7 = 0 'Make Tx output TRISB.5 = 1 'Make Rx input main: pause 1000 HSerOut ["Parity:)"] goto main
Always get a 9600, N, 1. PIC never send parity bit.Code:DEFINE HSER_BITS 9 'Set to 9 bit mode DEFINE HSER_EVEN 1 'Set Even Parity
I'm banging head all day, but I can't catch what I missed.




Bookmarks