True mode serial has a high idle state, a low start bit, data bits match (sent LSB first), and a high stop bit.
From your code:
FTD.start(11, 10, %0000, 9600)
The 3rd parameter designates the mode:
'' Start serial driver (uses a cog, returns 1 to 8 if successful)
'' -- rxp.... receive pin (0..31)
'' -- txp.... transmit pin (0..31)
'' -- mode... %xxx1 = invert rx
'' %xx1x = invert tx
'' %x1xx = open-drain/open-source tx
'' %1xxx = ignore tx echo on rx (for half-duplex on one pin)
(These comments are from jm_fullduplexserial.spin which is a small modification of the original fullduplexserial.spin from Chip)
With a mode parameter of %0000 you not going to invert either pin, and you're not counting on a pull-up to generate a "1" on the line. That said, sometimes we'll still put a pull-up on RX so that a disconnection doesn't case false RX bits.
@JonnyMac said:
With a mode parameter of %0000 you not going to invert either pin, and you're not counting on a pull-up to generate a "1" on the line. That said, sometimes we'll still put a pull-up on RX so that a disconnection doesn't case false RX bits.
Since the normal idle state is high, a pull-up will make a disconnection appear just like an idle line. So isn't a pull-down on RX more correct because it will make a physical break condition appear as a BREAK condition?
Since the normal idle state is high, a pull-up will make a disconnection appear just like an idle line. So isn't a pull-down on RX more correct because it will make a physical break condition appear as a BREAK condition?
Only if your serial driver can handle the break condition. I've not seen a version of FDS that does.
I would assume that if I use on the hand box that I should also use on the mount side even though every thing is half duplex serial. also I don't need any pull ups on the tx pins, but still I should use on the rx pins.
Comments
what is true mode serial?
True mode serial has a high idle state, a low start bit, data bits match (sent LSB first), and a high stop bit.
From your code:
The 3rd parameter designates the mode:
(These comments are from jm_fullduplexserial.spin which is a small modification of the original fullduplexserial.spin from Chip)
With a mode parameter of %0000 you not going to invert either pin, and you're not counting on a pull-up to generate a "1" on the line. That said, sometimes we'll still put a pull-up on RX so that a disconnection doesn't case false RX bits.
Since the normal idle state is high, a pull-up will make a disconnection appear just like an idle line. So isn't a pull-down on RX more correct because it will make a physical break condition appear as a BREAK condition?
Only if your serial driver can handle the break condition. I've not seen a version of FDS that does.
I would assume that if I use on the hand box that I should also use on the mount side even though every thing is half duplex serial. also I don't need any pull ups on the tx pins, but still I should use on the rx pins.
Your setup never sends data from mount to handbox. You could cut that line.