How to send one bit at a time
QAH
Posts: 13
Hello all! I am using the Basic Stamp 2 homework board and I would like to know, how can I output 1 bit at a time of a 16 bit word variable? I know how to use SHIFTOUT, but that sends all of the data. I need to send data, wait for an input pulse and if it gets it, send another bit. Can this be done? If so, how?
Thanks
Thanks
Comments
Let's say you have your I/O pin defined as "SIGNAL PIN 6". You can have a FOR / NEXT loop that does "SIGNAL = FOO.BIT(i)" then waits for your input pulse before going on to the next bit.
·Actually you get "Expected a variable modifier"· using FOO.BIT(I) -·you need to reference FOO.BIT0(i) or .... BIT15(i)
Post Edited (ronczap) : 7/16/2009 12:50:57 AM GMT
Look at the BASIC Stamp Syntax and Reference Manual, pages 85-91.
Thanks