(Stupid Newbie question #4) How do I SHIFTOUT 36 bits?
Archiver
Posts: 46,084
Interfacing my BS2 to a MM5451 LED driver seems easy enough, except
(there always seems to ba an "except") the MM5451 requires a HIGH
start bit followed by 35 data bits.
Is it as simple as sending 2 16 bit words one after another, the
first word with the MSB HI (start bit) followed by data, the second
word containing data only?
The data is automatically loaded into the latches on the 35th clock
pulse, the chip uses the 36th clock pulse to clear the shift
registers, preparing the chip for the next data. I like this, it
appears that by using this chip I can address 35 LED's with only 2
stamp pins. This is good, my application is stamp pin intensive.
Thank you for your help
Rich
cooker@b...
(there always seems to ba an "except") the MM5451 requires a HIGH
start bit followed by 35 data bits.
Is it as simple as sending 2 16 bit words one after another, the
first word with the MSB HI (start bit) followed by data, the second
word containing data only?
The data is automatically loaded into the latches on the 35th clock
pulse, the chip uses the 36th clock pulse to clear the shift
registers, preparing the chip for the next data. I like this, it
appears that by using this chip I can address 35 LED's with only 2
stamp pins. This is good, my application is stamp pin intensive.
Thank you for your help
Rich
cooker@b...
Comments
words and a nibble need to be shifted into the MM5451. The plot
thickens.
Thanks Rich
--- In basicstamps@y..., iceninevt@y... wrote:
> Interfacing my BS2 to a MM5451 LED driver seems easy enough, except
> (there always seems to ba an "except") the MM5451 requires a HIGH
> start bit followed by 35 data bits.
>
> Is it as simple as sending 2 16 bit words one after another, the
> first word with the MSB HI (start bit) followed by data, the second
> word containing data only?
>
> The data is automatically loaded into the latches on the 35th
clock
> pulse, the chip uses the 36th clock pulse to clear the shift
> registers, preparing the chip for the next data. I like this, it
> appears that by using this chip I can address 35 LED's with only 2
> stamp pins. This is good, my application is stamp pin intensive.
>
> Thank you for your help
>
> Rich
> cooker@b...
>(there always seems to ba an "except") the MM5451 requires a HIGH
>start bit followed by 35 data bits.
>
>Is it as simple as sending 2 16 bit words one after another, the
>first word with the MSB HI (start bit) followed by data, the second
>word containing data only?
>...
>Rich
>cooker@b...
Yes, that's all it takes! You can string out multiple data. Be sure
to use the \N switch when the number of bits is something other than
8.
firstdata.bit15=1 ' high stop bit
low chip_select ' if necessary (not specificly for MM5451)
shiftout dpin,cpin,msbfirst,[noparse][[/noparse]firstdata\16,secondata\16]
high chip_select
>Correction: I need to shiftout more than 2 words, it looks like 2
>words and a nibble need to be shifted into the MM5451. The plot
>thickens.
shiftout dpin,cpin,msbfirst,[noparse][[/noparse]firstdata\16,secondata\16,thenibble\4]
I hope that helps,
-- regards,
Tracy Allen
electronically monitored ecosystems
http://www.emesystems.com
Thank you very much for your help. Something is finally easy as I
thought it would be.
Today is a good day.
Being able to string the data all at once makes things even easier. I
was not aware this could be done.
Thanks again for your help.
Rich
iceninevt@y...
--- In basicstamps@y..., Tracy Allen <tracy@e...> wrote:
> >Interfacing my BS2 to a MM5451 LED driver seems easy enough, except
> >(there always seems to ba an "except") the MM5451 requires a HIGH
> >start bit followed by 35 data bits.
> >
> >Is it as simple as sending 2 16 bit words one after another, the
> >first word with the MSB HI (start bit) followed by data, the second
> >word containing data only?
> >...
> >Rich
> >cooker@b...
>
> Yes, that's all it takes! You can string out multiple data. Be
sure
> to use the \N switch when the number of bits is something other
than
> 8.
> firstdata.bit15=1 ' high stop bit
> low chip_select ' if necessary (not specificly for MM5451)
> shiftout dpin,cpin,msbfirst,[noparse][[/noparse]firstdata\16,secondata\16]
> high chip_select
>
> >Correction: I need to shiftout more than 2 words, it looks like 2
> >words and a nibble need to be shifted into the MM5451. The plot
> >thickens.
>
> shiftout dpin,cpin,msbfirst,
[noparse][[/noparse]firstdata\16,secondata\16,thenibble\4]
>
> I hope that helps,
>
> -- regards,
> Tracy Allen
> electronically monitored ecosystems
> http://www.emesystems.com