Hallo, ich bin auch dabei PIC's zu programmieren. Habe den Crownhill Proton+ und will in Basic programieren, als Hardware benutze ich von Vellemann das K8076 mit PicProg2009 und zum Probieren das K8048.Bei dem K8076 hatte ich erst Probleme, die ich dadurch abstellte,indem ich den Schieber Hardware Delay ganz auf Slow gestellt habe. Nun zu meinem eigentlichen Problem, ich wolltr einen kleine Tischroboter bauen und programieren.Das Programm funktioniert auch soweit.Ich komme nur mit den Interrupt's nicht klar.Ich benutze als Interrupt den Eingang RB0 ( PIC 16F627 ) . Zur Zeit sieht mein Programm so aus

DEVICE = 16F84
XTAL = 4

Dim Wert as Word
Dim Wert2 as Word
Dim Flag as Byte
Symbol Motorport = PortA
Symbol LEDPORT = PORTB
Symbol LED1 = PORTB.0 ' Alias PORTB to LEDS
Symbol LED2 = PORTB.1
Symbol Motorleitung1 = PortB.2
Symbol Motorleitung2 = PortB.3
Symbol Motorleitung3 = PortB.4
Symbol Motorleitung4 = PortB.5


TRISB = %00000000 ' Alle Bits Ausgang
PortB = 0
TRISA = %11111111 ' Untere 6 Bits Ausgang Rest Eingang
PortA = 0
PortB = 0

Loop:
low LED1
low Led2
IF Porta.0 = 1 then goto Rueckwaerts: ELSEIF Porta.0 = 0 then goto Luup

delayms 2000

Luup:
low LED1
IF Porta.0 = 1 then goto Rueckwaerts
gosub Vorwaerts
delayms 2000

IF Porta.0 = 1 then goto Rueckwaerts
gosub Anhalten
delayms 2000

IF Porta.0 = 1 then goto Rueckwaerts
gosub Neunzig_Grad_rechts
delayms 2000

IF Porta.0 = 1 then goto Rueckwaerts
gosub Anhalten
delayms 2000

goto loop

Vorwaerts:
Toggle LED1
Motorleitung1 = 0
Motorleitung2 = 1
Motorleitung3 = 1
Motorleitung4 = 0
IF Porta.0 = 1 then goto Rueckwaerts
return




Anhalten:
Toggle LED1
Motorleitung1 = 0
Motorleitung2 = 0
Motorleitung3 = 0
Motorleitung4 = 0
IF Porta.0 = 1 then goto Rueckwaerts
return

Neunzig_Grad_rechts:
Toggle LED1
Motorleitung1 = 1
Motorleitung2 = 0
Motorleitung3 = 1
Motorleitung4 = 0
IF Porta.0 = 1 then goto Rueckwaerts
return
goto Loop

Rueckwaerts:
Toggle LED2
low LED1
Motorleitung1 = 1
Motorleitung2 = 0
Motorleitung3 = 0
Motorleitung4 = 1
Delayms 2500
Toggle LED2
Motorleitung1 = 0
Motorleitung2 = 0
Motorleitung3 = 0
Motorleitung4 = 0
Delayms 1500
Toggle LED2
Motorleitung1 = 0
Motorleitung2 = 1
Motorleitung3 = 0
Motorleitung4 = 1
Delayms 2500
Toggle LED2
Motorleitung1 = 0
Motorleitung2 = 0
Motorleitung3 = 0
Motorleitung4 = 0
Delayms 1500
goto loop