Just updated to using PicKit2Plus and putting finishing touches to code originally for a 12f683 that has now been migrated to a 16f18313 ... all works without a problem once I got my head around the PPS module.
Then I tried programming a 16lf18313 - it does program but it creates the following error text where it finally tries to set VDD back to 5V ...
... what's the problem and does it risk damaging the chip will my PicKit2 prevent the chip being powered ?
(I'm using a PicKit2 / ZIF socket board.)
The other odd thing is that the file 'errors.txt' is not actually written to disk.
Thanks
Andrew
useINI
Great Cow BASIC Pre-processing (Copyright 2007..2018)
Make Hex and Program
Great Cow BASIC (0.98.06 2019-06-12 (Windows 32 bit))
Downloading program ...
PICkitCommandline v6.09.24416.8276
Product licensed to Andrew Jameson.
Using data file "PKPlusDeviceFile.dat" which is a version 2.63.236 file.
Connected to PICkit 2 <olhoss>
Status is: Ready</olhoss>
Found PIC16LF18313 (family 18)
Setting VDD=3.6V, VPP=8.5V
Target is not self-powered
Target VDD is 3.53V
Erasing part...done
Turbo mode engaged!
Skipping write of EEPROM memory because there is no data to write
Writing to target...
Writing program memory
....
Verifying minimal program memory
.....
Verifying configwords
done
Setting VDD to 5.0V.
Error 2: Selected voltage (5.0V) is higher than the maximum supported voltage (3.6V) of this part.
Failed after 0 minutes and 3 seconds
A warning has been generated:
Warning: The chip may not have programmed properly. Programmer returned
status (2)
The message has been logged to the file Errors.txt.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In the new version you simply would use the parameters with the the Programmer Preferences. Are you using 'Programmer Preferences' or the old batch files ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I don't quite grasp your question - at the moment I'm selecting the programmer by moving it to the top of the preferences dialog listbox. Old batch files ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
So, in 'Programmer Preferences' select the programmer of choice and change 'USEIF'
Each one can have a condition assigned to it here. If the condition is true, this programmer will be used. If not, the next programmer will be tried. Some examples:
DEF(PIC) to restrict this programmer to PIC microcontrollers
DEF(AVR) to restrict this programmer to AVR microcontrollers
ChipName = 16f18313 to restrict this programmer to only 16f18313 chips
Conditions can be combined with AND, OR and NOT.
Use DEF(const) to check if any constant is defined, or check the value of any constant with
So, you could use #DEFINE USEMYPROGRAMMER = 1 (I think it needs a value) in your source, then, in USEIF use DEF(USEMYPROGRAMMER).
Just updated to using PicKit2Plus and putting finishing touches to code originally for a 12f683 that has now been migrated to a 16f18313 ... all works without a problem once I got my head around the PPS module.
Then I tried programming a 16lf18313 - it does program but it creates the following error text where it finally tries to set VDD back to 5V ...
... what's the problem and does it risk damaging the chip will my PicKit2 prevent the chip being powered ?
(I'm using a PicKit2 / ZIF socket board.)
The other odd thing is that the file 'errors.txt' is not actually written to disk.
Thanks
Andrew
useINI
Great Cow BASIC Pre-processing (Copyright 2007..2018)
Make Hex and Program
Great Cow BASIC (0.98.06 2019-06-12 (Windows 32 bit))
Compiling E:\Motor Design\PIC Work\Working\PIC16LF18313\23-02-05 - HitMissControlUsingCCPCaptureCompare - CoarsePulse.gcb ...
Done
Assembling program ...
Program assembled successfully!
Downloading program ...
PICkitCommandline v6.09.24416.8276
Product licensed to Andrew Jameson.
Using data file "PKPlusDeviceFile.dat" which is a version 2.63.236 file.
Connected to PICkit 2 <olhoss>
Status is: Ready</olhoss>
Found PIC16LF18313 (family 18)
Setting VDD=3.6V, VPP=8.5V
Target is not self-powered
Target VDD is 3.53V
Erasing part...done
Turbo mode engaged!
Skipping write of EEPROM memory because there is no data to write
Writing to target...
Writing program memory
....
Verifying minimal program memory
.....
Verifying configwords
done
Setting VDD to 5.0V.
Error 2: Selected voltage (5.0V) is higher than the maximum supported voltage (3.6V) of this part.
Failed after 0 minutes and 3 seconds
A warning has been generated:
Warning: The chip may not have programmed properly. Programmer returned
status (2)
The message has been logged to the file Errors.txt.
Check the programmer parameters. I think you are setting the volts to 5v0 post programming.
Change the programmer to the PK+ 3v3 programmer option.
Thanks for the quick answer ! And you were correct too !
Andrew :o)
Pleasure. The warning was correct!
Evan
Is it possible to use a script / source switch to select the programmer rather than from the "programmer preferences" dialog settings ?
Andrew
Yes.
Tell me more about you IDE. Which/what IDE are you using?
0.98.06 2019-06-12 (Windows 32 bit)
I've got used to this one - like the proverbial "old shoe" !
Andrew
Wow. That is very old.
In the new version you simply would use the parameters with the the Programmer Preferences. Are you using 'Programmer Preferences' or the old batch files ?
Yes - maybe I should update !
I don't quite grasp your question - at the moment I'm selecting the programmer by moving it to the top of the preferences dialog listbox. Old batch files ?
So, maybe you are using 'Programmer Preferences'
So, in 'Programmer Preferences' select the programmer of choice and change 'USEIF'
Each one can have a condition assigned to it here. If the condition is true, this programmer will be used. If not, the next programmer will be tried. Some examples:
DEF(PIC) to restrict this programmer to PIC microcontrollers
DEF(AVR) to restrict this programmer to AVR microcontrollers
ChipName = 16f18313 to restrict this programmer to only 16f18313 chips
Conditions can be combined with AND, OR and NOT.
Use DEF(const) to check if any constant is defined, or check the value of any constant with
So, you could use #DEFINE USEMYPROGRAMMER = 1 (I think it needs a value) in your source, then, in USEIF use DEF(USEMYPROGRAMMER).
The latest programmer does fix some bugs in the USEIF controls. See the change log for when these changes/releases happened. https://onedrive.live.com/Edit.aspx?resid=2F87FFE77F3DBEC7!67634&wd=cpe&authkey=!ADmkT3exl5l4Pkc changes 737,
782, 798, 1075, 1076, 1106 and 1164 are all related to using USEIF
Thanks for that, I'll investigate further after lunch !
Cheers,
Andrew