Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PIC16F688 + winpic problems

Status
Not open for further replies.

joe85

New Member
Hi guys,

I'm new to microcontroller programming and i just need a bit of help getting started.

I have a Velleman VM111 (K8048) programmer and I'm trying to program a pic16f688 using winpic. The progpic2 software that comes with the velleman programmer doesn't support the 16f688 so i have no choice but to use winpic.

The problem is that i keep getting verify errors when ever i try to load the hex file into the programmer. The file compiles fine (the code is just the 16f688 code template found in MPASM\Template\Code with a nop loop in the main section - see attachment), but i just cant get winpic to load it into the chip.


I know there is nothing wrong with the velleman programmer because i programmed the 16f627 chips on it successfully, except i used the progpic2 software that comes with it. So I'm guessing the problem lies within winpic? I get similar errors even if i try to program the 16f627 chip (even though the same files load fine using picprog2).

The following are screen shots of winpic settings and the errors i get (I have tried to keep the rest of the settings default):

Device, Config
**broken link removed**

Options
**broken link removed**

Interface
**broken link removed**

Error output (after i hit the program button)
**broken link removed**

AFAIK, Progpic2 does not support any pics with ADC (like the 16F688) so i really need to get Winpic to work (and I've tried almost everything).

Any ideas? Any response would be greatly appreciated.

Thanks. :)


p.s I attached the code as well just in case, but like i said, its just the code template for the chip with a loop that does nothing inside the main section.
 

Attachments

  • nop.asm
    4 KB · Views: 274
The problem is that although you have selected the custom interface Velleman config file in the interface section, it is greyed-out because the interface is still set to JDM.

Change the interface setting to "custom on com port defined by file"
Ensure that the Velleman custom interface file is now no-longer greyed-out and it should work.
 
Thanks a lot for that picasm. At least I'm one step closer. :) Now i can at least load the previous chip (16f627) using winpic (i had to choose the "no direct access at all, only use winapi" for the access driver) but still can't get it to load the pic16f688, which is what i want.

Here is the new error output:
Code:
Info: Loading definitions for "PIC16F688" from C:\Program Files\WinPic\devices.ini .
Info: PIC16F688 added and tested by FENG3, 2004-08-22
Parsed "C:\Program Files\Microchip\MPLAB IDE\Device\PIC16F688.dev" : found 26 bit combinations in 9 configuration bit groups .
Initialising PIC-Programmer: Success.
Testing: delay(500ms) took 0.53 seconds, timer_freq=3.5795 MHz ... ok

Programming...
Erasing ("bulk" or "chip") ...
Programming CODE, 0x000000..0x000011
Verifying 0x000000..0x000011
Verify Error: 000000: read 000000, wanted 002810
Verify Error: 000001: read 000000, wanted 003FFF
Verify Error: 000002: read 000000, wanted 003FFF
Verify Error: 000003: read 000000, wanted 003FFF
More Verify Errors, unable to list all (total=17)
Programming DATA, 0x002100..0x002103
Verifying 0x002100..0x002103
Verify Error: 002100: read 000000, wanted 000001
Verify Error: 002101: read 000000, wanted 000002
Verify Error: 002102: read 000000, wanted 000003
Verify Error: 002103: read 000000, wanted 000004
Programming CONFIG, 0x002000..0x002007
Verifying 0x002000..0x002007
Verify Error: 002007: read 000000, wanted 0030E4
Programming CONFIG-WORD
Verifying 0x002007..0x002008
Verify Error: 002007: read 000000, wanted 0030E4

ERROR: Programming FAILED ! ***(i've got a massive headache now) :p ***


Thanks again for that.
 
On the "options" screen you could try ticking "raise VDD before MCLR"

That option is needed for some chips (a 16f627 should work with or without it ticked but some other chips need it ticked)
 
Yeh should have mentioned i tried that too. When that setting is enabled and you select the pic16f688 from the list, a message pops up saying "conflicting Vpp/Vdd switching sequence" and attempts to untick that setting, but i've still tried forcing it on regardless of what that message says. I've also tried 2 different 16f688 just in case one was fried.

What does a "verify error" mean anyway?
 
The 688 doesn't appear to be supported by the **broken link removed**. However, it should work if you wire it up on a breadboard.

Mike.
 
What does a "verify error" mean anyway?
It means that the programmer read back something different, from the PIC's memory, than what it wrote. The errors you are getting seem to indicate that the programmer isn't communicating with the PIC at all because you are getting zeros when reading it back on the verify.
 
Last edited:
Yeh should have mentioned i tried that too. When that setting is enabled and you select the pic16f688 from the list, a message pops up saying "conflicting Vpp/Vdd switching sequence" and attempts to untick that setting,

There are 2 programming algorithms, The old one raises vdd before vpp (looking at the k8048 circuit diagram this is what it has to use because the vdd (+5v) is permanently on.

The second (newer) algorithm raises vpp first then vdd - but the k8048 cannot do this.
Winpic has a config file for the 16f688 (devices.ini) in which it specifies "VppVddSequence=Vpp_before_Vdd"

The 16f688 can also use the old vdd-vpp mode but is best programmed in the new vpp-vdd mode because it allows you to use the internal oscillator with mclr disabled.

As your k8048 cannot do vpp-vdd, and does not like you ticking the box to enable vdd-vpp then you could try editing the ini file and changing the line to:
VppVddSequence=Vdd_before_Vpp

That may get it working - but then you must never enable the internal oscillator and disable mclr or you will not be able to re-program it again with the k8048.

The k8048 is a very limited programmer due to that permanantly on vdd voltage.
 
hey guys,

Thanks all for your help.

Just a little update, i tried all that was mentioned and nothing seemed to work. I ended up getting a pickit2 programmer which is great (love the potentiometer for ADC testing). I'm working on the 16f690 chip which looks good so far.

That may get it working - but then you must never enable the internal oscillator and disable mclr or you will not be able to re-program it again with the k8048.

I hope you're not implying that it will fry the k8048? :eek:
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top