-
Shiftout
I have two Allegro UCN5841 serial input latched drivers cascaded and I am trying to load them with two 8 bit bytes of data. The cammand line I am using is:
Shiftout datapin,clockpin,4,[byte0,byte1]
The problem is that byte0 gets to the first 5841 and that's all.
To load two bytes I have to send them seperately with two seperate shiftout commands.
Anyone any idea what I'm doing wrong?
-
Have you tried using shiftout mode 0 so the clock pin idles low?
Are you using the serial out pin on the 1st IC to serial in on the 2nd IC and sharing the clock pin?
How are you controlling both strobe & enable pins on both ICs?
-
Hi Bruce
Changing Mode seems to have no effect. In fact tech at Allegro suggested that the clock idling high would be better.
Yes, serial out to serial in and common clock.
Both enable pins are kept low. The strobes start low and are made high 1mS after the two data bytes have been shifted in, held for 1mS and then made low again.
-
Moby, Hello, I use the UCN5841A's all the time and use the statement as such:
SHIFTOUT OUTDAT,IOCLOCK, MSBFIRST,[INDATA(3)\8,INDATA(2)\8,INDATA(1)\8,INDATA(0)\8]
PULSOUT STROBE,PULSE 'STROBE UCN5842A FOR ~10uS.
This sequence shifts out 4 bytes.
HTH
Dave Purola,
-
Hi Dave
Thanks for that. I will give it a go.
So you think that the byte length need to be defined?
-
Dave
Just to let you know that worked fine. Thanks.
-
Moby, I have always used the bit count variable and never the default. I have used all bit counts between 8 and 16 for diferent hardware configurations. Glad I could help. Good luck.....
Dave Purola,