Pages: [1]   Go Down
Author Topic: 33 bit shift register!  (Read 2286 times)
0 Members and 1 Guest are viewing this topic.
Tacoma, WA
Offline Offline
Full Member
***
Karma: 4
Posts: 192
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Of all the strange things, in this device I'm trying to hack, it's got a 33bit shift register, why they couldn't have simply stopped at 32bit, I don't know.. Anyways, the device.. It's the overhead console from my 2002 Chrysler PT Cruiser. It normally displays the compass direction, and the outside temperature. I'd really like it to display the time as well, and once I have it nailed down, I can have it do all sorts of things, maybe even show the gas mileage.
The chip inside the thing is an OKI m5267c-17, most of it's pins go directly to the VFD display, 4 of them lead to what must be the microcontroller. I plan to interrupt the connection to the microcontroller and route them to the Arduino. I have found the datasheet on this OKI chip, it is a shift register, and it's 33bit, 33 outputs. Since it's not divisible by 8, I imagine I can't use the shiftOut function? Or maybe I send it 40 bits, and just don't use the first 7 I send? Looking through the Arduino reference information, I see the shiftOut instructions suggest using SPI instead.. I looked at the SPI section, I can't tell, will it allow me to shift out 33bits? I imagined I'd just shift out direct binary, and I'd have some way of keeping track of which bit turns on which element in the display, but now that I think about it, it's got more than 33 elements, so it must be multiplexed in some way.  Well, one step at a time.. smiley
Logged

Brian from Tacoma, WA
Arduino evangelist - since Dec, 2010.

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 518
Posts: 26347
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

So shiftout, or SPI out, 4 bytes, and then digitalWrite the last one with separate digitalWrite of the clok line as well.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 126
Posts: 8471
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I doubt you can send 40 bits, maybe you can ignore the extra data but the gadget you're interfacing to probably won't.

I'd either do as CR suggests or write a function to shift 33 bits.

If your data is actually in 33 boolean variables it's dead simple. If it's in 5 bytes it's a bit harder but still simple.

______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Pages: [1]   Go Up
Jump to: