'---------Title------------

' File:  flicker2.pbp
' Started:  11/4/03
' Microcontroller used:  Microchip Technology 16F88
'                        microchip.com
' PBPro Code, micro-Engineering Labs, Inc.
'             melabs.com  
 
'---------Program Desciption--------

' LED flashes one time per half second.

'-----New PicBasic Pro Commands----

' HIGH pin
' Sets pin to high(+5v) Pin must be a number between
' 0 and 15(see below).
'
' LOW pin
' Sets pin to low(0v) Pin must be a number between
' 0 and 15(see below).

'--------Revision History--------

' Comments added 2/20/06

'---------Constants/Defines-------

'---------Variables---------

'---------Initialization--------

        TRISB = %11111110    'Sets up pin B0 of PORTB as an output
			                 'and pins B7-B1 of PORTB as inputs	 
			                 
        OSCCON = $60	    'Sets the internal oscillator in the
                            '16F88 to 4 MHz   				                 

'-----Pin List for 18 Pin Microcontrollers-----

'        Pin      PORT/Pin
                                 		
'         0       PORTB.0
'         1       PORTB.1
'         2       PORTB.2
'         3       PORTB.3
'         4       PORTB.4
'         5       PORTB.5
'         6       PORTB.6
'         7       PORTB.7
'         8       PORTA.0
'         9       PORTA.1
'         10      PORTA.2
'         11      PORTA.3
'         12      PORTA.4
'         13      PORTA.5
'         14      PORTA.6
'         15      PORTA.7

'--------Main Code--------

loop:

		high 0          'Makes pin B.0 output at high (5 volts)
		
		Pause 250       'Pause 250 milliseconds (1/4 seconds) with LED on
        		
		Low 0           'Makes pin B.0 output at low (0 volts)
		
		Pause 250       'Pause 250 milliseconds (1/4 seconds) with LED off
		
        GoTo loop		'Jump to loop label 
               
        End			    
