Serial Clock out
Crux
Posts: 74
Hi guys,
········· Is it possible to output a seria clock from any pins of the BS2?
If it is how would I do that?I am planning to interface it with a 2 Digit
7 Segment driver IC, MAX6979. You could check it out to see the
scenario bec. I am not sure if a serial clock or a seperate oscillator
will the the job.
·
········· Is it possible to output a seria clock from any pins of the BS2?
If it is how would I do that?I am planning to interface it with a 2 Digit
7 Segment driver IC, MAX6979. You could check it out to see the
scenario bec. I am not sure if a serial clock or a seperate oscillator
will the the job.
·
Comments
Depending on the chip you are using, you will use a third pin as either a "latch" or an "enable" line. Some serial chips like a PULSOUT on the latch line to use whatever data you shiftin to the chip, some chips require you to a bring an enable line low or high, THEN shift data to the chip, THEN change the enable line back.
I checked out the datasheet for the MAX6979 briefly -- it looks like this chip latches, so in pseudo code it would go something like this:
setup 16 bits of data to shiftout to the LED driver
SHIFTOUT 16 bits of data on predefined data and clock pins
PULSOUT a short pulse on the latch pin to the MAX6979 to dump the above data into the actual LED outputs
Check out this doc: www.parallax.com/dl/docs/prod/appkit/max7298LedDisplayDvr.pdf
It's a different LED driver (8 digits), but the principles for sending data to the driver registers are the same.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
I am having difficulty in the SHIFTOUT command. I think it is good that I
have a code sample and a circuit to analyze how SHIFTOUT works. I was
hoping that pros like you could help me. I am still a newbie.tnx
You haven't said what kind of problem you're having. What are the symptoms of your problem?
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
<!--StartFragment -->
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
- if you can, post the code you are using; sometimes it's hard to know if it's your wiring, or your code (or both!). Your wiring seems OK, by the way. Do you have the DP hard-wired to +5v just to make sure it's working OK?
- I reread the datasheet, and I think there are two things that *may* be giving you trouble:
1. the LE pin is for latching data from DIN into the driver itself, but you also need to enable actual output with the \OE pin (tie this to ground if you are not using it actively). The \OE is for switching the whole display on or off regardless of the state of the actual data within the registers.
2. the driver includes a "safety" fail-safe feature (sorry, I didn't catch this on my first read through of the sheet). If there is no SPI activity for 1 second then the display shuts down. So just make sure that your code is constantly sending data to the driver
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
micro -> maxdriver -> maxdriver -> maxdriver... etc
Also, I don't think you can do the above setup on a Stamp anyway -- you'd have to be running a SHIFTIN at the same time you are running SHIFTOUT.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
tnx I'll get back to u after I test it.