Quote:
Originally Posted by biojae
is it possible to bitbang the io pins on the ds fast enough for ttl level serial?
we are building a touchscreen inteface to the driver station for autonomous mode, with liquidware's touchshield slide. if we could use the io pins then that could free up a lot of programming time
|
Theoretically, yes, you could use the digital inputs as a TTL serial line, as they run at 5 volts. However, you will only get you 50 baud, as the DS updates at 50 Hz (
source). Using parallel inputs will get you 50 * 12 inputs = 600 baud (assuming you repurpose the analog inputs as digital). Either way, you will probably have to establish some sort of flow control using one of the digital outputs, flipping it each time an update is sent to the DS by the cRIO. Even with this, however, you still stand a pretty good chance of data corruption because there's no reliable way to know when the DS's inputs are being sampled in relation to when the outputs are refreshed, the actual data is sent to the cRIO, or any other step in that process, so to be safe you would have to hold the data values across two transmission cycles, halving your data rate.
So in short, while it is possible, I believe you would be better off mapping the analog and digital inputs to the controls exposed on the touch screen, perhaps using digital potentiometers to output analog values if necessary. What kind of interface are you trying to develop on the touchscreen?
--Ryan
__________________
FRC 2046, 2007-2008, Student member
FRC 1708, 2009-2012, College mentor; 2013-2014, Mentor
FRC 766, 2015-, Mentor