Author Topic: Help Troubleshooting Nixie Tube Display Project - Based on EEVBlog #952  (Read 1609 times)

0 Members and 1 Guest are viewing this topic.

Offline alex1683Topic starter

  • Newbie
  • Posts: 3
  • Country: ca
Hello, young player here,

I was inspired by Dave's video series on his Nixie tube sub-counter 2 years back and finally got around to giving it a whirl. I got some PCB's made, assembled a board, wrote up some Arduino code and it doesn't quite work  :-[. Spent several hours trying to troubleshoot it last night but couldn't figure it out. Don't know where to go from here, figured this is the right place to ask.

The first shift register works fine but the next three do not.  Maybe there is something I don't understand about how cascading works?

I'm using the same circuit as Dave with TPIC6B595's, (Pictures attached, sorry if it's ugly).

Here's the relevant code:
Code: [Select]
void send_data(unsigned long encodedData){
  for(int i=31; i>=0; i--){
    digitalWrite(DIN, encodedData&(ONE<<i));
    digitalWrite(DCK,HIGH);
    digitalWrite(DCK,LOW);
  }
  digitalWrite(RCK,HIGH);
  digitalWrite(RCK,LOW);
  return;
}

There are 4 shift registers, 8 bits each so I'm storing the word as a 32 bit unsigned int.
I write the 32 bits from MSB to LSB while clocking DCK. At the end I pulse RCK.
DIN is the pin connected to SERIN on the first shift register.
DCK is the pin connected to shift register clock  (SRCK)
RCK is the pin connected to the register clock (I think it's also known as the latch?)

I did some continuity testing and didn't find any problems, also checked the second chip is getting 5V power.

Any ideas for what could be wrong? What I should check next?

Thanks for your time,

Alex



 
 

Offline Andy Watson

  • Super Contributor
  • ***
  • Posts: 2138
Re: Help Troubleshooting Nixie Tube Display Project - Based on EEVBlog #952
« Reply #1 on: January 20, 2019, 05:50:56 pm »
I'm not familiar with Arduino code but I would question whether "digitalWrite(  )" is doing what you expect when it's passed an unsigned long. Also, you might want to initialise RCK and DCK to low prior to starting the loop.
 
The following users thanked this post: alex1683

Offline janoc

  • Super Contributor
  • ***
  • Posts: 3925
  • Country: de
Re: Help Troubleshooting Nixie Tube Display Project - Based on EEVBlog #952
« Reply #2 on: January 20, 2019, 06:04:42 pm »
You may want to put some delay between the digitalWrites. Otherwise the microcontroller will generate only a very narrow pulse (defined by how much (in)efficient the library code is) and that may be very marginal for the shift registers. The chips may not be able to switch that fast - the first one could be just able to catch the pulse and the others not.

 
The following users thanked this post: alex1683

Offline NivagSwerdna

  • Super Contributor
  • ***
  • Posts: 2507
  • Country: gb
Re: Help Troubleshooting Nixie Tube Display Project - Based on EEVBlog #952
« Reply #3 on: January 20, 2019, 06:13:29 pm »
"Data transfers through the shift and storage
registers on the rising edge of the shift-register clock
(SRCK) and the register clock (RCK), respectively."

LOW -> HIGH

You should not need any delays.

I would do a... (encodedData&(ONE<<i) ? 1 : 0)  just to be on the safe side... or re-write as a shift.
« Last Edit: January 20, 2019, 06:16:09 pm by NivagSwerdna »
 
The following users thanked this post: alex1683

Offline alex1683Topic starter

  • Newbie
  • Posts: 3
  • Country: ca
Re: Help Troubleshooting Nixie Tube Display Project - Based on EEVBlog #952
« Reply #4 on: January 20, 2019, 06:33:59 pm »
You may want to put some delay between the digitalWrites. Otherwise the microcontroller will generate only a very narrow pulse (defined by how much (in)efficient the library code is) and that may be very marginal for the shift registers. The chips may not be able to switch that fast - the first one could be just able to catch the pulse and the others not.

All the datasheet timing specification are in nanoseconds. I originally had 50 microseconds between setting the data pin high/low and the rising edge of SRCLK, and between the last SRCLK and the RCK/latch pulse.

Do you have a suggestion for a delay length?

"Data transfers through the shift and storage
registers on the rising edge of the shift-register clock
(SRCK) and the register clock (RCK), respectively."

LOW -> HIGH

You should not need any delays.

I would do a... (encodedData&(ONE<<i) ? 1 : 0)  just to be on the safe side... or re-write as a shift.

I'll give that a try and get back to you.
« Last Edit: January 20, 2019, 06:37:50 pm by alex1683 »
 

Offline alex1683Topic starter

  • Newbie
  • Posts: 3
  • Country: ca
Re: Help Troubleshooting Nixie Tube Display Project - Based on EEVBlog #952
« Reply #5 on: January 20, 2019, 07:16:12 pm »
I would do a... (encodedData&(ONE<<i) ? 1 : 0)  just to be on the safe side... or re-write as a shift.

I'll give that a try and get back to you.

So it worked, many thanks. Don't think I ever would have figured it out without everyone's help.
 
The following users thanked this post: cpposteve

Offline NivagSwerdna

  • Super Contributor
  • ***
  • Posts: 2507
  • Country: gb
Re: Help Troubleshooting Nixie Tube Display Project - Based on EEVBlog #952
« Reply #6 on: January 20, 2019, 10:30:41 pm »
So it worked, many thanks. Don't think I ever would have figured it out without everyone's help.
8)

FWIW My normal approach would be to look at the least significant bit and shift in a loop

outValue = myValue & 1;
myValue >>= 1;
« Last Edit: January 20, 2019, 10:34:05 pm by NivagSwerdna »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf