PIC16F84A winpic programming problem

Thread Starter

lloydi12345

Joined Aug 15, 2010
103
Hello, it is my first time on programming a PIC and i would like to start from PIC16F84A. I used WINPIC and had an error "ERROR: Programming FAILED !" The codes turned red..

I copied this messages from the Messages tab:

Programming...
Erasing ("bulk" or "chip") ...
Programming CODE, 0x000000..0x000011
Verify Error: 000000: read 000001, wanted 001683
Verify Error: 000001: read 000001, wanted 003000
Verify Error: 000002: read 000001, wanted 000086
Verify Error: 000003: read 000001, wanted 0030FF
Verify Error: 000004: read 000001, wanted 000085
Verify Error: 000005: read 000001, wanted 001283
Verify Error: 000006: read 000001, wanted 003000
Verify Error: 000007: read 000001, wanted 000086
Verify Error: 000008: read 000001, wanted 001805
Verify Error: 000009: read 000001, wanted 00280D
Verify Error: 00000A: read 000001, wanted 003001
Verify Error: 00000B: read 000001, wanted 000086
Verify Error: 00000C: read 000001, wanted 002808
Verify Error: 00000D: read 000001, wanted 001885
Verify Error: 00000E: read 000001, wanted 002808
Verify Error: 00000F: read 000001, wanted 003002
Verify Error: 000010: read 000001, wanted 000086
Programming aborted after 17 errors.
Suspicious: Buffer contains no data for the CONFIGURATION BITS.
Programming CONFIG-WORD

Can you help me how to program my PIC? I made my own PIC Programmer based from JDM Programmer but omitted the IC sockets. I am using the ICSP method. My PIC is placed on the breadboard and I'm just connecting the 4 wires from the programmer to its corresponding pin.

I am using the JDM programmer from this site:

http://www.circuit-projects.com/microcontroller/pic-and-eeprom-programmer.html


These are the 6 wires I've used:

1- connected to MCLR pin of PIC16F84A
2- not used
3- connected to the ground (somewhere around the keyboard)
4- connected to RB7
5- connected to RB6
6- not used
 
Last edited:

debjit625

Joined Apr 17, 2010
790
When making programmer first time allways try to make a parallel port based programmer,JDM programmers have different problems because they use computers serial port's power to power the programmer and some serial port doesnt provide that much power, like in some laptops have serial port but use very low power as they are battery operated so that will not work.On the other hand parallel port programmer have external power supply so they work properly.

Microchip provided pc based parrallel port programmer named as "AN589" you can search it on microchip's website

A AN589 based programmer from Oshonsoft http://www.oshonsoft.com/picprog.html

Good Luck
 

Thread Starter

lloydi12345

Joined Aug 15, 2010
103
When making programmer first time allways try to make a parallel port based programmer,JDM programmers have different problems because they use computers serial port's power to power the programmer and some serial port doesnt provide that much power, like in some laptops have serial port but use very low power as they are battery operated so that will not work.On the other hand parallel port programmer have external power supply so they work properly.

Microchip provided pc based parrallel port programmer named as "AN589" you can search it on microchip's website

A AN589 based programmer from Oshonsoft http://www.oshonsoft.com/picprog.html

Good Luck
EDIT:
These are the 6 wires I've used:

1 (MCLR) - connected to MCLR pin of PIC16F84A
2 (VDD) - voltage supply
3 (GND) - connected to the ground (somewhere around the keyboard)
4 (PGD) - connected to RB7
5 (PGC) - connected to RB6
6 (GND) - connected to the ground (somewhere around the keyboard)

I hope you could see the schematic diagram included on the site to confirm if I've done the connections right.

The schematic is included on this link. Please do see it.
http://www.circuit-projects.com/cimg/prg/PIC-and-EEPROM-Programmer.rar

Hi, thanks for the reply,but I would insist to continue my JDM version programmer without the Parallel port because I don't have it on my cpu.

How about suggesting something that I can add? I have searched a lot from the internet additional circuits to add on my breadboard when programming my PIC.

1.Do i have to place resistors on rb6 and rb7 pins of my PIC?

2.Do I also have to add sort of a circuit like on the MCLR pin to have like 13v?

3.Do I also have to add external power supply of 5v for my programmer circuit board?
 

debjit625

Joined Apr 17, 2010
790
Look you didnt understood,To program PIC16F84A you need a high voltage on MCLR pin which should be greater than 12VDC and Less then 14VDC (as per datasheet),now in case of JDM based programmer where this voltage comes from? it comes from the serial port of your computer ,but here is the problem not every computer is able to provide this much voltage so it will not work.

If you dont have parrallel port then make a serial port programmer with external power supply. http://www.oshonsoft.com/picprogserial.html

Or you could search google "external powered PIC serial port programmer"

Hope this helps.
Good Luck
 

Thread Starter

lloydi12345

Joined Aug 15, 2010
103
Look you didnt understood,To program PIC16F84A you need a high voltage on MCLR pin which should be greater than 12VDC and Less then 14VDC (as per datasheet),now in case of JDM based programmer where this voltage comes from? it comes from the serial port of your computer ,but here is the problem not every computer is able to provide this much voltage so it will not work.

If you dont have parrallel port then make a serial port programmer with external power supply. http://www.oshonsoft.com/picprogserial.html

Or you could search google "external powered PIC serial port programmer"

Hope this helps.
Good Luck
thank you, now i get it, Do i still need to have an external power supply for the 2nd wire to power up my Programmer board? at the same time I'm connecting the 1st wire to the 13v power supply too (Do i need here a circuit like composed of resistors and capacitors)? Did i get it right sir?
 

retched

Joined Dec 5, 2009
5,207
It is possible to use a transistor with an outside power supply to provide the needed voltage for the high-voltage programming, but it can be more trouble than it is worth and can cause you to BRICK many PICs in the process of figuring everything out.
 

Thread Starter

lloydi12345

Joined Aug 15, 2010
103
I would like to update on what I did on my PIC Programmer..

What i did is, in a breadboard I plugged my PIC 16F84A.

Here are the ICSP wires from the JDM programmer circuit board I made that is plugged at the CPU. The red LED and yellow LED turns on. (no sign of green LED)

1st Wire (MCLR) - I used a canon adapter which gives around 13-15v when measured on a multi tester. I connected the adapter's output voltage to the MCLR pin of the PIC16F84A using a jumper wire. I also connected at the same time the 1st wire of the ICSP wires on the same connection.

2nd Wire (VCC) - I used my cellphone charger which gives an 8v. I connected it on a 7808 voltage regulator. Its output then is 6.5v so I connected it again to another 7808 voltage regulator. Now I have 5v on its output. I connected the 5v to the 2nd wire of the ICSP wires.

3rd Wire (GND) - I connected the 3rd wire of the ICSP wires in the ground of my circuit in the breadboard.

4th Wire (PGD) - I connected the 4th wire to the RB7 Pin of PIC16F84A.

5th Wire (PGC) - I connected the 5th wire to the RB6 Pin of PIC16F84A.

6th Wire (GND) - I connected the 6th wire on the same line of the 3rd wire.


I hope you could get what I'm saying here. Do I also have to include a picture of all of this?

When I tested it on WINPIC. I loaded a .hex file on the PIC and here are the messages on Messages Tab.

Rich (BB code):
Info: Loading definitions for "PIC16F84A" from devices.ini .
Info: PIC16F84A added and tested by FENG3
Couldn't find "devices\PIC16F84A.dev", please borrow/copy from MPLAB !
Failed read back of DATA line (HIGH) !
WARNING: Could not initialize programmer !
Testing: delay(500ms) took 0.50 seconds, timer_freq=2.6016 MHz ... ok
Programming...
Erasing ("bulk" or "chip") ...
Programming CODE, 0x000000..0x00000D
Verify Error: 000000: read 000000, wanted 001683
Verify Error: 000001: read 000000, wanted 003000
Verify Error: 000002: read 000000, wanted 000086
Verify Error: 000003: read 000000, wanted 000085
Verify Error: 000004: read 000000, wanted 001283
Verify Error: 000005: read 000000, wanted 0030FF
Verify Error: 000006: read 000000, wanted 000085
Verify Error: 000007: read 000000, wanted 000086
Verify Error: 00000A: read 000000, wanted 003000
Verify Error: 00000B: read 000000, wanted 000085
Verify Error: 00000C: read 000000, wanted 000086
Verify Error: 00000D: read 000000, wanted 002805
Suspicious: Buffer contains no data for the CONFIGURATION BITS.
Programming CONFIG-WORD
Verify Error: 002007: read 000000, wanted 003FFF
ERROR: Programming FAILED !
I tried also WinPic800. When I click "Hardware Test". It says Failed to open Ind.#0.

I think my computer wont detect my PIC.

Any additional advice for me? I really want to make my programmer work. I'm really working hard to make everything work because this is the start of our school project. We are not allowed to buy PIC programmers because we are required to present homemade PIC Programmer. I already spend 2 weeks figuring out how to solve the problem and I think one by one I'm moving closer on making it run. Anyway, this is still fun for me so I'm not giving up that easy.
 
Last edited:

t06afre

Joined May 11, 2009
5,934
If your budget permits it you should get a PICKIT 2 or PICKIT 3 unit or clone. You can program a wide range of PICs. And they do work without problems, it is plug and play, not plug and pray. It is nothing wrong in using the god old 16f84A. But you can get PICs with more functions that cost less. More timers, PWM, ADC, to mention some functions. More is less ;)
 

retched

Joined Dec 5, 2009
5,207
If your budget permits it you should get a PICKIT 2 or PICKIT 3 unit or clone. You can program a wide range of PICs. And they do work without problems, it is plug and play, not plug and pray. It is nothing wrong in using the god old 16f84A. But you can get PICs with more functions that cost less. More timers, PWM, ADC, to mention some functions. More is less ;)
That is true.
 

Markd77

Joined Sep 7, 2009
2,806
It might also be worth checking this line in the messages:
Couldn't find "devices\PIC16F84A.dev", please borrow/copy from MPLAB !
Looks like a file needs copying, there should be something in the instructions.
 

t06afre

Joined May 11, 2009
5,934
We are not allowed to buy PIC programmers because we are required to present homemade PIC Programmer. I already spend 2 weeks figuring out how to solve the problem and I think one by one I'm moving closer on making it run. Anyway, this is still fun for me so I'm not giving up that easy.
Oh sorry did not see this. That will rule out using a PICKIT, but anyway if you plan do some pic programming after this project get a PICKIT.
What is your current schematic. You are talking about parts that I can not find in your first schematic. And that is confusing. But I think you are on the correct track using an external power supply. And also note the tip from mark77. That may be very important for you ;)
 

debjit625

Joined Apr 17, 2010
790
thank you, now i get it, Do i still need to have an external power supply for the 2nd wire to power up my Programmer board? at the same time I'm connecting the 1st wire to the 13v power supply too (Do i need here a circuit like composed of resistors and capacitors)? Did i get it right sir?
You got it a bit ,Just try to forget your old circuit because it take the power from your computer which is quite low I think and that is the reason why it didnt worked.Now you could modify the old circuit with an external power supply but that will be a mess.And no you cant directly apply the VDD (2nd) with 5VDC and MCLR (1st) with 13V they are switched on and off by the application software (programming software) on your computer.If you want to do that you have to modify your old circuit with some short of switching circuits and which will be a mess as you have to deconstruct the whole old circuit.

As its the first time for you dont make it a mess just keep it simple.
So go to http://www.oshonsoft.com/picprogserial.html and make this circuit and use the program given on the website.

Later you can mess with the old circuit anytime.

Good Luck
 

Thread Starter

lloydi12345

Joined Aug 15, 2010
103
I would like to show my pic programmer schematic here.



I already corrected the connections. I reversed it, because i know pin #6 is the MCLR and pin #3 and pin #6 are ground based on the schematic
 
Last edited:

Thread Starter

lloydi12345

Joined Aug 15, 2010
103
Sorry for the delay in the reply..Thank you guys for all the reply.. Is it okay if I'll use this type of programmer? It is working well and it is very cheap.


 
Top