BINGO! That was it!!! Many thanks to you all!!
For the record, anyone else with a PICkit 2 board (with a PIC16F690) .....to save you hours of puzzlement...
In your C:\PBP\16F690.INC , comment out this one line (thanks to Bruce)...
; __config _INTRC_OSC_NOCLKOUT & _WDT_ON & _MCLRE_OFF & _CP_OFF
Put all of the following code at the top of your PICBASIC programming window (thanks to mackrackit for the _MCLRE_OFF tip)...
@MyConfig = _INTRC_OSC_NOCLKOUT & _WDT_OFF & _PWRTE_ON
@MyConfig = MyConfig & _MCLRE_OFF & _BOR_OFF
@ __config MyConfig
DEFINE OSC 4
i var byte
ANSEL=0 ' all digital
ANSELH=0 ' analog module disabled
CM1CON0=0
CM2CON0=0
PortC = 0
TRISC = 0
And if you have - like I have - a burning desire to see your board's LEDs light in sequence, add this bit of code (thanks to Joe.S)...
main:
portc = 0
pause 500
for i = 1 to 15; step -1
portC = i
i=i << 1
pause 250
next i
goto main
end
What's a beginner to do?!!! Most of this was (is!) double dutch....a what with a day & a half's effort just to get LEDs lit with the simplest of basic code....I think my programming interest is going to wane very fast!.
Now to my main intention, a simple PIC based 'pulse counter' program for a coil winder.
If your interested, you can read about what I'm trying to achieve here ....
http://www.electro-tech-online.com/m...am-needed.html
(you can see my appeal for the simple PIC program didn't get much of a response, hence me having to darken this forum's doorstep and try to figure it all out myself!)
Bookmarks