Hallo,
hat jemand Lust zu rätseln? Das Progrämmchen tat einfach gar nichts. Auch keine Compiler Fehlermeldung.
Alles anzeigen
An Pin 3 und 4 hängt je ein Poti (Vcc-Gnd) , an 5(b0) ein Relais, an 6(b1) eine Led/Hupe und 7(b2) ein Thermostat
hat jemand Lust zu rätseln? Das Progrämmchen tat einfach gar nichts. Auch keine Compiler Fehlermeldung.
Quellcode
- $regfile = "attiny13a.dat"
- $crystal = 128000
- $hwstack = 16
- $swstack = 16
- $framesize = 16
- Config Timer0 = Timer Prescale 1024
- Start Timer0
- On Ovf0 Tim
- Enable Ovf0
- DDRB = 3
- Dim Tein As Word , Taus As Word , Tist As Word
- Enable Interrupts
- Do
- Wait 1
- Tein = Getadc(1)
- Tein = Tein + 128 'min 4min / max 38 min
- Taus = Getadc(2)
- Shift Taus , Right , 2 'max 8min
- Tist = 0
- Do
- Loop Until Portb.2 = 0 Or Tist > 600 'Kalt
- If Tist > 600 Then Set Portb.1
- Tist = 0
- Do
- Loop Until Tist > Tein 'Kühlzeit
- Set Portb.0 'Abtauen
- Tist = 0
- Do
- Loop Until Portb.2 = 1 Or Tist > 150 'warm
- If Tist > 600 Then Set Portb.1
- Tist = 0
- Do
- Loop Until Tist > Taus 'Fallzeit
- Reset Portb.0
- Loop
- End
- Tim: '2s
- Incr Tist
- Return