hi leute ich hab mal vor längerer zeit ne kaffemaschine mit nem tiny bestückt (orginal ic hat sich in Rauch aufgelöst) vieleicht hilft das weiter

'$regfile = "AT12def.dat"
'$tiny
'portb.0 Relais ,,Pinb.1 ON/OFF ..Pinb.2 3 Tassen ,, Portb.3 LED1 ,, Portb.4 LED 2

Enable Interrupts
Enable Int0 'enable the interrupt
On Int0 Stopall Nosave 'jump to label2 on INT0

Dim A As Iram Word
Dim B As Iram Word



$asm
ldi R16,&h07
Out Ddrb , R16 '3 Ausgänge
LDI R16 ,&h18
Out Portb , R16 'Pullup´s setzen
$end Asm


Start:
Do
If Pinb.1 = 1 Then Gosub Onof 'Taste 0/1
If Pinb.4 = 1 Then Gosub Dreibis 'Taste 3-5 Kaffe
Loop
End

Onof:
Set Portb.2
Wait 120
Reset Portb.2
Return

Dreibis:
Set Portb.2
Wait 120
Reset Portb.2
Return

Stopall:
Portb = 0 'reset

Return


Tagtimer: '720 s sind 12 Stunden

Return