I see posts for setting the direction of all digital IO to in or
out, but I can't find a post that explains how to set one to out and
one to in. Also, can that digital output be individually set to
high?
My application runs within Excel's visual basic editor.
I have the following instructions:
UltimaSerial.SetDIODir 0 turns all DIO to outputs
UltimaSerial.SetDIODir &HFF turns all DIO to inputs
UltimaSerial.DigitalOutput &HFF turns all available outputs to high
UltimaSerial.DigitalOutput 0 turns all available outputs to low
For DIO 2, would the &HFF be &H2F for each of the above? Do we set
all to outputs then set the inputs individually?
ie:
UltimaSerial.SetDIODir 0
UltimaSerial.SetDIODir &H0F
UltimaSerial.SetDIODir &H1F
UltimaSerial.SetDIODir &H3F
UltimaSerial.DigitalOutput &HFF
I'm thinking the above sets all to out; then 0,1,3 to in; then since
only 2 is left as out, setting all to high indexes only 2 to high.
Will UltimaSerial.DigitalOutput &H2F set only 2 to high? Any
thoughts?
Paul