Need help getting started.
Please help an Old Fart Out here.
I have programmed some sofisticated programs using picaxe chips.
I'm now trying to program pic16F690 chips, to start with.
I have a PICkit2, which I can program HEX files to, so I know that works.
also have the LPC Demo Board.
MPLAB IDE v8.92
PBP 3.0 Student Edition, activated.
PiCKIT 2 programmer
LPC demo board
Windows 7 64bit.
I've read [Beginner Tutorial] How to get started with PICBASIC PRO
Demo, MPLAB & PICKIT 2
and
Presetting Configuration Fuses (PIC Defines) into your Program
and
Now My Brain Hurts.........
I'm trying to assemble the demo programs, Led Blinky etc.
I keep getting the dreaded 'Overwriting previous address contents
(2007)' message.
If I can get the program to assemble, with internal oscillator running I'll be
able to proceed, and be a happy chappie..
Doesn't matter how many times I 'comment' lines in the p16f690.inc file, I
can't get past this stage.
Please help.
A listing of 'ledblinky' and 'p16f690.inc' that will compile would be
appreciated.
Thanks
TOF.
Re: Need help getting started.
Look for #CONFIG in manual...
Re: Need help getting started.
This ought to get you started if you are using PBP 3.
Code:
#IF __PROCESSOR__ = "16F690"
#config
cfg1 = _INTRC_OSC_NOCLKOUT ; Internal oscillator
cfg1&= _WDT_OFF ; Watch Dog Timer disabled
cfg1&= _PWRTE_OFF ; Power-up Timer disabled
cfg1&= _MCLRE_ON ; Master Clear Reset enabled
cfg1&= _CP_OFF ; Program Code Protection is disabled
cfg1&= _CPD_OFF ; Data Code Protection is disabled
cfg1&= _BOD_OFF ; Brown-out Detect disabled
cfg1&= _IESO_OFF ; Internal External Switchover mode is disabled
cfg1&= _FCMEN_OFF ; Fail-safe Clock Monitor is disabled
__CONFIG cfg1 ; Set the configuration bits
#ENDCONFIG
#else
#MSG "Wrong microcontroller selected!"
#endif
DEFINE OSC 4
ANSEL = %00000000
;CMCON0 = %00000111
;CMCON1 = %00000010
PORTC = 0
ANSELH=0
ADCON0 = 0
ADCON1 = 0
BTW I use those same demo boards.
Re: Need help getting started.
Thank you Archangel,
My brain don't hurt so much now......
info: had to click 'release from reset'.
Rgards
TOF