Hi mackrackit. I've been working like a Beaver this PM and have come up with this program to your: "So now try to do the sequence LEDs 1-3 using HIGH/LOW." exercise. If you get a minute could check my program comments for accuracy please, because I'm making assumptions the conclusions I'm drawing are accurate and they may well not be. The program does work though:Many thanks: Dave
ANSEL = %00000000
CMCON0 = %00000111
Sart
MAIN
OUTPUT GPIO.5 ' Makes GPIO.5 an output
LOW GPIO.4 ' Makes GPIO.4 zero volts
HIGH GPIO.5 ' D1 HIGH turns LED-ON +5 volts
PAUSE 500 ' wait 500mili_secs
LOW GPIO.5 ' D1 LOW turns LED-OFF
PAUSE 500 ' wait 500mili_secs
INPUT GPIO.5 ' Stops cross-feed to other Diodes
OUTPUT GPIO.4 ' Makes GPIO.4 an output
LOW GPIO.2 ' Makes GPIO.2 zero volts
HIGH GPIO.4 ' D2 HIGH turns LED-ON +5 volts
PAUSE 500 ' wait 500mili_secs
LOW GPIO.4 ' D2 LOW turns LED-OFF
INPUT GPIO.2 ' Stops cross-feed to other Diodes
PAUSE 500 ' wait 500mili_secs
OUTPUT GPIO.2 ' Makes GPIO.2 an output
LOW GPIO.4 ' Makes GPIO.4 zero volts
HIGH GPIO.2 ' D3 HIGH turns LED-ON +5 volts
PAUSE 500 ' wait 500mili_secs
LOW GPIO.2 ' D3 LOW turns LED-OFF
INPUT GPIO.2 ' Stops cross-feed to other Diodes
PAUSE 500 ' wait 500mili_secs
goto MAIN ' start all over again




Bookmarks