Hello I have still some problems with my serial interface on the Infineon C167 controller. The original function putchar or printf won't work. I have used some hints : S0CON = 0x0011; S0BG = 0x40; /* SET BAUDRATE TO 9600 BAUD */ P3 |= 0x0400; /* SET PORT 3.10 OUTPUT LATCH (TXD) */ DP3 |= 0x0405; /* SET PORT 3.10 DIRECTION CONTROL (TXD OUTPUT) */ DP3 &= 0xF7FF; /* RESET PORT 3.11 DIRECTION CONTROL (RXD INPUT)*/ S0TBIR = 1; S0TIC = 0x80; S0RIC = 0; S0EIC = 0; S0R = 1; S0TBIR = 0; S0TIR = 0; S0TBUF = 0x31; while ( S0TIR == 0 ) { } /* S0TBIR = 0; S0TIR = 0; S0TBUF = 0x32; while ( S0TIR == 0 ) { } */ ----------------------------------------------------- If I try it for one time (code above) it worked! But not, if I try it a second time. Have someone a idea, why? Dietmar Sierk Germany
"You mean it sends the first byte but doesn't send the second one? " Exact. Ich have built in a little delay between the firs and second one, now it works .. unfortunately , I don't know why... Many thanks, Dietmar
"Ich have built in a little delay between the firs and second one, now it works" Yes, that sounds like the problem lies at the receiver - it just isn't fast enough to receive characters head-to-tail. Did you do the 'scope test to see whether it was a receiver or transmitter problem?