rs232 data end character
Hi,
i made my serial cable and i saw the first lines that my PIC was printing
=> how beatiful :flasingsmile:
i then added longer text messages and i saw that my PIC had big problems to send them ... at the other end of the rs232 connection these sentences can relly be called corrupt... the lines were never complete and at the end they had wrong characters. I am using CCS PCW C Compiler and i changed my rs232 definition line from:
#use rs232(baud=9600,parity=N,xmit=PIN_C6,rcv=PIN_C7,bits=8 )
to:
#use rs232(baud=9600,parity=N,xmit=PIN_C6,rcv=PIN_C7,bits=8,BRGH1OK)
They say that BRGH1OK is there to get pics with baudrate problems to work. After adding that i could send long lines also, But when i wrote this little program:
Code:
while(1){
c = getc();
printf("%c",c);
}
and i press a character on my keyboard and don't release it, every about then characters it send a wrong character back. That looks like that:
Code:
dddddddddddddddddddddddddddddddddddûþ²ÿÿôddüdddddddddddddddddddddddddddddddddddd
ddddddddddddddddddddddddddddddÿüäöôdddäddddddddödddÿdddddddd
What could that be?
My Configuration:
PIC16F876-20/IP
running with 20 Mhz.
I don't know how to get out of that deep valley with so cliffy walls 8)
Thanks in advance
webtype