My latest find on eBay: PCB with logic and six 12mm Nu-Metric numitrons (labeled P/N 29-101 & P/N 29-103) for $10.00. Unfortunately one of the tubes is a '+-1' , therefore I'm missing one digit to make a 6-digit 24H-clock. The 7-segment tubes are identical to the Apollo DA-1300 numitrons, if somebody owns one and is willing to sell/trade it ... CD
Make a 12 hr clock, and use the + sign as a am/pm indicator... What are the logic chips on that board? Oh, BTW, on http://www.kdcs.be/en/savoirfaire.asp, under "In Web Development" Platform .NET is spelled "Plateform .NET" (my mother was an english major)
Thanks for the spelling correction! The board contains 5x 7447 BCD-to-7-segment-decoders, 1x 7406 inverter/buffer to drive the +-1 tube, 6x 7475 4-bit latches, 1x 74121 MMV, 6 chips labeled N8285A, and 2 chips labeled N8H80A. Don't know what these N8285A and N8H80A chips are for as I couldn't find a datasheet for them... I traced the GND, logic +5V, common drive voltage for the numitrons (I used 5V too) and the 7447 lamptest connections on the terminal block on the board to test the display. There's also room for a 6th 7-segment digit + logic chips on the board but they aren't fitted. I'm not really fond of 12H-clocks with am/pm indicator (in Belgium we always use the 24H time display on digital clocks), therefore I hope to find a spare Apollo DA-1300 7-segment tube one day... CD
so, those tubes are like light bulbs, except the filament is bent into different shapes so they light up and form numbers? whats their life expectancy then? i would think they wouldnt last too long.
They last quite a while, as the filament is really underdriven (IIRC). Think about how bright they are in comparison to a normal light bulb.
Hi Turbokeu, We are trying to get our own large digit clock going, but we are having some trouble getting the display multiplexed properly. We are able to get everything but the first digit lit properly which has some leakage from other numbers in the clock. We've tried setting a blanking peroid, but it doesn't seem to have any effect. We've tested the circuit and have verified we have individual control of each digit, so this is purely a software problem. Is there any chance you could post a little piece of your clock code as it pertains to the multiplexing aspect? Thanks, Stu
Sorry for the late reply... I will reply in several parts as the max length of a message is 10K characters. Here come the declarations: Code: ;******************************************************************************* ;* * ;* Program: LED-DCF-v25a.asm * ;* For PIC16F876 and 6x Common Anode 7-Segment LED displays * ;* DCF77 routines initially based on Yves Heilig's DCF77 routines * ;* Added DD,MM,YY DCF77 decoding * ;* Clock/Calendar routines based on Jaakko Ala-Paavola's Clock routines * ;* * ;* DCF77 LED Clock * ;* Version 2.5a - 28/09/2005 * ;* * ;* TO DO: * ;* - Automatic Time/Date routine? * ;* * ;******************************************************************************* ;******************************************************************************* ; ; Xtal=4.096MHz ; Timer0 Prescaler=8 ; ISR=every 2.0msec ; Interrupt on Timer0 overflow ; ;******************************************************************************* LIST p=16F876 ; PIC16F876 is the target processor #include "P16F876.INC" ; Include header file RADIX HEX EXPAND __CONFIG _CP_OFF & _WDT_OFF & _XT_OSC & _LVP_OFF & _BODEN_OFF & _PWRTE_ON ;******************************************************************************* ;* - Declarations - * ;******************************************************************************* ; DCF77 Variables SEC_DUR EQU 0x30 ; DCF second duration, used to test absence of 59th sec BIT_DUR EQU 0x31 ; DCF bit duration BIT_NBR EQU 0x32 ; DCF bit number (0 to 58) PARITY EQU 0x33 ; Even Parity check bit MINDCF EQU 0x34 ; DCF Minutes in packed BCD format: 10's,1's HOURDCF EQU 0x35 ; DCF Hours in packed BCD format: 10's,1's DAYDCF EQU 0x36 ; DCF Days in packed BCD format: 10's,1's MONTHDCF EQU 0x37 ; DCF Months in packed BCD format: 10's,1's YEARDCF EQU 0x38 ; DCF Years in packed BCD format: 10's,1's ; Flag bytes FLAG1 EQU 0x39 ; 1st Flag byte FLAG2 EQU 0x3A ; 2nd Flag byte FLAG3 EQU 0x3B ; 3rd Flag byte FLAG4 EQU 0x3C ; 4th Flag byte ; BIN2BCD Conversion Variables BIN EQU 0x3D ; Temp register for BIN to BCD conversion BIN1 EQU 0x3E ; Temp register for BIN to BCD conversion BIN10 EQU 0x3F ; Temp register for BIN to BCD conversion ; BCD Clock Variables for display output SEC1 EQU 0x40 ; Contains 1's of Seconds SEC10 EQU 0x41 ; Contains 10's of Seconds MIN1 EQU 0x42 ; Contains 1's of Minutes MIN10 EQU 0x43 ; Contains 10's of Minutes HOUR1 EQU 0x44 ; Contains 1's of Hours HOUR10 EQU 0x45 ; Contains 10's of Hours DAY1 EQU 0x46 ; Contains 1's of Days DAY10 EQU 0x47 ; Contains 10's of Days MONTH1 EQU 0x48 ; Contains 1's of Months MONTH10 EQU 0x49 ; Contains 10's of Minutes YEAR1 EQU 0x4A ; Contains 1's of Years YEAR10 EQU 0x4B ; Contains 10's of Years ; EQU 0x4C ; LDR EQU 0x4D ; Contains result from A/D conversion PWM EQU 0x4E ; Value to put in CCPR1L register for PWM function ; EQU 0x4F ; ; Display Variables D1 EQU 0x50 ; Contains BCD value of Digit 1 to display (most right) D2 EQU 0x51 ; Contains BCD value of Digit 2 to display D3 EQU 0x52 ; Contains BCD value of Digit 3 to display D4 EQU 0x53 ; Contains BCD value of Digit 4 to display D5 EQU 0x54 ; Contains BCD value of Digit 5 to display D6 EQU 0x55 ; Contains BCD value of Digit 6 to display (most left) DIGIT EQU 0x59 ; Holds digit number to display (1 to 6) ; Counter Variables CNT1 EQU 0x5A ; Counter for 0.5sec Beat timing delay CNT2 EQU 0x5B ; Counter for Scrolling Routine delay CNT3 EQU 0x5C ; Counter for Date display timing delay CNT4 EQU 0x5D ; Counter for hourly Gong timing delay CTR1 EQU 0x5E ; Delay counter for Main routine CTR2 EQU 0x5F ; Delay counter for Main routine ; Clock/Calendar Variables MSEC EQU 0x60 ; 4 millisecs counter (*XD=1sec) SEC EQU 0x61 ; 24H-Clock Seconds MIN EQU 0x62 ; 24H-Clock Minutes HOUR EQU 0x63 ; 24H-Clock Hours DAY EQU 0x64 ; Calendar Days MONTH EQU 0x65 ; Calendar Months YEAR EQU 0x66 ; Calendar Years ; Timer Variables TIME_ON_H EQU 0x67 ; Time ON Hours TIME_ON_M EQU 0x68 ; Time ON Minutes TIME_OFF_H EQU 0x69 ; Time OFF Hours TIME_OFF_M EQU 0x6A ; Time OFF Minutes AUX1 EQU 0x6B ; Used for 16-bit comparisons AUX2 EQU 0x6C ; Used for 16-bit comparisons ; Conversion Variables BCD EQU 0x6D ; Temp storage for BCD to BIN conversion BCD1 EQU 0x6E ; Temp storage for BCD to BIN conversion BCD10 EQU 0x6F ; Temp storage for BCD to BIN conversion ; Common Variables W_TEMP EQU 0x70 ; W Register storage during Interrupt STATUS_TEMP EQU 0x71 ; STATUS Register storage during Interrupt PCLATH_TEMP EQU 0x72 ; PCLATH Register storage during Interrupt TEMP EQU 0x73 ; Temp storage OFFSET EQU 0x74 ; Temp storage for Table reads ; Constants (for 4.096MHZ XTAL) XD EQU D'250' ; Xtal divider = D'250' for 4.096MHz Xtal ; FLAG1 bits assignments M0 EQU 0 ; Indicates start of new minute for Time Check S0 EQU 1 ; Indicates start of new minute for DCF_OK BEATF EQU 2 ; Colon Beat indicator update flag (for 1Hz Beat delay) TIMERF EQU 3 ; Time Check status flag (0=OFF, 1=ON) TDF EQU 4 ; Display Time/Date bit (0=Time, 1=Date) PBF EQU 5 ; Indicates Push button press TZ0F EQU 6 ; Indicates Time Zone ; TZ1F/TZ0F=11=CET TZ1F EQU 7 ; Indicates Time Zone ; TZ1F/TZ0F=01=CET-1H ; TZ1F/TZ0F=10=CET+1H ; FLAG2 bits assignments ISR EQU 0 ; Flag for DCF77 and Clock update in ISR RXD EQU 1 ; Indicates reception of a DCF bit (0 or 1) DCF_BIT EQU 2 ; Value of actual received DCF bit S59 EQU 3 ; Indicates missing 59th pulse of DCF timeframe CET EQU 4 ; CET Time Zone flag (0= not CET; 1= CET) DCF_ERR EQU 5 ; DCF Error flag (=0 when Startbit and Parity are OK) DCF_OK EQU 6 ; DCF frame OK status indicator flag DCF_ON EQU 7 ; Indicates presence of DCF signal (checked every sec) ; FLAG3 bits assignments MINF EQU 0 ; Indicates reception of DCF Minute bits HOURF EQU 1 ; Indicates reception of DCF Hour bits DAYF EQU 2 ; Indicates reception of DCF Day bits MONTHF EQU 3 ; Indicates reception of DCF Month bits YEARF EQU 4 ; Indicates reception of DCF Year bits DOWF EQU 5 ; Indicates reception of DCF DOW bits LYF EQU 6 ; Leap year flag SCROLL EQU 7 ; Indicates change of state of Pushbutton for Scroll routine ; FLAG4 bits assignments AUTOF EQU 0 ; Automatic Time/Date flag (0=ON, 1=OFF) GONGF EQU 1 ; Hourly Gong flag (1=ON, 0=OFF) ; PORTA assignments LDR_IN EQU 0 ; AN0 bit: LDR Analog input TD EQU 1 ; RA1 bit: "Time/Date" Push Button input TZ0 EQU 2 ; RA2 bit: "Time Zone0" Jumper input TZ1 EQU 3 ; RA3 bit: "Time Zone1" Jumper input DCF_IN EQU 4 ; RA4 bit: DCF77 signal input AUTOTD EQU 5 ; RA5 bit: Automatic Time/Date switch ; PORTB assignments RB0 EQU 0 ; RB0 bit: 4543 D0 bit output RB1 EQU 1 ; RB1 bit: 4543 D1 bit output RB2 EQU 2 ; RB2 bit: 4543 D2 bit output RB3 EQU 3 ; RB3 bit: 4543 D3 bit output SA_LED EQU 4 ; RB4 bit: Free-running & no DCF signal LED output DCF_LED EQU 5 ; RB5 bit: DCF77 Beat LED output BEAT_LED EQU 6 ; RB6 bit: 0.5sec Colon Beat LEDs output LD EQU 7 ; RB7 bit: Blank output to 4543 LD input ; PORTC assignments ERR_LED EQU 0 ; RC0 bit: DCF77 Error LED output AM_PM EQU 1 ; RC2 bit: AM/PM Indicator output CCP1 EQU 2 ; RC2 bit: PWM output to 74HCT238 E3 input GONG EQU 3 ; RC3 bit: Gong output to SAE800 RC4 EQU 4 ; RC4 bit: 74HCT238 A0 bit output RC5 EQU 5 ; RC5 bit: 74HCT238 A1 bit output RC6 EQU 6 ; RC6 bit: 74HCT238 A2 bit output OK_LED EQU 7 ; RC7 bit: DCF Frame OK LED output CD
Part 2 Part 2: Initialization Code: ;****************************************************************************** ; - Initialisation - * ;****************************************************************************** INIT CLRF STATUS ; Do initialization, select bank 0 CLRF INTCON ; Clear int-flags, disable interrupts CLRF PCLATH ; Keep in lower 2 KByte CLRF TMR0 ; Clear Timer0 CLRF TMR2 ; Clear Timer2 CLRF TMR1H ; Clear Timer1 upper byte CLRF TMR1L ; Clear Timer1 lower byte CLRF PORTA ; All PORTA output should output low CLRF PORTB ; All PORTB output should output low CLRF PORTC ; All PORTC output should output low CLRF ADCON0 ; Clear ADC register CLRF ADRESH ; Clear A/D High result register BSF STATUS,RP0 ; Select Bank1 MOVLW B'00111111' ; RA0-5 inputs MOVWF TRISA MOVLW B'00000000' ; RB0-7 outputs MOVWF TRISB MOVLW B'00000000' ; RC0-7 outputs MOVWF TRISC MOVLW B'10000010' ; Prescaler 1:8 for Timer0 MOVWF OPTION_REG ; Assign Prescaler to TMR0 MOVLW H'0E' ; MOVWF ADCON1 ; RA0=AN0, LEFT justified, RA1-5=digital I/O CLRF ADRESL ; Clear A/D Low result register ; Initialize PR2 value MOVLW D'63' ; for 8-bit PWM resolution MOVWF PR2 BCF STATUS,RP0 ; Select Bank0 MOVLW H'81' ; MOVWF ADCON0 ; Fosc/32, select Channel 0 (AN0), A/D is on MOVLW B'00000100' ; Enable TMR2, PostScaler=1, PreScaler=1 MOVWF T2CON ; PWM frequency = 16.000KHz ; Enable PWM on CCP1 and set Duty Cycle MOVLW B'00111100' ; MOVWF CCP1CON ; PWM ON, <CCPCON5:4>=11 (2 MSB's of 10-bit resolution) MOVLW D'64' ; for 8-bit PWM resolution MOVWF CCPR1L ; Set Duty Cycle to 100% ; Clear GPR registers (Data RAM) 20-7F (Bank0) MOVLW 0x20 ; MOVWF FSR ; Initialize pointer to first RAM location NEXT CLRF INDF ; Clear INDF register INCF FSR,F ; Increment pointer BTFSS FSR,7 ; All done? GOTO NEXT ; No, clear next ; Check TZ0 & TZ1 jumpers and set TZ0F & TZ1F flags accordingly BTFSC PORTA,TZ0 ; Read TZ0 jumper, skip if 0 BSF FLAG1,TZ0F ; No, set TZ0F flag BTFSC PORTA,TZ1 ; Yes, read TZ1 jumper, skip if 0 BSF FLAG1,TZ1F ; No, set TZ1F flag ; Check for Time Zone CET MOVF FLAG1,W ; Load FLAG1 ANDLW B'11000000' ; Mask 2 MSB's from FLAG1 SUBLW D'192' ; BTFSC STATUS,Z ; Timezone=CET? (TZ0F & TZ1F=1), skip if clear BSF FLAG2,CET ; Set CET flag ; Initialize Time Check values MOVLW D'22' MOVWF TIME_OFF_H MOVLW D'59' MOVWF TIME_OFF_M MOVLW D'03' MOVWF TIME_ON_H MOVLW D'01' MOVWF TIME_ON_M ; Initialize Clock variables MOVLW D'00' ; Init Seconds MOVWF SEC MOVLW D'00' ; Init Minutes MOVWF MIN MOVLW D'12' ; Init Hours MOVWF HOUR ; Initialize Calendar variables MOVLW D'00' ; Init Years MOVWF YEAR MOVLW D'01' ; Init Months MOVWF MONTH MOVLW D'01' ; Init Days MOVWF DAY ; Enable interrupts for Timer0 MOVLW B'10100000' MOVWF INTCON ; Set GIE and T0IE ; Disable interrupts for Timer1 & Timer2 BSF STATUS,RP0 ; Select bank 1 BCF PIE1,TMR1IE BCF PIE1,TMR2IE BCF STATUS,RP0 ; Select bank 0 CD
Part 3 Part 3: The Interrupt Service Routine The displays are updated every 2msec, DCF decoding and Clock update every 4msec. Code: ;****************************************************************************** ; - Interrupt Service Routine (every 2.0ms) - * ;****************************************************************************** INTERRUPT ; Interrupt Service Routine PUSH MOVWF W_TEMP ; Copy W to W_TEMP register SWAPF STATUS,W ; Swap status to save into W CLRF STATUS ; Bank0, regardless of current bank MOVWF STATUS_TEMP ; Save status to STATUS_TEMP register MOVF PCLATH,W ; Copy PCLATH into W MOVWF PCLATH_TEMP ; Save PCLATH to PCLATH_TEMP CLRF PCLATH ; Page 0, regardless of current page ; CLRWDT ; Clear Watchdog Timer INCF CTR1,F ; Increment CTR1 (delay for Main Routine) INCF CNT2,F ; Increment CNT2 (delay for Scrolling Routine) INCF CNT3,F ; Increment CNT3 (delay for Date Display Routine) INCF CNT4,F ; Increment CNT4 (delay for hourly gong pulse) ; DCF77 and Clock routines are called every 2 interrupts (every 4msec) ; Display routine is called every interrupt (every 2msec) BTFSS FLAG2,ISR ; Check ISR flag, skip if set GOTO PASS_0 ; No, ISR=0, Update DCF, Clock & Display BCF FLAG2,ISR ; Yes, ISR=1, clear ISR flag for next pass GOTO PASS_1 ; Only update Display PASS_0 BSF FLAG2,ISR ; Set ISR flag for next pass PAGESEL (DCF77) ; Select Program Memory Page of routine CALL DCF77 ; Call DCF77 decode routine PAGESEL (CLOCK) ; Select Program Memory Page of routine CALL CLOCK ; Update Clock routine PASS_1 PAGESEL (DISPLAY) ; Select Program Memory Page of routine CALL DISPLAY ; Update Display routine CLRF INTCON ; Clear INTCON Register (& clear TMR0 Overflow bit) BSF INTCON,5 ; Enable Timer0 Interrupt POP MOVF PCLATH_TEMP,W ; Restore PCLATH MOVWF PCLATH ; Store W into PCLATH SWAPF STATUS_TEMP,W ; Swap STATUS_TEMP into W MOVWF STATUS ; Store W into STATUS register SWAPF W_TEMP,F ; Swap W_TEMP SWAPF W_TEMP,W ; Swap W_TEMP into W RETFIE ; Return & enable interrupts CD
Part 4 Excerpt of Display routine: Code: ;****************************************************************************** ; - Display BCD values of D1 to D6 to LED Display and check LEDs - * ;****************************************************************************** DISPLAY ; every 2.0ms = 500Hz/digit, = 83.2Hz refresh rate for the 6 digits MOVLW D'6' ; SUBWF DIGIT,W ; DIGIT=6? BTFSC STATUS,Z ; Skip if DIGIT is different from 6 CLRF DIGIT ; Yes, DIGIT=6, clear digit number ; Disable latch to 7-segment display just before sending new value to 4543 BCF PORTB,LD ; Disable 4543 Latch ; Output digit value to 4543 MOVF PORTB,W ; Read PORTB bits ANDLW B'11110000' ; Mask bit 4 to 7 MOVWF TEMP ; Save it for later MOVF DIGIT,W ; Recall digit number (0 to 5) ADDLW H'50' ; Point at register to display (D1 to D6) MOVWF FSR ; Use as pointer MOVF INDF,W ; Get value of register pointed to into W XORWF TEMP,W ; Exclusive OR with TEMP MOVWF PORTB ; BCD output to 4543 INCF DIGIT,F ; Next digit number (0 to 5 for 4543, 1 to 6 for 74HCT238) ; Select digit to lit MOVF PORTC,W ; Read PORTC bits ANDLW B'10001111' ; Mask bit 0 to 4, bit7 MOVWF TEMP ; Save it for later SWAPF DIGIT,W ; Swap lower and higher nibble of DIGIT into W XORWF TEMP,W ; Exclusive OR with TEMP MOVWF PORTC ; BCD output to 74HCT238 ; Latch digit to 7-segment display BSF PORTB,LD ; Enable 4543 Latch RETURN Let me know if you need more information. CD
Yes! That is very helpful. Thanks! I'll see if we can't find out what we did wrong. Our circuit is a common cathode system and is arranged a little differently than yours, so it will have to be somewhat different. Thanks again, Stu
Chris, I purchased 6 da-2110 numitron tubes from this ebay seller http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=2554490063 to build my DA-2110 numitron clock you can see here http://www.tuberadios.com/numitron2/ BTW, my first numitron clock http://www.numitron.com has been plugged in for 2 years now without a problem..over 17,000 hours. Regards, Sal Brisindi
Hi Sal, Thanks, I already found this auction. But as I'm a little low on cash at the moment and I already own the above mentionned 5+1 Nu-Metric numitrons I prefer to use these to build a PIC-based clock (BTW, do you have one Apollo/IEE DA-1300 or 1310 numitron tube that you're willing to sell?) Nice numitron clocks! It seems thet you have your own stock of MM5314 clock chips... BTW, I bought a used display board from a Fluke 8200 on eBay for $10.00. The board contains four B-5750 nixie tubes and one B-5866 +,- polarity indicator, all in very good condition. Now I'm able to refurbish my Fluke 8100A digital multimeter: As you can see the polarity nixie tube is quite darkened. I received this Philips PM2422 for free, all I had to do was drive 220 miles with the Harley to pick it up... Regards, Chris
there ought to be a sticky for BCD or 7SLED clocks. there are two 7SLED clock threads on the front page of the electronics forum right now! i know i've posted my own BCD and 7SLED threads, this could save a lot of time (and bandwidth). maybe even a "common projects" sticky, with instructions for the most commonly posted thread topics...
Hi, While searching for some info on how to build my own 7-segment clock I found this thread. And there is a lot good info in here. But I actually got a question for Turbokue as it seems to me that the schematic you posted is exactly what i'm looking for. Except from the fact I don't need the LDR option or remote control unit, and I'm not displaying seconds or points between the hours/minutes. But it seems to me I can strip out most of it without much trouble. But I'm just asking to be sure. And what do IC-4 and IC-5 do? thanks anyway, you've been of great help already
Rather than fill the first page with stickies, I've added a section to the first post in Useful Links to cover stuff like this that's got a lot of info and attention, so any more examples, let me know and I'll add them. Ideally, the threads should give enough info for somebody competent to complete the project, but it's also a showcase so you don't have to give all your secrets away.
Hey Turbokeu I did some small modifications on your schematic and I was wondering if I made some big/small mistakes... And I've got some open wires, don't know what they do and where they should go.. The idea I had in mind (if it's ok with you) is to use the same PIC program with a slightly different clock... I tried to strip out the brightness controll, seconds indicator and beats... And I chose to multiplex the other way you posted a while ago. Realised right now I don't even need the DS2 singal as I've only got 4 displays Anyway, this is what I've got so far thanks Lennard
You're welcome Lennard! Yes you can strip out most of these features but ideally the ASM-code should be modified accordingly too. IC4 and IC5 are drivers. The 4543 and 74xx238 are not able to sink or source the current needed by the displays, therefore I used common high side UDN2981 (or TD62783A) and ULN2803 low side drivers to drive the displays. CD PS: I will answer your 2nd post a little later (have to go to the restaurant now... )