Equip your Genius
Welcome to the Parallax Discussion Forums, sign-up to participate.
Learn with BlocklyProp
Fast Full-Duplex Serial, 1 Cog - a.k.a. FFDS1
2013-06-06 - 09:31:30
edited 2013-06-06 - 09:31:30
In the FFDS1 test harness I run multiple instances of the driver, 1 to talk to the PC and 2 more to talk to each other and validate data-flow. In that particular case it is undesirable to for the RX pin to be an input for all cogs, since I am driving it from another cog. There may be other usage scenarios where having the RX pin be an output is beneficial (serial snooping / logging of a different serial driver?). And at the point where you need another parameter to specify if the RX pin should be forced to be an input, you might as well just set the DIRA bit before initializing FFDS1. I should probably add a big note to the comments that I do not enforce RX being an input...would that suffice?