All About Circuits Forum  

Go Back   All About Circuits Forum > Software, Microcomputing, and Communications Forums > Embedded Systems and Microcontrollers

Notices

Embedded Systems and Microcontrollers Discussion forum for projects and working with embedded systems and microcontrollers (FPGAs, PICs, AVRs). Get help with hardware issues and embedded programming.

Reply   Post New Thread
 
Thread Tools Display Modes
  #1  
Old 08-15-2010, 06:40 AM
lloydi12345 lloydi12345 is offline
Senior Member
 
Join Date: Aug 2010
Posts: 103
Default PIC16F84A winpic programming problem

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/micr...rogrammer.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 by lloydi12345; 08-15-2010 at 06:47 AM.
Reply With Quote
  #2  
Old 08-15-2010, 07:22 AM
debjit625's Avatar
debjit625 debjit625 is offline
Senior Member
 
Join Date: Apr 2010
Location: Blue planet...
Posts: 790
Default

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
Reply With Quote
  #3  
Old 08-15-2010, 09:14 AM
lloydi12345 lloydi12345 is offline
Senior Member
 
Join Date: Aug 2010
Posts: 103
Default

Quote:
Originally Posted by debjit625 View Post
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...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?
Reply With Quote
  #4  
Old 08-15-2010, 08:38 PM
debjit625's Avatar
debjit625 debjit625 is offline
Senior Member
 
Join Date: Apr 2010
Location: Blue planet...
Posts: 790
Default

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
Reply With Quote
  #5  
Old 08-15-2010, 11:43 PM
lloydi12345 lloydi12345 is offline
Senior Member
 
Join Date: Aug 2010
Posts: 103
Default

Quote:
Originally Posted by debjit625 View Post
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?
Reply With Quote
  #6  
Old 08-16-2010, 02:54 AM
retched's Avatar
retched retched is offline
Senior Member
 
Join Date: Dec 2009
Location: Baltimore, MD
Posts: 5,198
Blog Entries: 14
Default

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.
__________________
-rm-
Reply With Quote
  #7  
Old 08-16-2010, 06:07 AM
lloydi12345 lloydi12345 is offline
Senior Member
 
Join Date: Aug 2010
Posts: 103
Default

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 !
Select All
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 by lloydi12345; 08-16-2010 at 06:33 AM.
Reply With Quote
  #8  
Old 08-16-2010, 08:34 AM
t06afre's Avatar
t06afre t06afre is offline
Senior Member
 
Join Date: May 2009
Posts: 5,939
Default

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
Reply With Quote
  #9  
Old 08-16-2010, 11:55 AM
retched's Avatar
retched retched is offline
Senior Member
 
Join Date: Dec 2009
Location: Baltimore, MD
Posts: 5,198
Blog Entries: 14
Default

Quote:
Originally Posted by t06afre View Post
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.
__________________
-rm-
Reply With Quote
  #10  
Old 08-16-2010, 11:56 AM
Markd77's Avatar
Markd77 Markd77 is offline
Senior Member
 
Join Date: Sep 2009
Location: Birmingham
Posts: 2,782
Blog Entries: 1
Default

It might also be worth checking this line in the messages:
Quote:
Couldn't find "devices\PIC16F84A.dev", please borrow/copy from MPLAB !
Looks like a file needs copying, there should be something in the instructions.
Reply With Quote
Reply   Post New Thread

Tags
, , , ,


Related Site Pages
Section Title
Worksheet Performance-based assessments for digital circuit competencies


Similar Threads
Thread Thread Starter Forum Replies Last Post
need help ( programming pic16f84a) hussainee1988 Programmer's Corner 4 01-10-2010 07:35 PM
programming pic16f84a hussainee1988 Programmer's Corner 6 12-10-2009 03:39 PM
Obscure programming languages Mark44 Programmer's Corner 4 09-02-2008 07:03 PM
troubleshooting. trying to identify a component and problem John68 The Projects Forum 5 12-13-2007 10:01 PM
68000 Programming problem JLam Programmer's Corner 0 02-15-2005 08:08 AM

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:09 PM.


User-posted content, unless source quoted, is licensed under a Creative Commons Public Domain License.
Powered by vBulletin
Copyright ©2000 - 2014, vBulletin Solutions, Inc.