PDA

View Full Version : Shiftout



moby
- 13th August 2004, 09:59
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?

Bruce
- 14th August 2004, 19:55
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?

moby
- 15th August 2004, 11:17
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.

Dave
- 15th August 2004, 13:12
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,

moby
- 16th August 2004, 12:50
Hi Dave

Thanks for that. I will give it a go.
So you think that the byte length need to be defined?

moby
- 17th August 2004, 17:54
Dave

Just to let you know that worked fine. Thanks.

Dave
- 17th August 2004, 21:19
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,