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.

Programming error- pic16lf84a

Status
Not open for further replies.

joshua17ss2

New Member
I am trying to get a programmed burned in to a pic, and ive having some difficultys, this i the first pic im trying to program, im using a jdm programmer i got from ebay. and a pic 16lf84a,
im trying to get just a basic led blink programmed, and its failing, i am trying to write the code in Basic, PBP editor, i got the program to compile creating the asm and hex file, i load the hex in to winpic and it fails, ive tried different pics, different settings and it comes out the same
i have attached a zip file containing pictures of settings, the error log, and the program files, and help or advice would be aprciated
thanks
josh
 

Attachments

  • 16f84A.zip
    84.6 KB · Views: 465
I don't use winpicprog, but does it have a 16F84A setting that you could use instead of the 16F84? These are two slightly different PICs
Also, if you're starting out, I'd recommend using a different PIC, the 16F84A is outdated
 
pic16lf84a

I did run it with the setting for the 84a , it gereneated the same results.
i have tried to use at pic18f2550 and i still get a programming error, im thinking that it might be a mistake in the code.
do i need to specify the pic in the basic code, there was no where to select the pic being used in the editor

any suggestions on alternative software for programming with basic and a JDM programmer.

Im used to working with the basic stamp- im trying to transistion to pic's for so i can lower my cost of projects.

thanks
josh
 
If your JDM doesn't work with either the 16F84A or the 18F2550 why would you think it's your code?
JDMs can be tough to get working on modern PCs.
 
looking at your error log I see:

Couldn't find "devices\PIC16F84A.dev", please borrow/copy from MPLAB !

Couldn't find "devices\PIC16F84.dev", please borrow/copy from MPLAB !

I don't use winpicprog so I don't know what these mean, but I'm guessing solving these problems might help you on your way
These files on my machine are found at:
C:\Program Files\Microchip\MPLAB IDE\Device\
 
Just a guess, but perhaps you have to declare the path to your device directory of mplab in C:\Program Files\WinPic\devices.ini
 
blueroomelectronics said:
If your JDM doesn't work with either the 16F84A or the 18F2550 why would you think it's your code?
JDMs can be tough to get working on modern PCs.

Well i loaded it in winpic800 and it can detect the 18f2550, not the 16f, it seems like it can read from the devices with out a problem but generate write errors?
My code is writen in basic and compiled using PBP, i have tried to learn assembely but i have been unsuccessfull for this.
the hardware test says ok.
thanks
josh
 
ok i maped the MPlab dev folder, and switch to using a pic18F4550,
it still give a programming error
Initialising PIC-Programmer: Success.
Info: Loading definitions for "PIC18F2550" from C:\Program Files\WinPic\devices.ini .
Info: Support for some newer PIC18F devices added by Martin v.d. Werff 2005
Parsed "C:\Program Files\Microchip\MPLAB IDE\Device\PIC18F2550.dev" : found 113 bit combinations in 39 configuration bit groups .
PIC18F: family='21'=4550, WriteLatch=32 bytes, EraseLatch=64 bytes .
Programming...
Erasing ("bulk" or "chip") ...
Programming CODE, 0x000000..0x00400E
Verifying CODE, 0x000000..0x00400E
Verifying 0x000000..0x00400E
Verify Error: 000000: read 00FFFF, wanted 002828, mask 00FFFF ==> diff=00D7D7
Verify Error: 000002: read 00FFFF, wanted 00018F, mask 00FFFF ==> diff=00FE70
Verify Error: 000004: read 00FFFF, wanted 00008E, mask 00FFFF ==> diff=00FF71
Verify Error: 000006: read 00FFFF, wanted 0030FF, mask 00FFFF ==> diff=00CF00
More Verify Errors, unable to list all (total=8200)
Problem: Buffer contains more CONFIG MEMORY WORDS (8) than exist in device (7) .
Programming CONFIG, 0x300000..0x30000C
Verifying CONFIG, 0x300000..0x30000C
Verifying 0x300000..0x30000C
Verify Error: 300000: read 00FFFF, wanted 003FFF, mask 00CF3F ==> diff=00C000
Verify Error: 300004: read 00FFFF, wanted 003FFF, mask 008700 ==> diff=008000
Verify Error: 300008: read 00FFFF, wanted 003FFF, mask 00C00F ==> diff=00C000
Verify Error: 30000A: read 00FFFF, wanted 003FFF, mask 00E00F ==> diff=00C000
More Verify Errors, unable to list all (total=5)
ERROR: Programming FAILED !
Reading 0x3FFFFE - 0x3FFFFF ...
Reading 0x300000 - 0x30000D ...
Reading 0xF00000 - 0xF000FF ...
Reading 0x000000 - 0x007FFF ...
Reading PIC ok.
 
Ok so that may not prove anything i just pushed the program and read buttons with the programmer disconnected from the computer and it did the exact same thing the program failed but the read was successefull.
Could i possible get better results trying this on an older computer, or a desktop mabye?
the oldest computer i got is an old dell CPX.
thanks
josh
 
sounds like a hardware problem with the programming circuit. if you search this forum for JDM programmer, you'll see that they're notoriously bad, if you're really interested in working with PICs I'd highly recommend purchasing a good programmer, they aren't even very expensive.
If you follow the link in Bill's signature in the post above, he sells programmers that he makes which work for a wide variety of chips and is quite inexpensive.

After all, you will want to be spending your time troubleshooting your PIC program, not your PIC programmer!
 
Last edited:
If the 18F PICs & BASIC are what you're using you should take a look at Swordfish BASIC. Its a pleasure to program with and has a free SE version.
Highly Recommended.
 
thanks i am downloaded a copy of that now and i will play around with it. i love programming in basic, i started with the basic stamp and it provided all the functions i needed, i only needed on and off, and rought timing, nothing to intense but my need for inputs and outputs has grown.

i will look in to getting a new programmer, i am searching ebay becuase i have very limited amounts of money to play with, my company has a programmer i might try running my program with that just to see if it would work.

if i could just burn a usb bootloaded on the 18f4550 i could add the usb program port on board. but I was wondering about that, what software would you use to program the micrcontroller thought the usb, when i want to change my program?

thanks
josh
 
You still need a programmer to get the bootloader on the PIC in the first place.
My Junebug an MPLAB PICkit2 compatible programmer is USB
 
the place when i work has a very big pic programmer and i was thinking of mabye trying that to burn in a usb boot loaded to the chip and then i would be able to update the programs via a usb connection from then on.

im gonna sell my older 16f pic on ebay, and see if i can make enought from that to buy a new programmer for the 18f


I was wondering if anyone has any recommendation as to, an In Circuit programmer verse the external programmer.
I actually had another question about the jdm that i have, if i were to try and run it on an older desktop that i have, with win xp would i still run in to the trouble?
thanks
 
Once you get a decent programmer you'll probably have no desire for a bootloader. Besides the better ones debug too.
What 16F are you selling?
 
ive got several different 16f in farly large number i believe, i bought up a bunch when i was just getting started. ill pull out the box when i get home and take a look. I really want to settel on using 2 chips the 18f4550 and 18f2550, i like the number of pins, program space, and the usb cababilites.
 
well for programmer, like I said a lot of people recommend Bill's stuff
I don't personally have one of his programmers, but out of the ones I have I love my mikroelektronika easypic4 (https://www.mikroe.com), it's a development board so it's a bit pricier, but it provides a huge bang for the buck. I got started using kit 150 from kitsrus and never had any problems with it, used it for ICSP until I got my ICD2 from microchip. I'm happy with all of them, initially I started with a JDM programmer, but after screwing around with it for like 2 weeks and not getting a single PIC programmed, I tossed it and went with the kit 150.
 
Last edited by a moderator:
Norlin said:
well for programmer, like I said a lot of people recommend Bill's stuff
I don't personally have one of his programmers, but out of the ones I have I love my mikroelektronika easypic4 (https://www.mikroe.com), it's a development board so it's a bit pricier, but it provides a huge bang for the buck. I got started using kit 150 from kitsrus and never had any problems with it, used it for ICSP until I got my ICD2 from microchip. I'm happy with all of them, initially I started with a JDM programmer, but after screwing around with it for like 2 weeks and not getting a single PIC programmed, I tossed it and went with the kit 150.
Oh, you just hit a sore spot for me. Please don't recommend the K150. Hardware-wise it's not so bad, but the company is a mess. There are no updates. The programmer is useless. Can't program most of the chips I want to use. No debugging. And it's horribly slow! How do I know? I own one of those pieces of crap. It sits in the bottom of a junk box now.

These days I program PICs with a

The Junebug & PICkit 2 get used the most. If you're looking for an excellent, inexpensive PIC programmer that does everything, get one of those two.

Pros/Cons:
Con 1. Junebug won't program 3.3V PICs without modification. (Not that big of a problem)

Pro 1. Junebug has an 18F1320 experimenter onboard with the PICkit 2 clone programmer part.

Con 2. PICkit 2 has a programming cable connector that I'm not thrilled with. But it's useable.
 
Last edited by a moderator:
blueroomelectronics said:
Once you get a decent programmer you'll probably have no desire for a bootloader. Besides the better ones debug too.
What 16F are you selling?
i went thought my box of pics and i got a bunch im gonna sell, a lot of pic 16f84a, pic16lf84a, 16f877, dspic30f, 18f4685, dspic30f3014, 18f 4423, 18f4682. and im sure there are more if i dig in to the box.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top