Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Thread Tools Display Modes
Old 16th April 2008, 02:50 PM   (permalink)
Default Programming error- pic16lf84a

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
Attached Files
File Type: zip 16f84A.zip (84.6 KB, 9 views)
joshua17ss2 is offline  
Reply With Quote
Old 16th April 2008, 03:25 PM   (permalink)
Default

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
Norlin is offline  
Reply With Quote
Old 16th April 2008, 03:37 PM   (permalink)
Default 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
joshua17ss2 is offline  
Reply With Quote
Old 16th April 2008, 03:41 PM   (permalink)
Default

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.
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is offline  
Reply With Quote
Old 16th April 2008, 03:44 PM   (permalink)
Default

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\
Norlin is offline  
Reply With Quote
Old 16th April 2008, 03:47 PM   (permalink)
Default

Just a guess, but perhaps you have to declare the path to your device directory of mplab in C:\Program Files\WinPic\devices.ini
Norlin is offline  
Reply With Quote
Old 16th April 2008, 04:13 PM   (permalink)
Default

Quote:
Originally Posted by blueroomelectronics
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
joshua17ss2 is offline  
Reply With Quote
Old 16th April 2008, 04:22 PM   (permalink)
Default

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.
joshua17ss2 is offline  
Reply With Quote
Old 16th April 2008, 04:47 PM   (permalink)
Default

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
joshua17ss2 is offline  
Reply With Quote
Old 16th April 2008, 05:19 PM   (permalink)
Default

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 by Norlin; 16th April 2008 at 05:22 PM.
Norlin is offline  
Reply With Quote
Old 16th April 2008, 06:35 PM   (permalink)
Default

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.
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is offline  
Reply With Quote
Old 16th April 2008, 06:50 PM   (permalink)
Default

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
joshua17ss2 is offline  
Reply With Quote
Old 16th April 2008, 07:15 PM   (permalink)
Default

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
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is offline  
Reply With Quote
Old 16th April 2008, 07:55 PM   (permalink)
Default

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
joshua17ss2 is offline  
Reply With Quote
Old 16th April 2008, 08:50 PM   (permalink)
Default

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?
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is offline  
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Latest
Errors while programming a PIC16F874A Kitt0s Micro Controllers 17 8th March 2008 07:12 PM
Question about Inchworm+ Quan Micro Controllers 54 28th October 2007 12:20 AM
UNIT Committment solution using Dynamic programming arijit18 Electronic Projects 1 18th October 2007 08:27 PM
Programming languages sram General Electronics Chat 9 2nd March 2007 04:14 PM
Good Computer Programming Book ThermalRunaway Chit-Chat 21 16th September 2005 10:05 PM



All times are GMT. The time now is 06:06 AM.


Electronic Circuits  |  Electronics Wiki
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.