Author |
Message |
ejr27233
Joined: Feb 08, 2010 Posts: 52 Location: UK
|
Posted: Fri Nov 12, 2010 2:48 pm Post subject:
Problems with Acoupel Midi > CV Pic program |
|
|
I've been trying to program the 16F88 PIC for Acoupels MIDI>CV convertor (V2.3) and get a message saying all the configuration settings are not set in the software. When I press write it programs and then verifies with an error message saying the first byte is blank. Checking the chip its blank.
I.ve used 5 new PIC's and 2 different programmers but get the same problems. Has anyone managed to use this Hex file succesfully? Any ideas where I'm going wrong?
Any help gratefully recieved as this is driving me nuts.....
EJR 27233 |
|
Back to top
|
|
|
Boogdish
Joined: Sep 21, 2009 Posts: 122 Location: Bloomington, IN
|
Posted: Fri Nov 12, 2010 7:21 pm Post subject:
|
|
|
I used his provided HEX file for the lite version and had no trouble. Have you tried using versions 2.2 or 2.1? If those work for you, it might just be a corrupt file.
He provides source code, you could also try compiling it yourself. |
|
Back to top
|
|
|
slo
Joined: Feb 18, 2007 Posts: 204 Location: Victoria, BC
Audio files: 1
|
Posted: Sat Nov 13, 2010 8:41 am Post subject:
|
|
|
I've built and programmed this project successfully. I used PICKIT 2. In general when programming PICS/ATMEL, good power is a must, sometimes the USB supplied power just doesn't cut it. Try an external power supply on your programmer if possible.
George |
|
Back to top
|
|
|
fonik
Joined: Jun 07, 2006 Posts: 3950 Location: Germany
Audio files: 23
|
Posted: Sat Nov 13, 2010 8:44 am Post subject:
|
|
|
i have the same problem with the quantizer.
however, my PicKit2 programmer states success of writing data. and as long as code protection is ON, the verify and read out of code might not work properly. i have not been able yet to turn code protection OFF for this hex file.
i have not breadboarded the circuit yet, so no opportunity to verify the programming... _________________
cheers,
matthias
____________
Big Boss at fonitronik
Tech Buddy at Random*Source |
|
Back to top
|
|
|
fonik
Joined: Jun 07, 2006 Posts: 3950 Location: Germany
Audio files: 23
|
Posted: Sat Nov 13, 2010 8:45 am Post subject:
|
|
|
slo wrote: | I've built and programmed this project successfully. I used PICKIT 2. In general when programming PICS/ATMEL, good power is a must, sometimes the USB supplied power just doesn't cut it. Try an external power supply on your programmer if possible. |
this would be a bummer! i'd liked to power it from the PC! _________________
cheers,
matthias
____________
Big Boss at fonitronik
Tech Buddy at Random*Source |
|
Back to top
|
|
|
ejr27233
Joined: Feb 08, 2010 Posts: 52 Location: UK
|
Posted: Sat Nov 13, 2010 9:21 am Post subject:
|
|
|
Thanks for the suggestions.
I'll bulid a seperate power supply for the programmer
The annoying thing is I've just bought a new PicKit2 for this project as I thought my cheapo ebay Hong Kong programmer might be the cause of the problem. |
|
Back to top
|
|
|
slo
Joined: Feb 18, 2007 Posts: 204 Location: Victoria, BC
Audio files: 1
|
Posted: Sun Nov 14, 2010 7:55 pm Post subject:
|
|
|
I should add that I too use an el-cheapo E-Bay Hong Kong programmer for PIC's, and that it work's great, my power supply problem was with Atmel's.
George |
|
Back to top
|
|
|
fonik
Joined: Jun 07, 2006 Posts: 3950 Location: Germany
Audio files: 23
|
Posted: Mon Nov 15, 2010 2:20 am Post subject:
|
|
|
fonik wrote: | however, my PicKit2 programmer states success of writing data. and as long as code protection is ON, the verify and read out of code might not work properly... |
i hope that this is the problem then. we will see... _________________
cheers,
matthias
____________
Big Boss at fonitronik
Tech Buddy at Random*Source |
|
Back to top
|
|
|
fonik
Joined: Jun 07, 2006 Posts: 3950 Location: Germany
Audio files: 23
|
Posted: Mon Nov 22, 2010 10:28 am Post subject:
|
|
|
any news?
have still not had the time to breadboard it... _________________
cheers,
matthias
____________
Big Boss at fonitronik
Tech Buddy at Random*Source |
|
Back to top
|
|
|
ejr27233
Joined: Feb 08, 2010 Posts: 52 Location: UK
|
Posted: Mon Nov 22, 2010 2:45 pm Post subject:
|
|
|
Unfortunatlly I havent had time to do anything about this for the past week but hopefully I'll try powering the PIC this coming week |
|
Back to top
|
|
|
monokinetic
Joined: Aug 01, 2006 Posts: 100 Location: prague
|
Posted: Mon Nov 22, 2010 4:05 pm Post subject:
|
|
|
Nobody seems to have mentioned which software they are using for burning the PICs, but here a few things I would check:
Try a different burning application (I spent ages trying to get my PICKIT3 to work with MPLAB, tried the new beta burning app from Microchips forums here:
http://www.microchip.com/forums/m525698.aspx
and it burnt immediately). Windows only currently. FYI there's a new beta of MPLAB available for Mac and Linux, haven't had much success with it yet myself... YMMV
Is the 16F88 PIC set up for high voltage or low voltage programming (check the datasheet, I have a feeling I programmed my first one with a voltage around 12V). If it needs high voltage then the PICKIT doesn't supply enough voltage, you have to use external power.
Erase the chip a few times before you try programming it again.
Hopefully that might help someone |
|
Back to top
|
|
|
fonik
Joined: Jun 07, 2006 Posts: 3950 Location: Germany
Audio files: 23
|
Posted: Mon Nov 22, 2010 4:17 pm Post subject:
|
|
|
monokinetic wrote: | Nobody seems to have mentioned which software they are using for burning the PICs, but here a few things I would check:
Try a different burning application (I spent ages trying to get my PICKIT3 to work with MPLAB, tried the new beta burning app from Microchips forums here:
http://www.microchip.com/forums/m525698.aspx
and it burnt immediately). Windows only currently. FYI there's a new beta of MPLAB available for Mac and Linux, haven't had much success with it yet myself... YMMV |
i tried to burn the hex file using the pickit2 programmer software. no MPLAB involved.
however, i will try the burning application mentioned above.
Quote: | Is the 16F88 PIC set up for high voltage or low voltage programming (check the datasheet, I have a feeling I programmed my first one with a voltage around 12V). If it needs high voltage then the PICKIT doesn't supply enough voltage, you have to use external power. |
i will do that. thanks for the hint
Quote: | Erase the chip a few times before you try programming it again.
Hopefully that might help someone |
yep. _________________
cheers,
matthias
____________
Big Boss at fonitronik
Tech Buddy at Random*Source |
|
Back to top
|
|
|
fonik
Joined: Jun 07, 2006 Posts: 3950 Location: Germany
Audio files: 23
|
Posted: Tue Nov 23, 2010 2:54 am Post subject:
|
|
|
according datasheet the 16F88 features low-voltage programming.
again, maybe it is just the code protect option that messes up the read out.
i think i will have the time to breadboar the circuit later this week (partially at least), to check if the PIC is working. _________________
cheers,
matthias
____________
Big Boss at fonitronik
Tech Buddy at Random*Source |
|
Back to top
|
|
|
fonik
Joined: Jun 07, 2006 Posts: 3950 Location: Germany
Audio files: 23
|
Posted: Wed Dec 01, 2010 7:43 am Post subject:
|
|
|
okay. i built the circuit yesterday, and the PIC i programmed did not work properly. all i got was an sinoidal output on pin 17.
i triple-checked the additional circuitry (all switches and stuff) and it works fine.
1st try:
i programmed the PIC using the provided .hex-file using the PICkit2 programmer + software.
when loading the hex into the software i got the error message: "all the configuration settings are not set".
however, after writing the programmers software says "write success".
verifying does not work, since all code is set to "protected" then, and i can't turn off protection.
2nd try:
i programmed the PIC from MPLAB using PICkit2.
3rd try:
i loaded the original c-file into MPLAB, built hex and wrote it to the PIC.
the supply voltage of the USB ports on both machines i used for the programmer was about 4.8V. the datasheet permits low voltage burning.
i will try to burn it with an external laboratory PSU today or tomorrow.
any other suggestions? _________________
cheers,
matthias
____________
Big Boss at fonitronik
Tech Buddy at Random*Source |
|
Back to top
|
|
|
blue hell
Site Admin
Joined: Apr 03, 2004 Posts: 24081 Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320
|
Posted: Wed Dec 01, 2010 7:53 am Post subject:
|
|
|
When the cofig words are not (properly) set from the source code you'll have to come up with a suitable manual configuration. At least the clock configuration will need to be set OK as otherwise the PIC will not run, or it will run at the wrong speed. Even when read protection has been set it should still be possible to verify programming results - but it must be done before the configuration is being programmed (usually programmer software will take care of that). Once the configuration has been set to read protect verification is no longer possible (and it depends on the actual device being used what the read out will be then; can be scrambled, can be zeros, maybe other values ... but useless always).
To come up with a proper configuration you need to know your way in the design; it's best when the designer spefies what config to use. Especially when a boot loader is used things can be messy otherwise.
Edit : these are just general remarks, I dont know the actual design here. _________________ Jan
also .. could someone please turn down the thermostat a bit.
|
|
Back to top
|
|
|
ejr27233
Joined: Feb 08, 2010 Posts: 52 Location: UK
|
Posted: Wed Dec 01, 2010 8:11 am Post subject:
|
|
|
I've tried burning the 16f88 with an external power supply and to my delight got all 0's when I read it which I thought meant it had loaded succesfully.
However when I tried it in the circuit I got nothing...the midi signal goes into the pic and nothing comes out. As I've built it on stripboard I'm not that confidant in my circuit so I'll be interested to here how Fonik gets on. |
|
Back to top
|
|
|
wmonk
Joined: Sep 15, 2008 Posts: 528 Location: Enschede, the Netherlands
Audio files: 15
|
Posted: Wed Dec 01, 2010 8:55 am Post subject:
|
|
|
Blue Hell wrote: | Edit : these are just general remarks, I dont know the actual design here. |
Perhaps you remember burning mine? That is the same, and it works on breadboard. _________________ Weblog! |
|
Back to top
|
|
|
blue hell
Site Admin
Joined: Apr 03, 2004 Posts: 24081 Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320
|
Posted: Wed Dec 01, 2010 8:56 am Post subject:
|
|
|
And a bit about LVP on PIC processors.
LVP is a configuration bit which must be set or cleared when the device is being programmed. LVP has nothing to do with the device Vcc.
When LVP is off it means that he processor reset input must be driven to a high voltage (Vpp, usually 12 .. 13 V, but to be looked up in the data sheet) to get the processor into programming mode.
And when LVP is on the RB3 pin (for this paricular processor) is being used as a PGM pin to allow for programming.
I never use LVP on PICs, as all my programmers will take care of Vpp on the reset pin, but look this up for your programmer (I suspect that most programmers will do this, as LVP mode will cost an I/O pin). _________________ Jan
also .. could someone please turn down the thermostat a bit.
|
|
Back to top
|
|
|
blue hell
Site Admin
Joined: Apr 03, 2004 Posts: 24081 Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320
|
Posted: Wed Dec 01, 2010 9:00 am Post subject:
|
|
|
wmonk wrote: | Perhaps you remember burning mine? That is the same, and it works on breadboard. |
Ah, ok, that means that the configuration is specified correctly in the hex file - I just burned it as is, no fiddling needed. _________________ Jan
also .. could someone please turn down the thermostat a bit.
|
|
Back to top
|
|
|
fonik
Joined: Jun 07, 2006 Posts: 3950 Location: Germany
Audio files: 23
|
Posted: Wed Dec 01, 2010 12:07 pm Post subject:
|
|
|
Blue Hell wrote: | And a bit about LVP on PIC processors.
LVP is a configuration bit which must be set or cleared when the device is being programmed. LVP has nothing to do with the device Vcc.
When LVP is off it means that he processor reset input must be driven to a high voltage (Vpp, usually 12 .. 13 V, but to be looked up in the data sheet) to get the processor into programming mode.
And when LVP is on the RB3 pin (for this paricular processor) is being used as a PGM pin to allow for programming.
I never use LVP on PICs, as all my programmers will take care of Vpp on the reset pin, but look this up for your programmer (I suspect that most programmers will do this, as LVP mode will cost an I/O pin). |
thank you very much for sharing, jan. i will take a look into that. _________________
cheers,
matthias
____________
Big Boss at fonitronik
Tech Buddy at Random*Source |
|
Back to top
|
|
|
fonik
Joined: Jun 07, 2006 Posts: 3950 Location: Germany
Audio files: 23
|
Posted: Wed Dec 01, 2010 12:17 pm Post subject:
|
|
|
pin RB3 is used as I/O here, so i can't use LVP, right? i will then have to use an external PSU for the programmer and go higher with the supply voltage, correct? (i.e. 12V) _________________
cheers,
matthias
____________
Big Boss at fonitronik
Tech Buddy at Random*Source |
|
Back to top
|
|
|
blue hell
Site Admin
Joined: Apr 03, 2004 Posts: 24081 Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320
|
Posted: Wed Dec 01, 2010 12:37 pm Post subject:
|
|
|
fonik wrote: | pin RB3 is used as I/O here, so i can't use LVP, right? i will then have to use an external PSU for the programmer and go higher with the supply voltage, correct? (i.e. 12V) |
No you'll kill it then
Just Vpp needs to be high voltage to help it into program mode (that is a voltage applied to the reset pin).
Edit : and all programmers I've seen sofar take care of that ... lemme look into that pickit thingie ... never had that one. _________________ Jan
also .. could someone please turn down the thermostat a bit.
|
|
Back to top
|
|
|
blue hell
Site Admin
Joined: Apr 03, 2004 Posts: 24081 Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320
|
Posted: Wed Dec 01, 2010 12:56 pm Post subject:
|
|
|
Pickit 2 should do it all when you set it up for in circuit programming properly. _________________ Jan
also .. could someone please turn down the thermostat a bit.
|
|
Back to top
|
|
|
blue hell
Site Admin
Joined: Apr 03, 2004 Posts: 24081 Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320
|
Posted: Wed Dec 01, 2010 1:04 pm Post subject:
|
|
|
http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en010243 - from that page download PIC16F87/88 Datasheet; look for ICD and or ICSP - figure 15.13 has the typical setup to be used (and do read the note above!), you can leave out the RB3/PGM link. _________________ Jan
also .. could someone please turn down the thermostat a bit.
|
|
Back to top
|
|
|
fonik
Joined: Jun 07, 2006 Posts: 3950 Location: Germany
Audio files: 23
|
Posted: Wed Dec 01, 2010 2:39 pm Post subject:
|
|
|
thanks for taking care and all your patience, jan.
this is all new to me, and i wished it was easier...
from my point of view PICkit2 should take care of it all. hopefully i will have more time tomorrow.
two last questions for today:
since the PICkit2 is powered by the USB port Vpp can't be higher than 4.8V. will this be enough?
what about the config word. have i do declare it? and if so, why could slo have been successfull?
oh, and i bought a 18pin expansion board for the PICkit. maybe i will have to set jumpers for the Vpp pin 4 and RB3/PGM pin 9. i will see.
BTW i already made a board (unfortunately without a in-circuit programming header ), so i will have to get t running:
_________________
cheers,
matthias
____________
Big Boss at fonitronik
Tech Buddy at Random*Source |
|
Back to top
|
|
|
|