SHIFTOUT with inverted clock ?
Bean
Posts: 8,129
Is there any way to do SHIFTOUT with the clock inverted ?
I have a device that the clock pin MUST be normally held high, and clocks in data on the rising edge.
When the SHIFTOUT instruction is done the clock is left low, I must make the clock pin HIGH for the device to latch-in the new data. When I do this (make the clock pin high) the device shifts in an extra zero.
What I'm doing now is to only shift in 7 bits on the last byte of data, then set the data pin the last bit, then raise the clock line. Is there any other way ?
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"SX-Video·Module"·available from Parallax for only $28.95 http://www.parallax.com/detail.asp?product_id=30012
"SX-Video OSD module"·available from Parallax for only·$49.95 http://www.parallax.com/detail.asp?product_id=30015
Product web site: www.sxvm.com
Coming soon... Cheap 4-digit LED display with driver IC·www.hc4led.com
"Sometimes it is better to remain silent and be thought a fool, than to speak and remove all doubt."
·
I have a device that the clock pin MUST be normally held high, and clocks in data on the rising edge.
When the SHIFTOUT instruction is done the clock is left low, I must make the clock pin HIGH for the device to latch-in the new data. When I do this (make the clock pin high) the device shifts in an extra zero.
What I'm doing now is to only shift in 7 bits on the last byte of data, then set the data pin the last bit, then raise the clock line. Is there any other way ?
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"SX-Video·Module"·available from Parallax for only $28.95 http://www.parallax.com/detail.asp?product_id=30012
"SX-Video OSD module"·available from Parallax for only·$49.95 http://www.parallax.com/detail.asp?product_id=30015
Product web site: www.sxvm.com
Coming soon... Cheap 4-digit LED display with driver IC·www.hc4led.com
"Sometimes it is better to remain silent and be thought a fool, than to speak and remove all doubt."
·
Comments
Get_Byte:
· FOR idx =·0 TO·7
··· PULSOUT ClkPin, 5
··· temp.LOWBIT(idx) = DataPin
· NEXT
This assumes that the clock pin has been initialized high.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
I ended up doing this:
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"SX-Video·Module"·available from Parallax for only $28.95 http://www.parallax.com/detail.asp?product_id=30012
"SX-Video OSD module"·available from Parallax for only·$49.95 http://www.parallax.com/detail.asp?product_id=30015
Product web site: www.sxvm.com
Coming soon... Cheap 4-digit LED display with driver IC·www.hc4led.com
"Sometimes it is better to remain silent and be thought a fool, than to speak and remove all doubt."
·