Programing BS2p
Lee Sadeli
Posts: 29
Hi,
I am trying to write a BS2p software to read data from a synch serial input from an 8-bit register 74LS166A, but it can't really·work. Any one can help, plz.
The problem is at CLK INH that requires 2 high pulse during reading·the 1st and 2nd bit of the 8 bit data.
Many thanks
I am trying to write a BS2p software to read data from a synch serial input from an 8-bit register 74LS166A, but it can't really·work. Any one can help, plz.
The problem is at CLK INH that requires 2 high pulse during reading·the 1st and 2nd bit of the 8 bit data.
Many thanks
Comments
1. Tie the Clock Inhibit (CLK INH) line low, and the CLR line high -- you don't need to control these lines
2. (with the BASIC Stamp) pull the SH/LD line low, then do a PUSLOUT on the clock line -- this will load the parallel inputs
3. Use SHIFTIN to grab the data
Sorry, I don't have a 74LS166A -- otherwise I'd write a snippet of code for you.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
Seems like·the prob.·is more complicated,
CLK INH=hi activate LOAD and·READ
of FIRST, whereas to read·2 - 8 bit need CLK INH to be low and reading start at next leading edge of CLK.
Maybe I may need two SHIFTIN, 1st to read 1st Bit at setting CLK INH hi, then 2nd SHIFTIN to read 2-8 bit by sending PULSOUT and setting CLK INH low
Attached is the pulse diagram for 74LS166A.·Thanks again
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
Post Edited (Jon Williams) : 8/7/2004 11:29:30 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office