Countdown3 Dark Room Timer -------------------------- Based on the April '99 project of Stan Ockers (ockers@anl.gov). Thanks Stan! And on the modified version by Aurelien (aurelienr@hotmail.com) Thanks Aurelien! The original files from Stan are included (CNTDN.ZIP). The files from Aurelien can be downloaded at: http://www.aurelienr.com (French website) My modifications to the original project: ----------------------------------------- Hardware modifications: ----------------------- - I used Common Anode displays instead of Common Cathode ones. - I used a 4543B BCD to 7-segment decoder-latch instead of the original 4511 because of the better display of the "6" and the "9". - BC337 NPN transistors with Icmax=0.5A instead of standard PNP transistors. - Added relay for lamp switching (Thanks to Aurelien). - Added ULN2003A Darlington Transistor Array on 4543 outputs. (max. output for a 4511 or 4543 is 10mA/segment) In the modified version it's about 30mA/segment to compensate for the 25% duty cycle of the displays. - Added +5V regulated power supply. - Added +8V regulated power supply for the ULN2003A. - Added 10nF debounce capacitors to the pushbuttons. - Added Piezo buzzer instead of speaker (again, thanks to Aurelien). - Added 555 Timer as astable multivibrator for pulsed output to buzzer. (555 is triggered by its reset input) Software modifications: ----------------------- - Modified BITPAT table to accomodate for Common Anode displays. - Added initialization of PORTB and flags. - Modified EE2D, STARTCNT and SOUNDALARM routines to accomodate for the modified INTERRUPT routine: - In the original INTERRUPT routine from Stan, because of the bit pattern writes to PORTB (bit0 to 3), bits 4 & 5 (buzzer & relay) were always written back as 0, which needs a continuous update of these bits in the MAINLOOP & SOUNDALARM routines. This is why in the original schematic and the one from Aurelien there are 47uF capacitors through diodes to prevent the relay or the buzzer to deactivate every time the PORTB bit goes to 0. - I corrected this by modifying the INTERRUPT routine this way: PORTB bits: lower nibble: b0-b3: bit pattern (=1,2,4,8 for Common Anode) ----------- higher nibble: b4: buzzer output b5: relay output b6: SET PB sense line b7: START PB sense line Before: MOVF DIGIT,W ; Load digit number to lit in W ------- CALL BITPAT ; Get bit pattern from table MOVWF PORTB ; write to PORTB So bits b4 & b5 are always written to PORTB as 0. After: MOVF PORTB,W ; Read PORTB ------ ANDLW B'00110000' ; Mask bits 4 & 5 MOVWF TEMP ; Store result in TEMP register MOVF DIGIT,W ; Load digit number to lit in W CALL BITPAT ; Get bit pattern from table XORWF TEMP,W ; Do exclusive OR with register TEMP MOVWF PORTB ; Write result to PORTB So bits b4 & b5 are written back to PORTB in their original state. Files included in CNTDWN3.ZIP: ------------------------------ - CNTDN.ZIP: Original files from Stan Ockers - CNTDWN3NPN.ASM: Assembler program listing for 16F84 & NPN digit driver transistors - CNTDWN3NPN.HEX: Same in Intel HEX-format - CNTDWN3PNP.ASM: Assembler program listing for 16F84 & PNP digit driver transistors - CNTDWN3PNP.HEX: Same in Intel HEX-format - CNTDWN3-628-NPN.ASM: Assembler program listing for 16F6x8 & NPN digit driver transistors - CNTDWN3-628-NPN.HEX: Same in Intel HEX-format - CNTDWN3-628-PNP.ASM: Assembler program listing for 16F6x8 & PNP digit driver transistors - CNTDWN3-628-PNP.HEX: Same in Intel HEX-format - CNTDWN3NPN.PDF: Countdown3 schematic with NPN digit driver transistors - CNTDWN3PNP.PDF: Countdown3 schematic with PNP digit driver transistors - CNTDWNPSU.PDF: Power Supply schematic - CD3MB.GIF: Main board PCB layout - CD3DISP.GIF: Display board PCB layout - CD3PSU.GIF: Power supply board PCB layout - MBCOMP: Main board component layout - DISPCOMP: Display board component layout - PSUCOMP: PSU board component layout - DISPKEYBCOMP: Alternate display board component layout - COMPLIST.TXT: Component list - CNTDWN3.TXT: This text Also included: -------------- - CNTDWN3NPN.CKT: Countdown3 schematic with NPN digit driver transistors in Circuitmaker2000 format - CNTDWN3PNP.CKT: Countdown3 schematic with PNP digit driver transistors in Circuitmaker2000 format - CNTDWNPSU.CKT: Power supply schematic in Circuitmaker2000 format - CD3MB.PCB: Main board PCB layout in Circad98 format - CD3DISP.PCB: Display board PCB layout in Circad98 format - CD3PSU.PCB: Power supply board PCB layout in Circad98 format - CD3DISPKEYB.PCB: Alternate display board PCB layout in Circad98 format - Some digital JPG pictures of the finished project *********************************** * turbokeu@turbokeu.com * * http://www.turbokeu.com * ***********************************