Professional Documents
Culture Documents
C:/Documents and Settings/Dad/Desktop/Website 2007/staging/code/16F877A - Bounce1.pb
C:/Documents and Settings/Dad/Desktop/Website 2007/staging/code/16F877A - Bounce1.pb
pb
'---------------Title-------------'
'
'
'
'
'
File......16F877A_bounce1.pbp
Started....6/1/05
Microcontroller used: Microchip Technology 16F877A
microchip.com
PicBasic Pro Code, micro-Engineering Labs, Inc.
melabs.com
'--------Program Desciption-------' Eight LED's scroll on then off from left to right
' then from right to left.
'-------------Schematic-----------' See schematic at:
' http://www.cornerstonerobotics.org/schematics/pic16f877a_bounce.pdf
'---------Revision History--------' 11/6/07:
' 1/1/09:
'-----------Initialization--------PORTB = %00000000
TRISB = %00000000
Pin
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Page 1 of 2
PORT/Pin
PORTB.0
PORTB.1
PORTB.2
PORTB.3
PORTB.4
PORTB.5
PORTB.6
PORTB.7
PORTC.0
PORTC.1
PORTC.2
PORTC.3
PORTC.4
PORTC.5
PORTC.6
PORTC.7
1/10/2009 8:44 AM
'-------------Main Code-----------start:
HIGH LED
PAUSE 250
LOW LED
NEXT LED
-1
Loop through 6 middle LEDs.
STEP is a negative number so
the variable LED will decrease by 1
each time through the FOR..NEXT loop.
HIGH LED
PAUSE 250
LOW LED
NEXT LED
END
Page 2 of 2
1/10/2009 8:44 AM