Need to implement anti cathode posisoning to my 6xIN-12 clock

More
4 months 3 weeks ago - 4 months 3 weeks ago #10809 by zsdd
Hi everyone
Some months ago i have built a great direct drive 6xIN-12 clock, it was engineered by doayee but highly customized by me, with only quality components installed.
So the only problem i have this is a very simple clock without anti cathode poisoning function and i want to implement it but i don't know how to code in arduino.
Can someone help me?
Original code running my clock: https://raw.githubusercontent.com/8163jb/Nixie-Clock/master/Nixie_20-04-2016
And if i understand correctly we need to implement something like this:
// ************************************************************
// Do the Anti Cathode Poisoning
// ************************************************************
void loadNumberArrayACP() {
  NumberArray[5] = (second() + acpOffset) % 10;
  NumberArray[4] = (second() / 10 + acpOffset) % 10;
  NumberArray[3] = (minute() + acpOffset) % 10;
  NumberArray[2] = (minute() / 10 + acpOffset) % 10;
  NumberArray[1] = (hour() + acpOffset)  % 10;
  NumberArray[0] = (hour() / 10 + acpOffset) % 10;
}
found in https://bitbucket.org/isparkes/nixiefirmwarev1/raw/d9acfd8b8135cc35dd0a4f95f0c3416bbee15793/ardunixFade9_6_digit/ardunixFade9_6_digit.ino
Thank you very much
Attachments:
Last edit: 4 months 3 weeks ago by zsdd.

Please Log in or Create an account to join the conversation.

More
4 months 3 weeks ago #10810 by Ian
That's a big question: The part of the code you have picked out is only the setting of the offset values which cause the number to count up according to the value of the offset. You will also need something to manage the offset as well.

I'm afraid you're going to have to get your hands dirty with the code: perhaps someone can suggest some things to try, but only you can try it.

Please Log in or Create an account to join the conversation.

More
4 months 3 weeks ago - 4 months 3 weeks ago #10811 by Ty_Eeberfest
Like Ian just said, you will need to get your hands into the code because nobody is going to write it for you! There's nothing magical about Arduino programming - it's thinly disguised C++ but really all you need is a working knowledge of plain old C.

Looking at the code you linked, at least there is a simple and obvious method already existing to put numbers on the display. It's this function:

void displayNumber(int a, int b, int c, int d, int e, int f)

where the 6 arguments represent the 6 tubes. So you need to create code to:

1) Determine if it's time to do ACP
2) Generate a series of numbers to cycle on the display
3) Push that series of numbers to the display by calling displayNumber().
4) Repeat, running thru the series of numbers several times
5) Determine when it's time to stop doing ACP.

That's about all I have to offer.

Look into it later when the dust is clearing off the crater.
Last edit: 4 months 3 weeks ago by Ty_Eeberfest.

Please Log in or Create an account to join the conversation.

Moderators: AccutronTy_EeberfestIan
Time to create page: 0.214 seconds

Search

Tube Suppliers

Go to top
JSN Boot template designed by JoomlaShine.com