carlynorama

the blog

Questions about the latch pin…

by Carlyn Maw on July 31, 2009, no comments

So the way I have the inputs now is:

    * S  (PWM for fading, etc) to Arduino PWM/DigitalPin 10 (yellow wire)
    * D  (Data Pin) to Ardunio DigitalPin 3 (white wire)
    * C  (Clock Pin) to to Ardunio DigitalPin 4 (green wire)
    * L  (Latch Pin) to Ardunio DigitalPin 8 (blue wire)

So I am still concerned this morning about the latch pin being tied to 5 volts.  Why this matters: As John mentions, this is a SPI chip. The wikipedia article on SPI is pretty good. So is this one on embedded.com. I talk about it in the ShiftOut tutorial on the Arduino site.  It basically means that in this system the Arduino sets the pace of the conversation by changing the clock pin for each bit and the latch pin for each phrase. A latch pin held high in this case may just mean there is no ability to stop the flow of information out and you end up with a situation like a TV or a computer screen with a constant refresh. This requires the microcontroller to loop the same information over and over to get what appears to be a static image.   When you have a working latch pin the “slave” chips can just hold on to the information until they get the new data.  Or it may mean I get a fuzzy pale color no matter what I do as the lights show everything that is going through them at once faster than the eye can see…

So to test things the first thing I did was comment out the calls to the libraries .latch subroutine in Xander’s Arduino code and got identical behavior with out it.  Uh oh.  It does look way more pale and fuzzy that X.H.’s example doesn’t it?

And also – my 13th LED just is out.

I’ve got some other stuff to do before I fix this, but I’ll be back.