Nixie Clock #2 IN16
My second nixie clock design.
This clock is compared with my other Nixie clock much simpler, it uses less components and the code is kept simple and short.
The segments are multiplexed to increase lifetime of the tubes and simplify the 170V power supply.
Due the separate tube pcb it’s possible to use it with other tube’s. I have used IN-16 tubes for this clock, bought them on ebay.
To-do: Wooden enclosure with aluminum top and bottom.
3D Design Front
3D Design Back
Finished top pcb
Finished bottom pcb
Finished tube pcb
The clock in action.
Multiplexing in action, shot with 1000fps camera
Nixie High speed
'============================================================================ '= Simple IN-16 nixie tube clock with multiplexed segments, low part count = '= Shortest Nixie Bascom code available on the net = '= = '= Copyright Evertdekker.com 2011 = '= Code Created with Bascom 220.127.116.11 = '============================================================================ $regfile = "M88pdef.dat" $crystal = 1000000 'Internal 8mhz div/8 $hwstack = 32 $swstack = 64 $framesize = 16 Config Clock = Soft 'Use the softclock, 32.768KHz crystal connected to tosc1/2 Config Date = Dmy , Separator = - Enable Interrupts Date$ = "15-03-11" Time$ = "12:15:45" '== Setup hardware == Digit Alias Portc Config Digit = Output 'Set up portc as output for the digit Ddrd = &B00111111 'Setup portd as output for the segment and keep bit6&7 free for other use Button_hr Alias Pinb.0 Button_min Alias Pinb.1 Config Button_hr = Input Config Button_min = Input 'Set buttons as input Set Portb.0 Set Portb.1 'Switch on the pullup for the buttons Dim Multiplex As Byte Multiplex = 1 'Multiplexer starts with 1 Do Select Case Multiplex Case 1 : Digit = _sec Mod 10 'Seconds Case 2 : Digit = _sec / 10 'Seconds tens Case 4 : Digit = _min Mod 10 'Minute Case 8 : Digit = _min / 10 'Minute tens Case 16 : Digit = _hour Mod 10 'Hour Case 32 : Digit = _hour / 10 'Hour tens End Select Portd = &B11000000 Or Multiplex 'Switch on one tube Waitms 2 'Some delay to slow down the multiplexer If Multiplex < 32 Then 'Shift the multiplexer one bit to the left until all 6 segments are done Shift Multiplex , Left , 1 Else Multiplex = 1 'Start over again at segment 1 End If Debounce Button_min , 0 , Setminute , Sub 'One of the buttons pressed, jump to the sub to change the time Debounce Button_hr , 0 , Sethour , Sub Loop End '=== Subs === Setminute: Incr _min If _min > 59 Then _min = 0 Return Sethour: Incr _hour If _hour > 23 Then _hour = 0 Return
hi i downloaded the file but there was no code file can you help me with it
Code was missing indeed from the zip file.
Updated the zip, code should be there now.
btw It’s the same code as in the topic above.
can you help me with the code i would like to add a rtc 1307 module to the design but dont get how to code it all to work with the micro-controller thank you in advance
hi i want to add a rtc 1307 https://www.sparkfun.com/products/12708 to the design but dont understand how to do the coding for it can you help me and thank you in advance
Try to combine the ds1307.bas sample from your Bascom sample directory with the nixie clock code.
The hardware i2c pins are occupied so you need to use the software i2c (just like in the ds1307.bas sample).
Add just above the loop line Gosub Getdatetime to get the time from the ds1307.
But why do you want the ds1307. Build in rtc in the M88p is accurate enough.
On your scmatic it shows avrmega8 ai as mcu so the m88p is what i should use insted
M88p is better, newer.
I am beginner with Bascom,
One question – is there any chance I could program my AVR with version Demo of Bascom (limited to 4kB)
How big is Your bascom code for this clock?
If I compile the code it’s 896bytes, so that will fit with ease in the 4Kb demo limit.