PIC16F84A winpic programming problem

Discussion in 'Embedded Systems and Microcontrollers' started by lloydi12345, Aug 15, 2010.

  1. lloydi12345

    lloydi12345 Thread Starter Member

    Joined:
    Aug 15, 2010
    Messages:
    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: Aug 15, 2010
  2. debjit625

    debjit625 Active Member

    Joined:
    Apr 17, 2010
    Messages:
    790
    Location:
    Blue planet...
    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
  3. lloydi12345

    lloydi12345 Thread Starter Member

    Joined:
    Aug 15, 2010
    Messages:
    103
    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?
  4. debjit625

    debjit625 Active Member

    Joined:
    Apr 17, 2010
    Messages:
    790
    Location:
    Blue planet...
    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
  5. lloydi12345

    lloydi12345 Thread Starter Member

    Joined:
    Aug 15, 2010
    Messages:
    103
    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?
  6. retched

    retched AAC Fanatic!

    Joined:
    Dec 5, 2009
    Messages:
    5,198
    Location:
    Baltimore, MD
    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.
  7. lloydi12345

    lloydi12345 Thread Starter Member

    Joined:
    Aug 15, 2010
    Messages:
    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.

    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: Aug 16, 2010
  8. t06afre

    t06afre AAC Fanatic!

    Joined:
    May 11, 2009
    Messages:
    5,939
    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 ;)
  9. retched

    retched AAC Fanatic!

    Joined:
    Dec 5, 2009
    Messages:
    5,198
    Location:
    Baltimore, MD
    That is true.
  10. Markd77

    Markd77 Senior Member

    Joined:
    Sep 7, 2009
    Messages:
    2,801
    Location:
    Birmingham
    It might also be worth checking this line in the messages:
    Looks like a file needs copying, there should be something in the instructions.
  11. t06afre

    t06afre AAC Fanatic!

    Joined:
    May 11, 2009
    Messages:
    5,939
    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 ;)
  12. debjit625

    debjit625 Active Member

    Joined:
    Apr 17, 2010
    Messages:
    790
    Location:
    Blue planet...
    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
  13. lloydi12345

    lloydi12345 Thread Starter Member

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

    [​IMG]

    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: Aug 17, 2010
  14. t06afre

    t06afre AAC Fanatic!

    Joined:
    May 11, 2009
    Messages:
    5,939
    Does it work now?
  15. lloydi12345

    lloydi12345 Thread Starter Member

    Joined:
    Aug 15, 2010
    Messages:
    103
    EDIT: I mean Pin #4 & #1 are ground

    the programer still can't be detected and also the PIC :(
  16. t06afre

    t06afre AAC Fanatic!

    Joined:
    May 11, 2009
    Messages:
    5,939
    Why are you holding on to that circuit? You have much better change of success with the circuit from debjit625.
  17. lloydi12345

    lloydi12345 Thread Starter Member

    Joined:
    Aug 15, 2010
    Messages:
    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.


    [​IMG]
Similar Threads
Forum Title Date
Embedded Systems and Microcontrollers Difference between coding for PIC16F84 and PIC16F84A May 18, 2013
Embedded Systems and Microcontrollers Using PICkit 2 from within MPLAB to program PIC16F84A Mar 3, 2013
Embedded Systems and Microcontrollers need help coding pic16f84a scanning of switches Aug 26, 2012
Embedded Systems and Microcontrollers Blinking LEDS using PIC16F84A Aug 3, 2012
Embedded Systems and Microcontrollers PIC16F84A 13 LED Chaser Video May 31, 2012

Share This Page