View Full Version : "Simultaneous" I/O

Jim Bock
08-05-2005, 12:46 AM
I have a TLC2543 11-channel A/D converter that I'd like to use with a BS2, but the TLC inputs instructions and outputs data on the same clock tick. Is there any way to get the BS2 to accommodate this using PBASIC?

Tracy Allen
08-05-2005, 01:12 AM
emesys.com/OL2tlc2543.htm (http://emesys.com/OL2tlc2543.htm)

Tracy Allen
www.emesystems.com (http://www.emesystems.com)

08-05-2005, 01:30 AM
Darn, Tracy, you're good.

Jim Bock
08-05-2005, 04:49 AM
Thanks, Tracy. Of course! They don't need to be simultaneous!! Duh

nick bernard
08-06-2005, 04:36 AM
some time ago i wrote a routine that shifted in and out on the same clock at the same time. it was slow compared to shiftin and shiftout commands. its probably a better solution for the sx.

off the top of my head...

for idx = 0 to 7
out_pin = out_byte.bit0
out_byte = ou_bytet/2
in_byte = in_byte*2
in_byte.bit0 = in_pin
high clock
low clock

If I lived back in the wild west days, instead of carrying a six-gun in my holster, I'd carry a soldering iron. That way, if some smart-aleck cowboy said something like "Hey, look. He's carrying a soldering iron!" and started laughing, and everybody else started laughing, I could just say, "That's right, it's a soldering iron. The soldering iron of justice." Then everybody would get real quiet and ashamed, because they had made fun of the soldering iron of justice, and I could probably hit them up for a free drink. - Jack Handy