Initial commit

This commit is contained in:
Juergen Jung 2014-05-14 22:24:32 +02:00
commit bb6747ae78
32 changed files with 9795 additions and 0 deletions

Binary file not shown.

Binary file not shown.

BIN
dokumente/display_scheme.pdf Executable file

Binary file not shown.

BIN
dokumente/display_top.pdf Executable file

Binary file not shown.

BIN
dokumente/main_bestueckung.pdf Executable file

Binary file not shown.

BIN
dokumente/main_bottom.pdf Executable file

Binary file not shown.

BIN
dokumente/main_scheme.pdf Executable file

Binary file not shown.

BIN
dokumente/main_top_bottom.pdf Executable file

Binary file not shown.

BIN
eagle/display.brd Executable file

Binary file not shown.

27
eagle/display.mpd Executable file
View File

@ -0,0 +1,27 @@
//MPD-File
#ifndef(pack_LED1) #declare global_pack_LED1=yes; object {DIODE_DIS_LED_5MM(Red,0.500000,4.000000,)translate<0,0,0> rotate<0,0.000000,0>rotate<0,0.000000,0> rotate<0,0,0> translate<11.430000,0.000000,82.550000>}#end //Diskrete 5MM LED LED1 LED5MM
#ifndef(pack_LED2) #declare global_pack_LED2=yes; object {DIODE_DIS_LED_5MM(Red,0.500000,4.000000,)translate<0,0,0> rotate<0,0.000000,0>rotate<0,0.000000,0> rotate<0,0,0> translate<21.590000,0.000000,82.550000>}#end //Diskrete 5MM LED LED2 LED5MM
#ifndef(pack_LED3) #declare global_pack_LED3=yes; object {DIODE_DIS_LED_5MM(Red,0.500000,4.000000,)translate<0,0,0> rotate<0,0.000000,0>rotate<0,0.000000,0> rotate<0,0,0> translate<36.830000,0.000000,82.550000>}#end //Diskrete 5MM LED LED3 LED5MM
#ifndef(pack_LED4) #declare global_pack_LED4=yes; object {DIODE_DIS_LED_5MM(Red,0.500000,4.000000,)translate<0,0,0> rotate<0,0.000000,0>rotate<0,0.000000,0> rotate<0,0,0> translate<46.990000,0.000000,82.550000>}#end //Diskrete 5MM LED LED4 LED5MM
#ifndef(pack_LED5) #declare global_pack_LED5=yes; object {DIODE_DIS_LED_5MM(Red,0.500000,4.000000,)translate<0,0,0> rotate<0,0.000000,0>rotate<0,0.000000,0> rotate<0,0,0> translate<63.500000,0.000000,82.550000>}#end //Diskrete 5MM LED LED5 LED5MM
#ifndef(pack_LED6) #declare global_pack_LED6=yes; object {DIODE_DIS_LED_5MM(Red,0.500000,4.000000,)translate<0,0,0> rotate<0,0.000000,0>rotate<0,0.000000,0> rotate<0,0,0> translate<73.660000,0.000000,82.550000>}#end //Diskrete 5MM LED LED6 LED5MM
#ifndef(pack_LED7) #declare global_pack_LED7=yes; object {DIODE_DIS_LED_5MM(Red,0.500000,4.000000,)translate<0,0,0> rotate<0,0.000000,0>rotate<0,0.000000,0> rotate<0,0,0> translate<11.430000,0.000000,72.390000>}#end //Diskrete 5MM LED LED7 LED5MM
#ifndef(pack_LED8) #declare global_pack_LED8=yes; object {DIODE_DIS_LED_5MM(Red,0.500000,4.000000,)translate<0,0,0> rotate<0,0.000000,0>rotate<0,0.000000,0> rotate<0,0,0> translate<21.590000,0.000000,72.390000>}#end //Diskrete 5MM LED LED8 LED5MM
#ifndef(pack_LED9) #declare global_pack_LED9=yes; object {DIODE_DIS_LED_5MM(Red,0.500000,4.000000,)translate<0,0,0> rotate<0,0.000000,0>rotate<0,0.000000,0> rotate<0,0,0> translate<36.830000,0.000000,72.390000>}#end //Diskrete 5MM LED LED9 LED5MM
#ifndef(pack_LED10) #declare global_pack_LED10=yes; object {DIODE_DIS_LED_5MM(Red,0.500000,4.000000,)translate<0,0,0> rotate<0,0.000000,0>rotate<0,0.000000,0> rotate<0,0,0> translate<46.990000,0.000000,72.390000>}#end //Diskrete 5MM LED LED10 LED5MM
#ifndef(pack_LED11) #declare global_pack_LED11=yes; object {DIODE_DIS_LED_5MM(Red,0.500000,4.000000,)translate<0,0,0> rotate<0,0.000000,0>rotate<0,0.000000,0> rotate<0,0,0> translate<63.500000,0.000000,72.390000>}#end //Diskrete 5MM LED LED11 LED5MM
#ifndef(pack_LED12) #declare global_pack_LED12=yes; object {DIODE_DIS_LED_5MM(Red,0.500000,4.000000,)translate<0,0,0> rotate<0,0.000000,0>rotate<0,0.000000,0> rotate<0,0,0> translate<73.660000,0.000000,72.390000>}#end //Diskrete 5MM LED LED12 LED5MM
#ifndef(pack_LED13) #declare global_pack_LED13=yes; object {DIODE_DIS_LED_5MM(Red,0.500000,4.000000,)translate<0,0,0> rotate<0,0.000000,0>rotate<0,0.000000,0> rotate<0,0,0> translate<11.430000,0.000000,62.230000>}#end //Diskrete 5MM LED LED13 LED5MM
#ifndef(pack_LED14) #declare global_pack_LED14=yes; object {DIODE_DIS_LED_5MM(Red,0.500000,4.000000,)translate<0,0,0> rotate<0,0.000000,0>rotate<0,0.000000,0> rotate<0,0,0> translate<21.590000,0.000000,62.230000>}#end //Diskrete 5MM LED LED14 LED5MM
#ifndef(pack_LED15) #declare global_pack_LED15=yes; object {DIODE_DIS_LED_5MM(Red,0.500000,4.000000,)translate<0,0,0> rotate<0,0.000000,0>rotate<0,0.000000,0> rotate<0,0,0> translate<36.830000,0.000000,62.230000>}#end //Diskrete 5MM LED LED15 LED5MM
#ifndef(pack_LED16) #declare global_pack_LED16=yes; object {DIODE_DIS_LED_5MM(Red,0.500000,4.000000,)translate<0,0,0> rotate<0,0.000000,0>rotate<0,0.000000,0> rotate<0,0,0> translate<46.990000,0.000000,62.230000>}#end //Diskrete 5MM LED LED16 LED5MM
#ifndef(pack_LED17) #declare global_pack_LED17=yes; object {DIODE_DIS_LED_5MM(Red,0.500000,4.000000,)translate<0,0,0> rotate<0,0.000000,0>rotate<0,0.000000,0> rotate<0,0,0> translate<63.500000,0.000000,62.230000>}#end //Diskrete 5MM LED LED17 LED5MM
#ifndef(pack_LED18) #declare global_pack_LED18=yes; object {DIODE_DIS_LED_5MM(Red,0.500000,4.000000,)translate<0,0,0> rotate<0,0.000000,0>rotate<0,0.000000,0> rotate<0,0,0> translate<73.660000,0.000000,62.230000>}#end //Diskrete 5MM LED LED18 LED5MM
#ifndef(pack_LED19) #declare global_pack_LED19=yes; object {DIODE_DIS_LED_5MM(Red,0.500000,4.000000,)translate<0,0,0> rotate<0,0.000000,0>rotate<0,0.000000,0> rotate<0,0,0> translate<11.430000,0.000000,52.070000>}#end //Diskrete 5MM LED LED19 LED5MM
#ifndef(pack_LED20) #declare global_pack_LED20=yes; object {DIODE_DIS_LED_5MM(Red,0.500000,4.000000,)translate<0,0,0> rotate<0,0.000000,0>rotate<0,0.000000,0> rotate<0,0,0> translate<21.590000,0.000000,52.070000>}#end //Diskrete 5MM LED LED20 LED5MM
#ifndef(pack_LED21) #declare global_pack_LED21=yes; object {DIODE_DIS_LED_5MM(Red,0.500000,4.000000,)translate<0,0,0> rotate<0,0.000000,0>rotate<0,0.000000,0> rotate<0,0,0> translate<36.830000,0.000000,52.070000>}#end //Diskrete 5MM LED LED21 LED5MM
#ifndef(pack_LED22) #declare global_pack_LED22=yes; object {DIODE_DIS_LED_5MM(Red,0.500000,4.000000,)translate<0,0,0> rotate<0,0.000000,0>rotate<0,0.000000,0> rotate<0,0,0> translate<46.990000,0.000000,52.070000>}#end //Diskrete 5MM LED LED22 LED5MM
#ifndef(pack_LED23) #declare global_pack_LED23=yes; object {DIODE_DIS_LED_5MM(Red,0.500000,4.000000,)translate<0,0,0> rotate<0,0.000000,0>rotate<0,0.000000,0> rotate<0,0,0> translate<63.500000,0.000000,52.070000>}#end //Diskrete 5MM LED LED23 LED5MM
#ifndef(pack_LED24) #declare global_pack_LED24=yes; object {DIODE_DIS_LED_5MM(Red,0.500000,4.000000,)translate<0,0,0> rotate<0,0.000000,0>rotate<0,0.000000,0> rotate<0,0,0> translate<73.660000,0.000000,52.070000>}#end //Diskrete 5MM LED LED24 LED5MM
#ifndef(pack_SV1) #declare global_pack_SV1=yes; object {CON_DIS_WS16G()translate<0,-0,0> rotate<0,180.000000,0>rotate<0,0.000000,0> rotate<0,0,180> translate<41.910000,-1.500000,77.470000>}#end //Wannenstecker 16Pin SV1 ML16
#ifndef(pack_SV2) #declare global_pack_SV2=yes; object {CON_DIS_WS16G()translate<0,-0,0> rotate<0,180.000000,0>rotate<0,0.000000,0> rotate<0,0,180> translate<41.910000,-1.500000,57.150000>}#end //Wannenstecker 16Pin SV2 ML16

BIN
eagle/display.sch Executable file

Binary file not shown.

BIN
eagle/display_nutzen.brd Executable file

Binary file not shown.

254
eagle/eagle.epf Executable file
View File

@ -0,0 +1,254 @@
[Eagle]
Version="04 16 00"
Platform="Windows"
Serial="6A196E6E8C-LS-W-1CS"
Globals="Globals"
Desktop="Desktop"
[Globals]
AutoSaveProject=1
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/19inch.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/40xx.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/41xx.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/45xx.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/74ac-logic.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/74ttl-din.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/74xx-eu.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/74xx-us.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/751xx.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/altera.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/am29-memory.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/amd-mach.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/analog-devices.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/ase.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/atmel.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/avr-1.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/axis.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/battery.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/burr-brown.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/busbar.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/buzzer.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/c-trimm.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/california-micro-devices.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/capacitor-wima.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/chipcard-siemens.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/con-3m.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/con-amp-champ.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/con-amp-micromatch.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/con-amp-mt.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/con-amp-quick.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/con-amp.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/con-amphenol.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/con-berg.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/con-chipcard-iso7816.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/con-coax.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/con-commcon.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/con-conrad.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/con-deutsch.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/con-dil.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/con-erni.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/con-faston.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/con-friwo.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/con-harting-h.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/con-harting-ml.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/con-harting-v.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/con-harting.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/con-hirschmann.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/con-jack.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/con-jst.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/con-lsta.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/con-lstb.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/con-lumberg.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/con-molex.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/con-neutrik_ag.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/con-omron.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/con-panduit.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/con-pc.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/con-pc104.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/con-phoenix-254.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/con-phoenix-500.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/con-phoenix-508.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/con-ptr500.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/con-rib.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/con-shiua-chyuan.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/con-subd.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/con-thomas-betts.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/con-vg.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/con-wago-500.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/con-wago-508.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/con-wago.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/con-wago255.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/con-weidmueller-sl35.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/con-yamaichi.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/crystal.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/cypress.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/dc-dc-converter.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/diode.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/display-hp.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/display-lcd.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/ecl.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/etx-board.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/exar.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/fiber-optic-hp.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/fiber-optic-siemens.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/fifo.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/fox-electronics.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/frames.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/fuse.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/heatsink.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/holes.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/ic-package.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/inductor-coilcraft.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/inductor-neosid.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/inductors.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/infineon-tricore.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/infineon.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/isd.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/jumper.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/lattice.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/led.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/linear-technology.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/linear.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/marks.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/maxim.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/memory-hitachi.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/memory-idt.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/memory-motorola-dram.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/memory-nec.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/memory-samsung.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/memory-sram.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/memory.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/micro-fujitsu.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/micro-harris.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/micro-intel.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/micro-mc68000.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/micro-motorola.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/micro-philips.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/micro-samsung.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/micro-siemens.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/microchip.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/micronas.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/motorola-sensor-driver.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/murata-filter.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/nec-lqfp100-pack.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/opto-honeywell-3000.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/opto-honeywell-4000.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/opto-honeywell.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/opto-micro-linear.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/opto-trans-siemens.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/opto-transmittter-hp.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/opto-vishay.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/optocoupler.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/pal.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/piher.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/pinhead.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/plcc-socket.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/pld-intel.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/plxtech.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/pot-vitrohm.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/pot-xicor.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/pot.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/ptc-ntc.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/rcl.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/rectifier.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/ref-packages.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/relay.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/resistor-bourns.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/resistor-dil.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/resistor-net.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/resistor-power.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/resistor-ruf.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/resistor-shunt.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/resistor-sil.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/rf-micro-devices.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/semicon-smd-ipc.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/sensor-heraeus.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/silabs.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/smd-ipc.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/smd-special.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/solpad.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/special-pad.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/special.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/st-microelectronics.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/supply1.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/supply2.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/switch-dil.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/switch-misc.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/switch-omron.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/switch.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/telcom.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/telefunken.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/testpad.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/texas.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/toshiba.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/trafo-siemens.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/trafo-xicon.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/trafo.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/transistor-fet.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/transistor-npn.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/transistor-pnp.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/transistor-power.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/transistor-small-signal.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/transistor.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/triac.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/tripas.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/tsop.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/uln-udn.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/v-reg-micrel.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/v-reg.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/varistor.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/wafer-scale-psd.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/wirepad.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/wuerth-elektronik.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/zetex.lbr"
UsedLibrary="C:/Programme/EAGLE-4.16/lbr/zilog.lbr"
[Win_1]
Type="Board Editor"
Loc="22 29 621 428"
State=1
Number=1
File="main.brd"
View="-39736 -27801 1627190 1018519"
WireWidths=" 0 2540 3048 6096 8128 10160 12700 14224 16764 17780 19304 21844 25400 38100 64516 4064"
PadDiameters=" 2540 3048 4064 6096 8128 10160 12700 14224 16764 17780 19304 21844 25400 38100 64516 0"
PadDrills=" 5000 6000 7000 9000 10000 11000 12000 13000 14000 15000 16000 20000 22000 28000 32000 8000"
ViaDiameters=" 2540 3048 4064 6096 8128 10160 12700 14224 16764 17780 19304 21844 25400 38100 64516 0"
ViaDrills=" 5000 7000 8000 9000 10000 11000 12000 13000 14000 15000 16000 20000 22000 28000 32000 6000"
HoleDrills=" 5000 7000 8000 9000 10000 11000 12000 13000 14000 15000 16000 20000 22000 28000 32000 6000"
TextSizes=" 2540 3048 4064 6096 8128 10160 12700 14224 16764 19304 21844 25400 38100 50800 64516 17780"
PolygonSpacings=" 2540 3048 4064 6096 8128 10160 14224 16764 17780 19304 21844 25400 38100 50800 64516 12700"
PolygonIsolates=" 2540 3048 4064 6096 8128 10160 12700 14224 16764 17780 19304 21844 25400 38100 64516 0"
MiterRadiuss=" 2540 3175 6350 12700 25400 10000 20000 25000 50000 75000 100000 0"
SmdSizes=" 3048 1524 4064 2032 6096 3048 8128 4064 10160 5080 12700 6604 14224 7112 16764 8128 17780 9144 19304 9652 21844 10668 25400 12700 38100 19304 50800 25400 64516 32512 12700 6350"
WireBend=0
WireBendSet=0
WireCap=1
MiterStyle=0
PadShape=0
ViaShape=0
PolygonPour=0
PolygonRank=1
PolygonThermals=1
PolygonOrphans=0
TextRatio=8
PinDirection=3
PinFunction=0
PinLength=2
PinVisible=3
SwapLevel=0
ArcDirection=0
AddLevel=2
PadsSameType=0
Layer=16
[Win_2]
Type="Control Panel"
Loc="66 87 665 486"
State=1
Number=0
[Desktop]
Screen="1680 1050"
Window="Win_1"
Window="Win_2"

BIN
eagle/main.brd Executable file

Binary file not shown.

46
eagle/main.mpd Executable file
View File

@ -0,0 +1,46 @@
//MPD-File
#ifndef(pack_C1) #declare global_pack_C1=yes; object {CAP_DIS_CERAMIC_25MM_50MM("1nF",)translate<0,0,0> rotate<0,0.000000,0>rotate<0,0.000000,0> rotate<0,0,0> translate<30.480000,0.000000,83.820000>}#end //ceramic disc capacitator C1 1nF C025-025X050
#ifndef(pack_C2) #declare global_pack_C2=yes; object {CAP_DIS_CERAMIC_25MM_50MM("100n",)translate<0,0,0> rotate<0,0.000000,0>rotate<0,-180.000000,0> rotate<0,0,0> translate<68.580000,0.000000,88.900000>}#end //ceramic disc capacitator C2 100n C025-025X050
#ifndef(pack_C3) #declare global_pack_C3=yes; object {CAP_DIS_CERAMIC_25MM_44MM("100n",)translate<0,0,0> rotate<0,0.000000,0>rotate<0,-180.000000,0> rotate<0,0,0> translate<144.780000,0.000000,88.900000>}#end //ceramic disc capacitator C3 100n C025-024X044
#ifndef(pack_C4) #declare global_pack_C4=yes; object {CAP_DIS_CERAMIC_25MM_50MM("100n",)translate<0,0,0> rotate<0,0.000000,0>rotate<0,-180.000000,0> rotate<0,0,0> translate<68.580000,0.000000,49.530000>}#end //ceramic disc capacitator C4 100n C025-025X050
#ifndef(pack_C5) #declare global_pack_C5=yes; object {CAP_DIS_CERAMIC_25MM_50MM("100n",)translate<0,0,0> rotate<0,0.000000,0>rotate<0,-180.000000,0> rotate<0,0,0> translate<144.780000,0.000000,49.530000>}#end //ceramic disc capacitator C5 100n C025-025X050
#ifndef(pack_C6) #declare global_pack_C6=yes; object {CAP_DIS_CERAMIC_25MM_50MM("100n",)translate<0,0,0> rotate<0,0.000000,0>rotate<0,-270.000000,0> rotate<0,0,0> translate<21.590000,0.000000,54.610000>}#end //ceramic disc capacitator C6 100n C025-025X050
#ifndef(pack_C9) #declare global_pack_C9=yes; object {CAP_DIS_CERAMIC_25MM_50MM("100n",)translate<0,0,0> rotate<0,0.000000,0>rotate<0,-270.000000,0> rotate<0,0,0> translate<102.870000,0.000000,10.160000>}#end //ceramic disc capacitator C9 100n C025-025X050
#ifndef(pack_CON_BUZZER) #declare global_pack_CON_BUZZER=yes; object {PH_1X2()translate<0,0,0> rotate<0,0.000000,0>rotate<0,-90.000000,0> rotate<0,0,0> translate<7.620000,0.000000,41.910000>}#end //Stiftleiste 2,54mm Raster 2Pin 1Reihe (pinhead.lib) CON_BUZZER 1X02
#ifndef(pack_CON_LEDSTATE) #declare global_pack_CON_LEDSTATE=yes; object {PH_2X3()translate<0,0,0> rotate<0,0.000000,0>rotate<0,-90.000000,0> rotate<0,0,0> translate<7.620000,0.000000,25.400000>}#end //Stiftleiste 2,54mm Raster 3Pin 2Reihen (pinhead.lib) CON_LEDSTATE 2X03
#ifndef(pack_CON_LEDTIME1) #declare global_pack_CON_LEDTIME1=yes; object {CON_DIS_WS16G()translate<0,0,0> rotate<0,180.000000,0>rotate<0,-270.000000,0> rotate<0,0,0> translate<106.680000,0.000000,76.200000>}#end //Wannenstecker 16Pin CON_LEDTIME1 ML16
#ifndef(pack_CON_LEDTIME2) #declare global_pack_CON_LEDTIME2=yes; object {CON_DIS_WS16G()translate<0,0,0> rotate<0,180.000000,0>rotate<0,-270.000000,0> rotate<0,0,0> translate<106.680000,0.000000,36.830000>}#end //Wannenstecker 16Pin CON_LEDTIME2 ML16
#ifndef(pack_CON_OUT) #declare global_pack_CON_OUT=yes; object {PH_1X2()translate<0,0,0> rotate<0,0.000000,0>rotate<0,-90.000000,0> rotate<0,0,0> translate<7.620000,0.000000,13.970000>}#end //Stiftleiste 2,54mm Raster 2Pin 1Reihe (pinhead.lib) CON_OUT 1X02
#ifndef(pack_CON_TASTER) #declare global_pack_CON_TASTER=yes; object {PH_2X4()translate<0,0,0> rotate<0,0.000000,0>rotate<0,-90.000000,0> rotate<0,0,0> translate<7.620000,0.000000,59.690000>}#end //Stiftleiste 2,54mm Raster 4Pin 2Reihen (pinhead.lib) CON_TASTER 2X04
#ifndef(pack_IC1) #declare global_pack_IC1=yes; object {IC_DIS_DIP16("4094N","ST",)translate<0,0,0> rotate<0,0.000000,0>rotate<0,-270.000000,0> rotate<0,0,0> translate<68.580000,0.000000,35.560000>translate<0,3.000000,0> }#end //DIP16 IC1 4094N DIL16
#ifndef(pack_IC1) object{SOCKET_DIP16()rotate<0,-270.000000,0> rotate<0,0,0> translate<68.580000,0.000000,35.560000>}#end //IC-Sockel 16Pin IC1 4094N
#ifndef(pack_IC5) #declare global_pack_IC5=yes; object {IC_DIS_DIP28("MEGA8-P","ATMEL",)translate<0,0,0> rotate<0,0.000000,0>rotate<0,-270.000000,0> rotate<0,0,0> translate<30.480000,0.000000,54.610000>translate<0,3.000000,0> }#end //DIP28 300mil IC5 MEGA8-P DIL28-3
#ifndef(pack_IC5) object{SOCKET_DIP28()rotate<0,-270.000000,0> rotate<0,0,0> translate<30.480000,0.000000,54.610000>}#end //IC-Sockel 28Pin IC5 MEGA8-P
#ifndef(pack_IC6) #declare global_pack_IC6=yes; object {IC_DIS_DIP16("ULN2003AN","PHILIPS",)translate<0,0,0> rotate<0,0.000000,0>rotate<0,-270.000000,0> rotate<0,0,0> translate<128.270000,0.000000,74.930000>translate<0,3.000000,0> }#end //DIP16 IC6 ULN2003AN DIL16
#ifndef(pack_IC6) object{SOCKET_DIP16()rotate<0,-270.000000,0> rotate<0,0,0> translate<128.270000,0.000000,74.930000>}#end //IC-Sockel 16Pin IC6 ULN2003AN
#ifndef(pack_IC7) #declare global_pack_IC7=yes; object {IC_DIS_DIP16("ULN2003AN","PHILIPS",)translate<0,0,0> rotate<0,0.000000,0>rotate<0,-270.000000,0> rotate<0,0,0> translate<85.090000,0.000000,74.930000>translate<0,3.000000,0> }#end //DIP16 IC7 ULN2003AN DIL16
#ifndef(pack_IC7) object{SOCKET_DIP16()rotate<0,-270.000000,0> rotate<0,0,0> translate<85.090000,0.000000,74.930000>}#end //IC-Sockel 16Pin IC7 ULN2003AN
#ifndef(pack_IC8) #declare global_pack_IC8=yes; object {IC_DIS_DIP16("ULN2003AN","PHILIPS",)translate<0,0,0> rotate<0,0.000000,0>rotate<0,-270.000000,0> rotate<0,0,0> translate<128.270000,0.000000,35.560000>translate<0,3.000000,0> }#end //DIP16 IC8 ULN2003AN DIL16
#ifndef(pack_IC8) object{SOCKET_DIP16()rotate<0,-270.000000,0> rotate<0,0,0> translate<128.270000,0.000000,35.560000>}#end //IC-Sockel 16Pin IC8 ULN2003AN
#ifndef(pack_IC9) #declare global_pack_IC9=yes; object {IC_DIS_DIP16("ULN2003AN","ST",)translate<0,0,0> rotate<0,0.000000,0>rotate<0,-270.000000,0> rotate<0,0,0> translate<85.090000,0.000000,35.560000>translate<0,3.000000,0> }#end //DIP16 IC9 ULN2003AN DIL16
#ifndef(pack_IC9) object{SOCKET_DIP16()rotate<0,-270.000000,0> rotate<0,0,0> translate<85.090000,0.000000,35.560000>}#end //IC-Sockel 16Pin IC9 ULN2003AN
#ifndef(pack_IC10) #declare global_pack_IC10=yes; object {TR_TO220_S("7805V",)translate<0,0,0> rotate<0,0.000000,0>rotate<0,0.000000,0> rotate<0,0,0> translate<91.440000,0.000000,13.970000>}#end //TO220 stehend IC10 7805V TO220V
#ifndef(pack_IC11) #declare global_pack_IC11=yes; object {IC_DIS_DIP16("4094N","ST",)translate<0,0,0> rotate<0,0.000000,0>rotate<0,-270.000000,0> rotate<0,0,0> translate<144.780000,0.000000,74.930000>translate<0,3.000000,0> }#end //DIP16 IC11 4094N DIL16
#ifndef(pack_IC11) object{SOCKET_DIP16()rotate<0,-270.000000,0> rotate<0,0,0> translate<144.780000,0.000000,74.930000>}#end //IC-Sockel 16Pin IC11 4094N
#ifndef(pack_IC12) #declare global_pack_IC12=yes; object {IC_DIS_DIP16("4094N","ST",)translate<0,0,0> rotate<0,0.000000,0>rotate<0,-270.000000,0> rotate<0,0,0> translate<68.580000,0.000000,74.930000>translate<0,3.000000,0> }#end //DIP16 IC12 4094N DIL16
#ifndef(pack_IC12) object{SOCKET_DIP16()rotate<0,-270.000000,0> rotate<0,0,0> translate<68.580000,0.000000,74.930000>}#end //IC-Sockel 16Pin IC12 4094N
#ifndef(pack_IC13) #declare global_pack_IC13=yes; object {IC_DIS_DIP16("4094N","ST",)translate<0,0,0> rotate<0,0.000000,0>rotate<0,-270.000000,0> rotate<0,0,0> translate<144.780000,0.000000,35.560000>translate<0,3.000000,0> }#end //DIP16 IC13 4094N DIL16
#ifndef(pack_IC13) object{SOCKET_DIP16()rotate<0,-270.000000,0> rotate<0,0,0> translate<144.780000,0.000000,35.560000>}#end //IC-Sockel 16Pin IC13 4094N
#ifndef(pack_ISP) #declare global_pack_ISP=yes; object {CON_DIS_WS10G()translate<0,0,0> rotate<0,180.000000,0>rotate<0,-270.000000,0> rotate<0,0,0> translate<48.260000,0.000000,15.240000>}#end //Wannenstecker 10Pin ISP ML10
#ifndef(pack_JP1) #declare global_pack_JP1=yes; object {PH_1X4()translate<0,0,0> rotate<0,0.000000,0>rotate<0,-90.000000,0> rotate<0,0,0> translate<7.620000,0.000000,72.390000>}#end //Stiftleiste 2,54mm Raster 4Pin 1Reihe (pinhead.lib) JP1 1X04
#ifndef(pack_Q1) #declare global_pack_Q1=yes; object {TR_TO92_G("BC547B",)translate<0,0,0> rotate<0,0.000000,0>rotate<0,0.000000,0> rotate<0,0,0> translate<30.480000,0.000000,11.430000>}#end //TO92 gewinckelt stehend Q1 BC547B TO92
#ifndef(pack_QG1) #declare global_pack_QG1=yes; object {SPC_XTAL_OSZ_DIP14("",)translate<0,0,0> rotate<0,0.000000,0>rotate<0,-90.000000,0> rotate<0,0,0> translate<16.510000,0.000000,40.640000>}#end //Quarzoszillator im DIP14 QG1 DIL14S
#ifndef(pack_R1) #declare global_pack_R1=yes; object {RES_DIS_0207_10MM(texture{pigment{DarkBrown}finish{phong 0.2}},texture{pigment{Black}finish{phong 0.2}},texture{pigment{Orange}finish{phong 0.2}},texture {T_Gold_5C finish{reflection 0.1}},)translate<0,0,0> rotate<0,0.000000,0>rotate<0,-180.000000,0> rotate<0,0,0> translate<30.480000,0.000000,78.740000>}#end //Diskreter Widerstand 0,3W 10MM Raster R1 10k 0207/10
#ifndef(pack_R30) #declare global_pack_R30=yes; object {RES_DIS_0207_10MM(texture{pigment{Gray45}finish{phong 0.2}},texture{pigment{Red*0.7}finish{phong 0.2}},texture{pigment{Black}finish{phong 0.2}},texture {T_Gold_5C finish{reflection 0.1}},)translate<0,0,0> rotate<0,0.000000,0>rotate<0,-180.000000,0> rotate<0,0,0> translate<30.480000,0.000000,22.860000>}#end //Diskreter Widerstand 0,3W 10MM Raster R30 82R 0207/10
#ifndef(pack_R31) #declare global_pack_R31=yes; object {RES_DIS_0207_10MM(texture{pigment{Gray45}finish{phong 0.2}},texture{pigment{Red*0.7}finish{phong 0.2}},texture{pigment{Black}finish{phong 0.2}},texture {T_Gold_5C finish{reflection 0.1}},)translate<0,0,0> rotate<0,0.000000,0>rotate<0,-180.000000,0> rotate<0,0,0> translate<30.480000,0.000000,27.940000>}#end //Diskreter Widerstand 0,3W 10MM Raster R31 82R 0207/10
#ifndef(pack_R32) #declare global_pack_R32=yes; object {RES_DIS_0207_10MM(texture{pigment{Gray45}finish{phong 0.2}},texture{pigment{Red*0.7}finish{phong 0.2}},texture{pigment{Black}finish{phong 0.2}},texture {T_Gold_5C finish{reflection 0.1}},)translate<0,0,0> rotate<0,0.000000,0>rotate<0,-180.000000,0> rotate<0,0,0> translate<30.480000,0.000000,33.020000>}#end //Diskreter Widerstand 0,3W 10MM Raster R32 82R 0207/10
#ifndef(pack_R33) #declare global_pack_R33=yes; object {RES_DIS_0207_10MM(texture{pigment{Red*0.7}finish{phong 0.2}},texture{pigment{Red*0.7}finish{phong 0.2}},texture{pigment{Red*0.7}finish{phong 0.2}},texture {T_Gold_5C finish{reflection 0.1}},)translate<0,0,0> rotate<0,0.000000,0>rotate<0,0.000000,0> rotate<0,0,0> translate<30.480000,0.000000,17.780000>}#end //Diskreter Widerstand 0,3W 10MM Raster R33 2K2 0207/10
#ifndef(pack_RN1) #declare global_pack_RN1=yes; object {RES_DIS_SIL_12("",)translate<0,0,0> rotate<0,0.000000,0>rotate<0,-270.000000,0> rotate<0,0,0> translate<97.790000,0.000000,76.200000>}#end //SIL-Netzwerk 12Pin RN1 SIL12
#ifndef(pack_RN2) #declare global_pack_RN2=yes; object {RES_DIS_SIL_12("",)translate<0,0,0> rotate<0,0.000000,0>rotate<0,-270.000000,0> rotate<0,0,0> translate<115.570000,0.000000,76.200000>}#end //SIL-Netzwerk 12Pin RN2 SIL12
#ifndef(pack_RN3) #declare global_pack_RN3=yes; object {RES_DIS_SIL_12("",)translate<0,0,0> rotate<0,0.000000,0>rotate<0,-270.000000,0> rotate<0,0,0> translate<115.570000,0.000000,36.830000>}#end //SIL-Netzwerk 12Pin RN3 SIL12
#ifndef(pack_RN4) #declare global_pack_RN4=yes; object {RES_DIS_SIL_12("",)translate<0,0,0> rotate<0,0.000000,0>rotate<0,-270.000000,0> rotate<0,0,0> translate<97.790000,0.000000,36.830000>}#end //SIL-Netzwerk 12Pin RN4 SIL12

BIN
eagle/main.sch Executable file

Binary file not shown.

BIN
graphics/display.jpg Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 414 KiB

1990
graphics/display.pov Executable file

File diff suppressed because it is too large Load Diff

BIN
graphics/main.jpg Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 397 KiB

5664
graphics/main.pov Executable file

File diff suppressed because it is too large Load Diff

50
software/Makefile Normal file
View File

@ -0,0 +1,50 @@
# $Id: Makefile,v 1.1 2007/01/02 21:30:40 rschaten Exp $
# microcontroller settings
F_CPU = 1600000
MCU = atmega8
AVRDUDE = avrdude -p $(MCU) -P /dev/tts/USB0 -b 115200 -c avr109
#AVRDUDE = avrdude -p $(MCU) -P /dev/tts/USB0 -b 19200 -c avr109
COMPILE = avr-gcc -Wall -Os -I../common -I. -mmcu=$(MCU) -DF_CPU=$(F_CPU) #-DDEBUG_LEVEL=2
OBJECTS = dcftime.o main.o display.o utils.o
# symbolic targets:
all: main.hex
.c.o:
$(COMPILE) -c $< -o $@
.S.o:
$(COMPILE) -x assembler-with-cpp -c $< -o $@
# "-x assembler-with-cpp" should not be necessary since this is the default
# file type for the .S (with capital S) extension. However, upper case
# characters are not always preserved on Windows. To ensure WinAVR
# compatibility define the file type manually.
.c.s:
$(COMPILE) -S $< -o $@
program: all
$(AVRDUDE) -U flash:w:main.hex
clean:
rm -f main.hex main.lst main.obj main.cof main.list main.map main.eep.hex main.bin *.o main.s
# file targets:
main.bin: $(OBJECTS)
$(COMPILE) -o main.bin $(OBJECTS)
main.hex: main.bin
rm -f main.hex main.eep.hex
avr-objcopy -j .text -j .data -O ihex main.bin main.hex
disasm: main.bin
avr-objdump -d main.bin
cpp:
$(COMPILE) -E main.c

33
software/boole.h Normal file
View File

@ -0,0 +1,33 @@
#ifndef BOOLE_H
#define BOOLE_H
/**
* \file boole.h
* \brief Simple boolean variables
* \author Thomas Stegemann
* \version $Id: boole.h,v 1.1 2007/01/02 21:30:40 rschaten Exp $
*
* License: See documentation.
*/
enum boolean_enum { False = 0, True = 1 };
typedef enum boolean_enum boolean;
static inline boolean boole(int test) {
if (test == 0) {
return False;
} else {
return True;
}
}
static inline const char *boolean_name(boolean value) {
if (value == False) {
return "false";
} else {
return "true";
}
}
#endif

30
software/common.h Normal file
View File

@ -0,0 +1,30 @@
#ifndef COMMON_H
#define COMMON_H
#define KEYS_PORT PORTD
#define KEYS_PIN PIND
#define KEYS_DDR DDRD
#define KEYS_KEY1 PD2 // UP / usw
#define KEYS_KEY2 PD3 // SELECT / usw
#define KEYS_KEY3 PD4 // DOWN / usw
#define KEYS_KEY4 PD5 // SNOOZE / (Taster Oben drauf)
#define LEDS_PORT PORTB
#define LEDS_PIN PINB
#define LEDS_DDR DDRB
#define LEDS_LED1 PB0 // Rot
#define LEDS_LED2 PB1 // Blau, Zeigt DCF Signal
#define LEDS_LED3 PB2 // Rot
#define DCF_PORT PORTD
#define DCF_PIN PIND
#define DCF_DDR DDRD
#define DCF_INPUT PD0 // Input Pin vom DCF Empfaenger
#endif
// vim:ts=4

444
software/dcftime.c Normal file
View File

@ -0,0 +1,444 @@
/**
* \file dcftime.c
* \brief Decoder for DCF-77 time signals
* \author Ronald Schaten & Thomas Stegemann
* \version $Id: dcftime.c,v 1.1 2007/01/02 21:30:40 rschaten Exp $
*
* License: See documentation.
*/
#include "boole.h"
#include "dcftime.h"
// TODO: define and use meaningful states for certain situations (valid time, no values received, etc.)
// TODO: find correct start of the seconds. ATM the clock is running late by one second
// TODO: check if it is possible to give DCF_RATE as parameter for init()
typedef unsigned int dcf_sample; /**< number of the current sample */
typedef unsigned int dcf_sizetype; /**< used for the size of a month */
const dcf_sample dcf_second_samples = (DCF_RATE); /**< number of samples per second */
/** dcf signal between 30ms and 130ms => dcf logic false (lower value) */
const dcf_sample dcf_logic_false_min = (DCF_RATE)*3/100;
/** dcf signal between 30ms and 130ms => dcf logic false (upper value) */
const dcf_sample dcf_logic_false_max = (DCF_RATE)*13/100;
/** dcf signal between 140ms and 230ms => dcf logic true (lower value) */
const dcf_sample dcf_logic_true_min = (DCF_RATE)*14/100;
/** dcf signal between 140ms and 230ms => dcf logic true (upper value) */
const dcf_sample dcf_logic_true_max = (DCF_RATE)*23/100;
/** duration between begin of dcf second (== begin of signal), should be 1 * second +/- 3% (lower value) */
const dcf_sample dcf_second_tolerance_min = (DCF_RATE) - (DCF_RATE)*3/100;
/** duration between begin of dcf second (== begin of signal), should be 1 * second +/- 3% (upper value) */
const dcf_sample dcf_second_tolerance_max = (DCF_RATE) + (DCF_RATE)*3/100;
/** definition of logical signal states */
enum dcf_logic_signal_enum {
dcf_signal_no, /**< no signal */
dcf_signal_false, /**< 'false' signal */
dcf_signal_true, /**< 'true' signal */
dcf_signal_invalid /**< invalid signal */
};
/** definition of logical signal states */
typedef enum dcf_logic_signal_enum dcf_logic_signal;
/** format of the received data, filled during reception */
struct dcf_receiving_data_struct {
dcf_date date; /**< date */
dcf_time time; /**< time */
boolean parity; /**< parity of the received data */
boolean is_valid; /**< data is valid */
dcf_logic_signal current_signal; /**< logical state of the received data */
dcf_sample low_samples; /**< counts low signal samples per second */
dcf_sample high_samples; /**< counts high signal samples per second */
};
/** definition of the received data, filled during reception */
typedef struct dcf_receiving_data_struct dcf_receiving_data;
/** format of the DCF data.
* dcf_current_datetime() and dcf_sample() may be called from different contexts. To avoid changing the current_datetime while it is read:
* if use_first_current_datetime is true: dcf_current_datetime reads current_datetime[0] and dcf_sample changes current_datetime[1]
* if use_first_current_datetime is false: vice versa
*/
struct dcf_data_struct {
dcf_datetime current_datetime[2]; /**< two full datasets */
boolean use_first_current_datetime; /**< flag if the first or the second dataset is used */
dcf_sample current_datetime_sample; /**< number of the current sample */
dcf_receiving_data receiving_data; /**< data being filled */
};
/*
global data
*/
static struct dcf_data_struct dcf_data; /**< full set of received dcf data */
/*
dcf_time
*/
/**
* Initialize a dcf_time value.
* \param pTime: pointer to a dcf_time variable
*/
static void dcf_time_init(dcf_time * pTime) {
pTime->second = 0;
pTime->minute = 0;
pTime->hour = 0;
pTime->is_dst = False;
}
/**
* Increment a time-value by one second.
* \param pTime: pointer to a dcf_time variable
* \return True if the date has to be incremented, too. Otherwise False.
*/
static boolean dcf_time_inc(dcf_time * pTime) {
++(pTime->second);
if (pTime->second == 60) {
pTime->second = 0;
++(pTime->minute);
if (pTime->minute == 60) {
pTime->minute = 0;
++(pTime->hour);
if (pTime->hour == 24) {
pTime->hour = 0;
return True; /* overflow => increment date */
}
}
}
return False;
}
/**
* Check if a time-value makes sense.
* \param pTime: pointer to a dcf_time variable
* \return True if the time is logically correct. Otherwise False.
*/
static boolean dcf_time_is_valid(dcf_time * pTime) {
return (pTime->second <= 60)
&& (pTime->minute <= 60)
&& (pTime->hour <= 24);
}
/*
dcf_date
*/
/**
* Initialize a dcf_date value.
* \param pDate: pointer to a dcf_date variable
*/
static void dcf_date_init(dcf_date * pDate) {
pDate->dayofweek = dcf_sunday;
pDate->dayofmonth = 1;
pDate->month = dcf_january;
pDate->year = 0;
}
/**
* Calculate the number of days in a month.
* \param pDate: pointer to a dcf_time variable
* \return The number of days in the given month.
*/
static dcf_sizetype dcf_date_days_in_month(dcf_date * pDate) {
switch (pDate->month) {
case dcf_february:
if (pDate->year % 4 != 0)
return 28; /* year not divisible by 4 */
else if (pDate->year != 0)
return 29; /* year divisible by 4 and not divisible by 100 */
else if (((pDate->dayofmonth % 7) + 1) != pDate->dayofweek)
return 28; /* year divisible by 100 and not divisible by 400 */
else
return 29; /* year divisible by 400 */
/*
if year is divisble by 400 (eg year 2000) the 1st february is a tuesday (== 2 (== 1+1))
if year divided by 400 remains 100 1st February is a monday
if year divided by 400 remains 200 1st February is a saturday
if year divided by 400 remains 300 1st February is a thursday
this repeats every 400 years, because 400 year are 3652425/25 day
which is 7*521775/25, therefore divisible by 7
which means every 400 years the day of week are the same
! dayofmonth and dayofweek must be synchronized to get the right value
*/
case dcf_april:
case dcf_june:
case dcf_september:
case dcf_november:
return 30;
default:
return 31;
}
}
/**
* Increment a date-value by one day.
* \param pDate: pointer to a dcf_date variable
*/
static void dcf_date_inc(dcf_date * pDate) {
++(pDate->dayofweek);
if (pDate->dayofweek == 8) {
pDate->dayofweek = 1;
}
++(pDate->dayofmonth);
if (pDate->dayofmonth == (dcf_date_days_in_month(pDate) + 1)) {
pDate->dayofmonth = 1;
++(pDate->month);
if (pDate->month == 13) {
pDate->month = 1;
++(pDate->year);
if (pDate->year == 100) {
pDate->year = 0;
}
}
}
}
/**
* Check if a date-value makes sense.
* \param pDate: pointer to a dcf_date variable
* \return True if the date is logically correct. Otherwise False.
*/
static boolean dcf_date_is_valid(dcf_date * pDate) {
return (1 <= pDate->dayofweek)
&& (pDate->dayofweek <= 7)
&& (1 <= pDate->dayofmonth)
&& (pDate->dayofmonth <= dcf_date_days_in_month(pDate))
&& (1 <= pDate->month)
&& (pDate->month <= 12)
&& (pDate->year <= 99);
}
/*
dcf_datetime
*/
/**
* Initialize a dcf_datetime value.
* \param pDatetime: pointer to a dcf_datetime variable
*/
static void dcf_datetime_init(dcf_datetime * pDatetime) {
pDatetime->is_valid = False;
pDatetime->has_signal = False;
dcf_time_init(&(pDatetime->time));
dcf_date_init(&(pDatetime->date));
}
/**
* Increment a datetime-value by one second.
* \param pDatetime: pointer to a dcf_datetime variable
*/
static void dcf_datetime_inc(dcf_datetime * pDatetime) {
if (dcf_time_inc(&(pDatetime->time))) {
dcf_date_inc(&(pDatetime->date));
}
}
/*
dcf_receiving_data
*/
/**
* Initialize a dcf_receiving_data value.
* \param pReceive: pointer to a dcf_receiving_data variable
*/
static void dcf_receiving_data_init(dcf_receiving_data * pReceive) {
pReceive->current_signal = dcf_signal_no;
pReceive->parity = False;
pReceive->is_valid = True;
pReceive->low_samples = 0;
pReceive->high_samples = 0;
dcf_time_init(&(pReceive->time));
dcf_date_init(&(pReceive->date));
}
/**
* Calculate the time and date while the bits are received.
* \param signal: True if the received bit is 200ms, False if the bit is 100ms.
*/
static void dcf_logic(boolean signal) {
dcf_data.receiving_data.parity ^= signal;
switch (dcf_data.receiving_data.time.second) {
case 16: dcf_data.receiving_data.parity = True; break;
case 17: dcf_data.receiving_data.time.is_dst = signal; break;
case 18: if(dcf_data.receiving_data.parity) dcf_data.receiving_data.is_valid = False; break;
case 19: dcf_data.receiving_data.parity = True; break;
case 20: if(!signal) dcf_data.receiving_data.is_valid = False; break;
case 21: dcf_data.receiving_data.time.minute = signal ? 1 : 0; break;
case 22: dcf_data.receiving_data.time.minute += signal ? 2 : 0; break;
case 23: dcf_data.receiving_data.time.minute += signal ? 4 : 0; break;
case 24: dcf_data.receiving_data.time.minute += signal ? 8 : 0; break;
case 25: dcf_data.receiving_data.time.minute += signal ? 10 : 0; break;
case 26: dcf_data.receiving_data.time.minute += signal ? 20 : 0; break;
case 27: dcf_data.receiving_data.time.minute += signal ? 40 : 0; break;
case 28: if(dcf_data.receiving_data.parity) dcf_data.receiving_data.is_valid = False; break;
case 29: dcf_data.receiving_data.time.hour = signal ? 1 : 0; break;
case 30: dcf_data.receiving_data.time.hour += signal ? 2 : 0; break;
case 31: dcf_data.receiving_data.time.hour += signal ? 4 : 0; break;
case 32: dcf_data.receiving_data.time.hour += signal ? 8 : 0; break;
case 33: dcf_data.receiving_data.time.hour += signal ? 10 : 0; break;
case 34: dcf_data.receiving_data.time.hour += signal ? 20 : 0; break;
case 35: if(dcf_data.receiving_data.parity) dcf_data.receiving_data.is_valid = False; break;
case 36: dcf_data.receiving_data.date.dayofmonth = signal ? 1 : 0; break;
case 37: dcf_data.receiving_data.date.dayofmonth += signal ? 2 : 0; break;
case 38: dcf_data.receiving_data.date.dayofmonth += signal ? 4 : 0; break;
case 39: dcf_data.receiving_data.date.dayofmonth += signal ? 8 : 0; break;
case 40: dcf_data.receiving_data.date.dayofmonth += signal ? 10 : 0; break;
case 41: dcf_data.receiving_data.date.dayofmonth += signal ? 20 : 0; break;
case 42: dcf_data.receiving_data.date.dayofweek = signal ? 1 : 0; break;
case 43: dcf_data.receiving_data.date.dayofweek += signal ? 2 : 0; break;
case 44: dcf_data.receiving_data.date.dayofweek += signal ? 4 : 0; break;
case 45: dcf_data.receiving_data.date.month = signal ? 1 : 0; break;
case 46: dcf_data.receiving_data.date.month += signal ? 2 : 0; break;
case 47: dcf_data.receiving_data.date.month += signal ? 4 : 0; break;
case 48: dcf_data.receiving_data.date.month += signal ? 8 : 0; break;
case 49: dcf_data.receiving_data.date.month += signal ? 10 : 0; break;
case 50: dcf_data.receiving_data.date.year = signal ? 1 : 0; break;
case 51: dcf_data.receiving_data.date.year += signal ? 2 : 0; break;
case 52: dcf_data.receiving_data.date.year += signal ? 4 : 0; break;
case 53: dcf_data.receiving_data.date.year += signal ? 8 : 0; break;
case 54: dcf_data.receiving_data.date.year += signal ? 10 : 0; break;
case 55: dcf_data.receiving_data.date.year += signal ? 20 : 0; break;
case 56: dcf_data.receiving_data.date.year += signal ? 40 : 0; break;
case 57: dcf_data.receiving_data.date.year += signal ? 80 : 0; break;
case 58: if(dcf_data.receiving_data.parity) dcf_data.receiving_data.is_valid = False; break;
}
++(dcf_data.receiving_data.time.second);
}
/**
* Copy the values from receiving_data to current_datetime.
*/
static void dcf_store(void) {
if ((dcf_data.receiving_data.is_valid)
&& dcf_time_is_valid(&(dcf_data.receiving_data.time))
&& dcf_date_is_valid(&(dcf_data.receiving_data.date))) {
dcf_data.current_datetime_sample = 0;
if (dcf_data.use_first_current_datetime) {
dcf_data.current_datetime[1].time = dcf_data.receiving_data.time;
dcf_data.current_datetime[1].date = dcf_data.receiving_data.date;
dcf_data.current_datetime[1].is_valid = True;
dcf_data.use_first_current_datetime = False;
} else {
dcf_data.current_datetime[0].time = dcf_data.receiving_data.time;
dcf_data.current_datetime[0].date = dcf_data.receiving_data.date;
dcf_data.current_datetime[0].is_valid = True;
dcf_data.use_first_current_datetime = True;
}
}
}
/**
* Copy valid time and increment it.
*/
static void dcf_inc(void) {
if (dcf_data.use_first_current_datetime) {
dcf_data.current_datetime[1] = dcf_data.current_datetime[0];
dcf_datetime_inc(&(dcf_data.current_datetime[1]));
dcf_data.use_first_current_datetime = False;
} else {
dcf_data.current_datetime[0] = dcf_data.current_datetime[1];
dcf_datetime_inc(&(dcf_data.current_datetime[0]));
dcf_data.use_first_current_datetime = True;
}
}
/*
exported functions, documented in header file
*/
void dcf_init(void) {
dcf_data.use_first_current_datetime = True;
dcf_data.current_datetime_sample = 0;
dcf_datetime_init(&(dcf_data.current_datetime[0]));
dcf_datetime_init(&(dcf_data.current_datetime[1]));
dcf_receiving_data_init(&(dcf_data.receiving_data));
}
void dcf_signal(boolean signal) {
if (dcf_data.receiving_data.low_samples > dcf_second_samples) {
if (dcf_data.receiving_data.time.second == 59) {
dcf_data.receiving_data.time.second = 0;
dcf_store();
} else {
dcf_data.receiving_data.time.second = 0;
}
dcf_data.receiving_data.low_samples = 0;
dcf_data.receiving_data.is_valid = True;
}
/* calculate receiving date time */
if (signal) {
dcf_data.receiving_data.low_samples = 0;
++(dcf_data.receiving_data.high_samples);
} else {
++(dcf_data.receiving_data.low_samples);
if (dcf_data.receiving_data.high_samples == 0) {
} else if (dcf_data.receiving_data.high_samples < dcf_logic_false_min) {
/* too short signal */
dcf_data.receiving_data.is_valid = False;
dcf_data.receiving_data.current_signal = dcf_signal_invalid;
} else if (dcf_data.receiving_data.high_samples < dcf_logic_false_max) {
/* short signal, logic 0 */
dcf_logic(False);
dcf_data.receiving_data.current_signal = dcf_signal_false;
} else if (dcf_data.receiving_data.high_samples < dcf_logic_true_min) {
/* signal cannot be assigned to true or false */
dcf_data.receiving_data.is_valid = False;
dcf_data.receiving_data.current_signal = dcf_signal_invalid;
} else if (dcf_data.receiving_data.high_samples < dcf_logic_true_max) {
/* long signal, logic 1 */
dcf_logic(True);
dcf_data.receiving_data.current_signal = dcf_signal_true;
} else {
/* too long signal */
dcf_data.receiving_data.is_valid = False;
dcf_data.receiving_data.current_signal = dcf_signal_invalid;
}
dcf_data.receiving_data.high_samples = 0;
}
/* calculate current date time */
++(dcf_data.current_datetime_sample);
if (dcf_data.current_datetime_sample == dcf_second_samples) {
dcf_data.current_datetime_sample = 0;
dcf_inc();
}
}
dcf_datetime dcf_current_datetime(void) {
if (dcf_data.use_first_current_datetime) {
dcf_data.current_datetime[0].has_signal = dcf_data.receiving_data.is_valid;
return dcf_data.current_datetime[0];
} else {
dcf_data.current_datetime[1].has_signal = dcf_data.receiving_data.is_valid;
return dcf_data.current_datetime[1];
}
}
const char *dcf_dayofweek_name(dcf_dayofweek dow) {
switch (dow) {
case 1:
return "Mo";
case 2:
return "Tu";
case 3:
return "We";
case 4:
return "Th";
case 5:
return "Fr";
case 6:
return "Sa";
case 7:
return "Su";
default:
return "??";
}
}
const char *dcf_is_dst_name(dcf_is_dst dst) {
if (dst) {
return "ST";
} else {
return "WT";
}
}

127
software/dcftime.h Normal file
View File

@ -0,0 +1,127 @@
#ifndef DCFTIME_H
#define DCFTIME_H
/**
* \file dcftime.h
* \brief Decoder for DCF-77 time signals
* \author Ronald Schaten & Thomas Stegemann
* \version $Id: dcftime.h,v 1.1 2007/01/02 21:30:40 rschaten Exp $
*
* License: See documentation.
*/
#include "boole.h"
/*
dcf-signal samples per second
*/
#ifndef DCF_RATE
#define DCF_RATE 200 /**< number of samples per second. dcf_signal() should be called this often */
#endif
#if (DCF_RATE < 100) || (250 < DCF_RATE)
#error DCF_RATE should be between 100 and 250
#endif
typedef unsigned int dcf_second; /**< seconds (0-59) */
typedef unsigned int dcf_minute; /**< minutes (0-59) */
typedef unsigned int dcf_hour; /**< hours (0-24) */
typedef unsigned int dcf_dayofmonth; /**< day of month (1-31) */
typedef unsigned int dcf_year; /**< year (0-99) */
typedef boolean dcf_is_dst; /**< daylight saving: True: MESZ, False: MEZ */
/** definition of weekdays */
enum dcf_dayofweek_enum {
dcf_monday = 1, /**< monday = 1 */
dcf_tuesday, /**< tuesday */
dcf_wednesday, /**< wednesday */
dcf_thursday, /**< thursday */
dcf_friday, /**< friday */
dcf_saturday, /**< saturday */
dcf_sunday, /**< sunday = 7 */
};
/** definition of weekdays */
typedef enum dcf_dayofweek_enum dcf_dayofweek;
/** definition of months */
enum dcf_month_enum {
dcf_january = 1, /**< january = 1 */
dcf_february, /**< february */
dcf_march, /**< march */
dcf_april, /**< april */
dcf_may, /**< may */
dcf_june, /**< june */
dcf_july, /**< july */
dcf_august, /**< august */
dcf_september, /**< september */
dcf_october, /**< october */
dcf_november, /**< november */
dcf_december /**< december = 12 */
};
/** definition of months */
typedef enum dcf_month_enum dcf_month;
/** format of the dcf_time */
struct dcf_time_struct {
dcf_second second; /**< seconds */
dcf_minute minute; /**< minutes */
dcf_hour hour; /**< hours */
dcf_is_dst is_dst; /**< daylight saving time */
};
/** definition of dcf_time */
typedef struct dcf_time_struct dcf_time;
/** format of the dcf_date */
struct dcf_date_struct {
dcf_dayofweek dayofweek; /**< day of week */
dcf_dayofmonth dayofmonth; /**< day of month */
dcf_month month; /**< month */
dcf_year year; /**< year */
};
/** definition of dcf_date */
typedef struct dcf_date_struct dcf_date;
/** format of the dcf_datetime */
struct dcf_datetime_struct {
dcf_time time; /**< the time */
dcf_date date; /**< the time */
boolean is_valid; /**< if is_valid is False: no complete signal received, do not use date and times */
boolean has_signal; /**< if has_signal is True: currently receiving signal */
};
/** definition of dcf_datetime */
typedef struct dcf_datetime_struct dcf_datetime;
/**
* Initialize the DCF-module. Call dcf_init before any other DCF function.
*/
void dcf_init(void);
/**
* Tell the DCF-module if the signal is high or low. This function decides if
* the received bit is a long or a short one, and if it is usable at all. It
* should be called regularly, the number of calls per second is defined in
* DCF_RATE.
* \param signal: True if the input signal is high, False if it is low.
*/
void dcf_signal(boolean signal);
/**
* Fetch the current date and time.
* \return The current date and time in a dcf_datetime structure
*/
dcf_datetime dcf_current_datetime(void);
/**
* Get the name of the current weekday.
* \param dow: Day of the current week. Monday = 1, tuesday = 2...
* \return Pointer to the name
*/
const char* dcf_dayofweek_name(dcf_dayofweek dow);
/**
* Get the name of the current daylight saving time (summertime, wintertime).
* \param dst: daylight saving time bit from the time signal
* \return Pointer to the name
*/
const char* dcf_is_dst_name(dcf_is_dst dst);
#endif

94
software/display.c Normal file
View File

@ -0,0 +1,94 @@
#include <avr/io.h>
#include "display.h"
void Clock(void) {
D_PORT |= _BV(D_CLK);
D_PORT &= ~_BV(D_CLK);
}
void Strobe(void) {
D_PORT |= _BV(D_STR);
D_PORT &= ~_BV(D_STR);
}
void ShowNumber(uint8_t line1, uint8_t line2, uint8_t line3, uint8_t line4) {
uint8_t bit;
for(bit=0;bit<BITCOUNT;bit++) {
if( (line1 & _BV(bit)) == _BV(bit) ) {
D_PORT |= _BV(D_D1);
}
else {
D_PORT &= ~_BV(D_D1);
}
if( (line2 & _BV(bit)) == _BV(bit) ) {
D_PORT |= _BV(D_D2);
}
else {
D_PORT &= ~_BV(D_D2);
}
if( (line3 & _BV(bit)) == _BV(bit) ) {
D_PORT |= _BV(D_D3);
}
else {
D_PORT &= ~_BV(D_D3);
}
if( (line4 & _BV(bit)) == _BV(bit) ) {
D_PORT |= _BV(D_D4);
}
else {
D_PORT &= ~_BV(D_D4);
}
Clock();
}
Strobe();
}
void convertTime(uint8_t hour, uint8_t minute, uint8_t second, uint8_t* data)
{ /*{{{*/
/* input and output */
uint8_t hms[] = {hour, minute, second};
/* loop counter vars */
uint8_t i, j;
/* array which contains our splitted time later */
uint8_t time[] = {0, 0, 0, 0, 0, 0};
/* depending on how to read the display */
uint8_t rowpow[] = {8, 4, 2, 1};
uint8_t colpow[] = {32, 16, 8, 4, 2, 1};
/* initialize timeline array with zero */
for (i=0; i < 4; i++){
data[i] = 0;
}
/* fill time array */
for (i = 0; i < 3; i++) {
uint8_t unit = hms[i];
uint8_t ten = 0;
while (unit >= 10) {
unit -= 10;
ten++;
}
time[i*2] = ten;
time[i*2+1] = unit;
}
/* fill rows array */
for (i = 0; i < 4; i++) {
uint8_t power = rowpow[i];
for (j = 0; j < 6; j++) {
if ((time[j] & power) > 0) {
data[i] += colpow[j];
}
}
}
} /*}}}*/
// vim:ts=4

27
software/display.h Normal file
View File

@ -0,0 +1,27 @@
#ifndef DISPLAY_H
#define DISPLAY_H
#define BITCOUNT 6
#define D_PORT PORTC
#define D_PIN PINC
#define D_DDR DDRC
#define D_CLK PC0
#define D_STR PC1
#define D_D1 PC2
#define D_D2 PC3
#define D_D3 PC4
#define D_D4 PC5
void Clock(void);
void Strobe(void);
void ShowNumber(uint8_t line1, uint8_t line2, uint8_t line3, uint8_t line4);
//void convertTime(uint8_t hour, unsigned char minute, unsigned char second);
void convertTime(uint8_t hour, unsigned char minute, unsigned char second, uint8_t* data);
#endif
// vim:ts=4

180
software/main.c Normal file
View File

@ -0,0 +1,180 @@
#include <avr/io.h>
#include <avr/interrupt.h>
#include "common.h"
#include "dcftime.h"
#include "display.h"
#include "utils.h"
#define BRIGHTNESS 8
#define KEY_PRESS_THRESHOLD 100
#define MAX_DISPLAY_MODE 2
int main(void) {
TCCR1B |= _BV(WGM12) | _BV(CS11) | _BV(CS10) ; // CTC Mode for Timer 1 (16Bit) with prescale of 64
OCR1A = 250; // Dataload 250
TIMSK = _BV(OCIE1A);
// LED PINs as output
LEDS_DDR = _BV(LEDS_LED1) | _BV(LEDS_LED2) | _BV(LEDS_LED3);
// Display PINs as output
D_DDR = _BV(D_CLK) | _BV(D_STR) | _BV(D_D1) | _BV(D_D2) | _BV(D_D3) | _BV(D_D4);
// All pins low
D_PORT = 0;
// DCF PIN as Input
DCF_DDR &= ~_BV(DCF_INPUT);
// KEY PORTS as Input
KEYS_DDR &= ~( _BV(KEYS_KEY1) | _BV(KEYS_KEY2) | _BV(KEYS_KEY3) | _BV(KEYS_KEY4) );
KEYS_PORT |= _BV(KEYS_KEY1) | _BV(KEYS_KEY2) | _BV(KEYS_KEY3) | _BV(KEYS_KEY4);
// Switch LEDs off
LEDS_PORT &= ~( _BV(LEDS_LED1) | _BV(LEDS_LED2) | _BV(LEDS_LED3) );
/* show display check */
checkUpDisplay();
/* initialize DCF77 */
dcf_init();
/* enable interrupts */
sei();
while(1){
}
return(0);
}
SIGNAL(TIMER1_COMPA_vect) {
static uint8_t counter = 0;
static uint8_t brightnessCounter = 0;
static uint8_t ticker = 0;
static uint8_t data[] = {0,0,0,0};
static uint8_t displayMode = 0;
static uint8_t displayDateMode = 0;
static uint8_t displaySwitchCounter =0;
static uint8_t keyOnePressed = 0, keyTwoPressed = 0, keyThreePressed = 0;
static uint8_t keyOneCounter = 0, keyTwoCounter = 0, keyThreeCounter = 0;
static dcf_datetime datetime = { .is_valid=False }; /** takes the current time and date */
ticker++;
if((KEYS_PIN & _BV(KEYS_KEY1)) == 0 ){
if(keyOneCounter < KEY_PRESS_THRESHOLD) {
keyOneCounter++;
}
}
else{
if(keyOneCounter != 0){
keyOneCounter--;
}
}
if((KEYS_PIN & _BV(KEYS_KEY3)) == 0 ){
if(keyThreeCounter < KEY_PRESS_THRESHOLD) {
keyThreeCounter++;
}
}
else{
if(keyThreeCounter != 0){
keyThreeCounter--;
}
}
keyOnePressed = keyOneCounter + 50 >= KEY_PRESS_THRESHOLD;
keyTwoPressed = keyTwoCounter + 50 >= KEY_PRESS_THRESHOLD;
keyThreePressed = keyThreeCounter + 50 >= KEY_PRESS_THRESHOLD;
if( counter == 4 ){
counter=0;
dcf_signal(DCF_PIN & _BV(DCF_INPUT));
}
else{
counter++;
}
if(ticker == 250){
ticker = 0;
datetime = dcf_current_datetime();
if(keyOnePressed & !(keyTwoCounter || keyThreePressed)){
if(displayMode > 0){
displayMode--;
}
else{
displayMode = MAX_DISPLAY_MODE;
}
}
if(keyThreePressed & !(keyOneCounter || keyTwoPressed)){
if(displayMode < MAX_DISPLAY_MODE){
displayMode++;
}
else{
displayMode = 0;
}
}
switch(displayMode){
case 0:
convertTime((uint8_t)datetime.time.hour, (uint8_t)datetime.time.minute, (uint8_t)datetime.time.second,data);
displayDateMode = 0;
displaySwitchCounter = 0;
break;
case 1:
convertTime((uint8_t)datetime.date.dayofmonth, (uint8_t)datetime.date.month, (uint8_t)datetime.date.year,data);
displayDateMode = 0;
displaySwitchCounter = 0;
break;
case 2:
data[0] = (uint8_t)datetime.time.hour;
data[1] = (uint8_t)datetime.time.minute;
data[2] = (uint8_t)datetime.time.second,data;
if(displaySwitchCounter == 20 ){
displaySwitchCounter = 0;
if(displayDateMode == 3){
displayDateMode = 0;
}
else{
displayDateMode++;
}
}
else{
displaySwitchCounter++;
}
switch(displayDateMode){
case 0: data[3] = 63;
break;
case 1: data[3] = datetime.date.dayofmonth;
break;
case 2: data[3] = datetime.date.month;
break;
case 3: data[3] = datetime.date.year;
break;
}
break;
}
}
if( datetime.is_valid ){
if(brightnessCounter == BRIGHTNESS){
ShowNumber(data[0], data[1], data[2], data[3]);
}
else{
ShowNumber(0,0,0,0);
}
}
else{
waitForSignal(500);
}
if(brightnessCounter == BRIGHTNESS){
brightnessCounter = 0;
LEDS_PORT |= (( (DCF_PIN & _BV(DCF_INPUT)) >> DCF_INPUT) << LEDS_LED2);
}
else{
LEDS_PORT &= ~( _BV(LEDS_LED1) | _BV(LEDS_LED2) | _BV(LEDS_LED3) );
brightnessCounter++;
}
}
// vim:ts=4

70
software/utils.c Normal file
View File

@ -0,0 +1,70 @@
#include <util/delay.h>
#include "display.h"
void delay(uint16_t ms){
uint16_t i;
for(i=0; i < ms;i++){
_delay_ms(10);
}
}
void waitForSignal(uint16_t time){
static uint8_t counter=6;
static uint16_t timeScaler=1;
if(time > timeScaler){
timeScaler++;
return;
}
timeScaler=0;
if(counter < 6){
ShowNumber(1<<counter,0,0,0);
}
if(counter == 6){
ShowNumber(0,32,0,0);
}
if(counter == 7){
ShowNumber(0,0,32,0);
}
if(counter > 7 && counter < 14){
ShowNumber(0, 0, 0, 32>>(counter-8));
}
if(counter == 14){
ShowNumber(0,0,1,0);
}
if(counter == 15){
ShowNumber(0,1,0,0);
counter = 0;
}
else{
counter++;
}
}
void checkUpDisplay(){
uint8_t checkUp[] = {1,3,7,15,31,63};
uint8_t i,sleepTime=250;
ShowNumber(0,0,0,0);
for(i=0 ;i < sizeof(checkUp) / checkUp[0];i++){
delay(sleepTime);
ShowNumber(i>0 ? checkUp[i-1]:0, i>0 ? checkUp[i-1]:0, i>0 ? checkUp[i-1]:0, checkUp[i]);
delay(sleepTime);
ShowNumber(i>0 ? checkUp[i-1]:0, i>0 ? checkUp[i-1]:0, checkUp[i], checkUp[i]);
delay(sleepTime);
ShowNumber(i>0 ? checkUp[i-1]:0, checkUp[i], checkUp[i], checkUp[i]);
delay(sleepTime);
ShowNumber(checkUp[i], checkUp[i], checkUp[i], checkUp[i]);
}
for(i=0;i< sizeof(checkUp)/checkUp[0];i++){
delay(sleepTime);
ShowNumber(63 - ( i > 0 ? checkUp[i-1]:0), 63 - ( i > 0 ? checkUp[i-1]:0), 63 - ( i > 0 ? checkUp[i-1]:0), 63 - checkUp[i]);
delay(sleepTime);
ShowNumber(63 - (