FullDuplexSerial mode explanation
Rsadeika
Posts: 3,837
I need somebody to explain to me what does the different mode designations do for me, or for that matter what does it mean.
mode bit 0 = invert rx
mode bit 1 = invert tx
mode bit 2 = open-drain/source tx
mode bit 3 = ignore tx echo on rx
In the PE Kit lab, objects, in the example where it shows you how to work with HyperTerminal it uses Debug.start(31, 30, 0, 57600). The example uses 0 as the mode designation, and everything works as expected. What would I expect to happen if I changed the mode to a 1,2, or 3.
I decided to set up a comm port on my PE kit using three wires, Rx,Tx, and grnd. I am going to use 220 Ohm·resistors on the Rx, and Tx lines. This will be connecting up to Rx, and Tx pins on the other 5V based board. Now the question is, which mode setting would I use and why. And of course I will be using the FullDuplexSerial.spin program to get the two boards to talk to each other.
Thanks
Ray
mode bit 0 = invert rx
mode bit 1 = invert tx
mode bit 2 = open-drain/source tx
mode bit 3 = ignore tx echo on rx
In the PE Kit lab, objects, in the example where it shows you how to work with HyperTerminal it uses Debug.start(31, 30, 0, 57600). The example uses 0 as the mode designation, and everything works as expected. What would I expect to happen if I changed the mode to a 1,2, or 3.
I decided to set up a comm port on my PE kit using three wires, Rx,Tx, and grnd. I am going to use 220 Ohm·resistors on the Rx, and Tx lines. This will be connecting up to Rx, and Tx pins on the other 5V based board. Now the question is, which mode setting would I use and why. And of course I will be using the FullDuplexSerial.spin program to get the two boards to talk to each other.
Thanks
Ray
Comments
The default mode setting is zero. In your case, this will probably work fine. It depends on the other board.
The only other question that I have is, in the string command, 0 is not an allowed value, only the 1-255 values are allowed. I tried sending 0 value via byte, but my iRobot Create does not like that, it likes the values to be sent via string, or at least most of the values.·Any insight as to why that may be. As I am typing this, it just came to me, I wonder if the string function uses 0 to terminate the the actual string values.
Thanks