-
-
Hi,
Okay, ein bisschen was hab ich verstanden, doch beim Timer hörts auf.... muß ich mich wohl noch schlauer lesen.... hab gedacht das geht ganz einfach.... wie folgt...
$regfile = "attiny13.dat"
$crystal = 9600000
Config Portb = Output
Do
Portb.4 = 1
Portb.3 = 1 'bit1'
Waitms 0.889
Portb.4 = 0
Portb.3 = 0
Waitms 0.889
Portb.4 = 1
Portb.3 = 1 'bit2'
Waitms 0.889
Portb.4 = 0
Portb.3 = 0
Waitms 0.889
Portb.4 = 1
Portb.3 = 1 'bit3'
Waitms 0.889
Portb.4 = 0
Portb.3 = 0
Waitms 0.889
Portb.4 = 1
Portb.3 = 1 'bit4'
Waitms 0.889
Portb.4 = 0
Portb.3 = 0
Waitms 0.889
Portb.4 = 0
Portb.3 = 0 'bit5'
Waitms 0.889
Portb.4 = 1
Portb.3 = 1
Waitms 0.889
Portb.4 = 0
Portb.3 = 0 'Bit6'
Waitms 0.889
Portb.4 = 1
Portb.3 = 1
Waitms 0.889
Portb.4 = 1
Portb.3 = 1 'Bit7'
Waitms 0.889
Portb.4 = 0
Portb.3 = 0
Waitms 0.889
Portb.4 = 0
Portb.3 = 0 'Bit8'
Waitms 0.889
Portb.4 = 1
Portb.3 = 1
Waitms 0.889
Portb.4 = 1
Portb.3 = 1 'bit9'
Waitms 0.889
Portb.4 = 0
Portb.3 = 0
Waitms 0.889
Portb.4 = 1
Portb.3 = 1 'bit10'
Waitms 0.889
Portb.4 = 0
Portb.3 = 0
Waitms 0.889
Portb.4 = 1
Portb.3 = 1 'bit11'
Waitms 0.889
Portb.4 = 0
Portb.3 = 0
Waitms 0.889
Portb.4 = 1
Portb.3 = 1 'bit12'
Waitms 0.889
Portb.4 = 0
Portb.3 = 0
Waitms 0.889
Portb.4 = 0
Portb.3 = 0 'bit13'
Waitms 0.889
Portb.4 = 1
Portb.3 = 1
Waitms 0.889
Portb.4 = 1
Portb.3 = 1 'bit14'
Waitms 0.889
Portb.4 = 0
Portb.3 = 0
Waitms 0.889
Loop
End
Wie gesagt, sehr primitiv...... is auch mein erstes programm.... Portb.4 ist nur eine LED zum kontrollieren, ob er sendet.
Wenn ich die IRled zwischen zwei ausgänge schalte schliesst die dann nicht kurz???
mfg Harry
Berechtigungen
- Neue Themen erstellen: Nein
- Themen beantworten: Nein
- Anhänge hochladen: Nein
- Beiträge bearbeiten: Nein
-
Foren-Regeln
Lesezeichen