[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/diy/ - Do It Yourself

Search:


View post   

>> No.1440418 [View]
File: 23 KB, 940x549, derp.png [View same] [iqdb] [saucenao] [google]
1440418

I dun goofed.
I have six nixie tubes being driven by binary decimal decoders.
So basically I have 2 tubes for seconds, 2 for minutes and 2 for hours.
Each decoder takes the binary input on 4 pins (takes it as half a byte).
So I have 3 shift register controlling the 6 decoders.
So there's a shift register feeding into the 2 decoders for seconds, one for the 2 minute decoders and 1 for the 2 hour decoders.
At the minute I'm just testing out my design with an Arduino while I learn PIC programming.
My basic plan was I could shift out the seconds, minutes and hours as a byte each and this would be passed to the decoders.
However as you can guess, shifting out 12 in binary B00001100, doesn't equate to the first second tube showing 1 and the second showing 2.
Each decoder is given half the byte so the first decoder gets 0000 and displays zero and the second decoder gets 1100, when the decoder sees a number greater than 9 it shuts the tube off.

In order for the tubes to show 12, I'd have to shift out 00010010 (aka 18)
So basically I can't simply count in binary, I need to count each nibble of the byte separately.
Is there an easy way to do this or am I gonna have to make a giant array?

Pic related, the shift register / decoder part of my schematic.

Navigation
View posts[+24][+48][+96]