PDA

View Full Version : pickit 3 and configuration bits.



brianD
- 3rd February 2010, 10:47
hi.

i am battling to get my pickit 3 to work.
using the examples which are in written in c it works perfect,however when i
write my little program,nothing happens.
therefore it leaves me with one conclusion: the configs are not set and i cannot find any literature on how to set these
eg the mclre_off.how would one set the configs so that my little program will work,bearing in mind that the chip is loaded with my program.

mackrackit
- 3rd February 2010, 11:24
http://www.picbasic.co.uk/forum/showthread.php?t=543

brianD
- 3rd February 2010, 12:16
0so if i try this it should work?

@ _MCLRE_OFF_3H & _LVP_OFF_4L
EQU H'FB' // EQU H'7F'

what about the part where it mentions the equ?.will that be left out.

will the first line of code work?

mackrackit
- 3rd February 2010, 13:30
Which PIC are you using?

brianD
- 3rd February 2010, 13:34
The 18f45k20.

mackrackit
- 3rd February 2010, 13:53
Soory, fussed out a bit, I know what you are asking...

You must be looking at the inc file in MPASAM Suite.
Do not worry about the "EQU H'FB" stuff. Just addresses.
That file tells all of the options and a bunch of other things.

The file to change or comment of you set the configs in code space is the inc file in the PBP directory. The way they are set up there is what you need.

Assume you want MCLRE off and I will guess a HS OSC?


@ __CONFIG _CONFIG1H, _FOSC_HSPLL_1H
@ __CONFIG _CONFIG2H, _WDTEN_ON_2H & _WDTPS_512_2H
@ __CONFIG _CONFIG3H, _MCLRE_OFF_3H & _PBADEN_OFF_3H
@ __CONFIG _CONFIG4L, _LVP_OFF_4L & _XINST_OFF_4L

Notice the MCLRE is on the CONFIG3H line.

brianD
- 3rd February 2010, 14:01
thanks.
i will try these this evening and give a quick reply in the morning.