![]() |
|||||||
|
|
|
|
|
| PIC Home | Previous Page | Next Page | Next Chapter |

Plug in your programmer. Most likly you will need to pull the red loop of wire
connecting your chip to the buss to program from now on. The programmer simply does
not have enough current to power the entire circuit.
For a review of uploading programs please go here

Copy and pastable code
Be sure to create a new project first.
For a review of creating projects please go here
Paste BELOW your program name!
'*********************
Dim value as Byte
'*********************
Sub Procedure Dlay100
Delay_ms(100)
End Sub
'*********************
Main:
TrisB = %00000000 'Configure Pins of PortB as Output
value = 0 'Start code off with a value = 0
Count_up:
PortB = value 'Send value to PortB
Value = value + 1 ' Add one to Value
If value = 255 Then 'If value is equal to 255 then....
value = 0 ' Value switches back to being zero
End if ' Always end an If statement with an End If
Dlay100 ' Call the Dlay100 sub procedure
Goto Count_up ' Jump back up to the Count_up Section
End. 'All good things must end
'*********************
PIC Home
Previous Page
Next Page
Next Chapter