Half and Full Duplex (RS232)
Does anyone know what is the protocol format (Half and Full Duplex (RS232) ) of the C function call, fdserial_rxChar and fdserial_txChar , as well as serial_rxChar and serial_txChar? I use baudrate, 9600 and 8-N-1. But the serial terminal (virtual terminal) like TeraTerm shows very crazy characters with the “Hello, RS232”, message in the tutorial. The receiving side couldn't show any characters. I can use two Propeller chips to talk to each other by using those c functions, but not a standard virtual terminal. Any helps are most welcome. Thanks.
Comments
First things to check would be that the tx and rx are wired the right way around, and that the serial port configuration call "fdserial_open" has the correct mode set (the 3rd param I think ?).
The required mode can vary, depending on what device you are connecting to.
Here is some sample code to loop back data from two other pins back to the console.
Mike
Thank you very much VonSzarvas and iseries. Here was the test results I had yesterday. By define: fdserial_open(-1, 21, 0, 9600), the input character '1' (0011 0001), then the terminal shows 'g' (0110 0111); input '2' (0011 0010) shows '3' (0011 0011); input '3' shows 'f'; input '4', didn't show anything; input '5', shows 'e' . . . . . .
By choosing Mode = 1, the same results as Mode = 0.
Good news are that this morning, following VonSzarvas' idea, I made a brave try: set Mode = 2. Than it works great. I don't know the logic because it doesn't follow the description in the fdserial.h. But I will try fdserial_rxChar to see whether it also work as fdwerial_txChar. I will report back my luck.
Again, thank both of you very much.