|
|
View previous topic :: View next topic |
Author |
Message |
joseph
Joined: 14 Jun 2010 Posts: 16
|
Pic12f1822 and LVP..... and maybe fuses |
Posted: Wed May 02, 2012 8:23 am |
|
|
Hi,
I'm trying to program a pic12f1822 in low power mode but i become crazy !.
With a 18f2520, it's easy because you have a dedicated pin : rb5 "PGM", but when you use a little pic, you must play with MCLR and maybe fuses....
My fuse is :
#fuses
Is it right ?
Thanks in advance ! |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Wed May 02, 2012 1:23 pm |
|
|
Quote: | I'm trying to program a pic12f1822 in low power mode
|
You mean "Low Voltage Programming" mode.
Look in the PIC data sheet. It tells you what to do:
Quote: |
28.2 Low-Voltage Programming Entry Mode
The Low-Voltage Programming Entry mode allows the
PIC12F/LF1822/16F/LF1823 devices to be
programmed using VDD only, without high voltage.
When the LVP bit of Configuration Word 2 is set to ‘1’,
the low-voltage ICSP programming entry is enabled.
To disable the Low-Voltage ICSP mode, the LVP bit must
be programmed to ‘0’.
Entry into the Low-Voltage Programming Entry mode
requires the following steps:
1. MCLR is brought to VIL.
2. A 32-bit key sequence is presented on
ICSPDAT, while clocking ICSPCLK.
.
.
.
|
So yes, you need to use the LVP fuse.
12F1822 data sheet:
http://ww1.microchip.com/downloads/en/DeviceDoc/41413B.pdf
The 12F1822 Programming Specification has more information:
http://ww1.microchip.com/downloads/en/DeviceDoc/41390C.pdf |
|
|
joseph
Joined: 14 Jun 2010 Posts: 16
|
|
Posted: Thu May 03, 2012 2:10 am |
|
|
Hi,
Thanks for your reply.
So indeed, i talk about about the LVP Low Power Programming. I have read the part of datasheet and i wanted a confirmation about the fuses.
I try to program my pic with an ICD3 but nothing.... so a search in every way.... |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19546
|
|
Posted: Thu May 03, 2012 3:02 am |
|
|
You do realise the ICD3, defaults to using high voltage, not low voltage programming?. In fact LVP has to be disabled to use it as a debugger. Remember that LVP has a lot of limitations - you cannot erase protection fuses for example.
You don't have to 'fiddle with MCLR'. The point is that if the chip is set to use LVP, MCLR becomes dedicated as the programming pin. All it needs is a weak pull up to the supply rail, so it can't float low, when you are not programming. Effectively the chip loses the MCLR pin, and this becomes the dedicated programming pin.
On the 6pin header to the ICD, to work this way, you connect ICSPDAT, and ICSPCLK to the corresponding PIC pins, and the _LVP_ pin to the 'MCLR' pin. You don't make a connection to the Vpp/MCLR pin on this connector - this is only used for high voltage programming.
Chips come _with_ the LVP mode enabled. It'll only be turned 'off' if you have already programmed them with a high voltage programmer. Once turned off, it can _only_ be turned back on using high voltage programming.
I wonder 'why' you actually want to use LVP mode?. The only advantage is if you latter want to reprogram the chip, using your own hardware that does not generate the Vpp signal....
Best Wishes |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|