This has to work. But i would add the Configuration fuse line at the top.
I hope the Demo Allow that...
Code:
<font color="#008000">' File name: mblink.bas
' Target: 16f628A
' Compile the file from the command line: pbpdemo.exe -p16f628a mblink.bas
'
'
' +5V
' |
' _|_
' _\_/_ LED 1
' |
' RA4-----/\/\/\----+
' 300 ohm
'
'
</font><font color="#000080">@ device pic16f628A, hs_osc, lvp_off, mclr_off, pwrt_on, cpd_off
DEFINE </font>OSC 10 <font color="#008000">' 10 MHz crystal used.
</font>CMCON = 7 <font color="#008000">' Disable comparator, set PortA in digital mode.
</font><font color="#000080">OUTPUT </font>PORTA.4 <font color="#008000">' Set RA4 as output
</font>loop: <font color="#000080">LOW </font>PORTA.4 <font color="#008000">' Turn on LED 1, the pin RA4 sinks current.
</font><font color="#000080">PAUSE </font>500 <font color="#008000">' Delay for .5 seconds.
</font><font color="#000080">HIGH </font>PORTA.4 <font color="#008000">' Turn off LED 1, the pin RA4 floats, (RA4 open drain output).
</font><font color="#000080">PAUSE </font>500 <font color="#008000">' Delay for .5 seconds.
</font><font color="#000080">GOTO </font>loop <font color="#008000">' Go back to loop and blink LED 1 forever.
</font><font color="#000080">END
</font>
Bookmarks