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 a 16F628, problems

Status
Not open for further replies.

edeca

Active Member
I am trying to program a PIC 16F628 with Winpic and a JDM2 programmer. I have previously programmed this chip successfully, but this time the software just reads 3FFF back from the programmer for every memory location. With no cable attached, it reads 0000 back.

I have previously (a year or so ago) programmed the PIC successfully, but I don't have another one to try.

Is this a broken PIC or do I have something else wrong? Winpic can successfully initialise the programmer with the serial cable attached and fails (correctly) to initialise with no cable.

I generated the hex file with the CCS compiler and the only warning is that the ";16F628" comment at the bottom of test.hex is a "strange line".
 
blueroomelectronics said:
Have you upgraded your PC or OS in the last year?

I have definitely upgraded since I last tried. The serial port is a real on-board one, not a USB dongle.

I have searched the forums for ideas and see lots of people with similar problems. I bought my programmer as a pre-assembled board. Other posts suggest that the programmer might not be getting the correct voltage, but I'm unsure how to test the programmer. According to the A4 sheet I got with it, the serial port should power it with no problem.

My other machine is a laptop but does not have a serial port, so I can't test it there easily.

Is it most likely to be the PIC or programmer?
 
Try programming it with a known good hex file...just in case your "strange line" warning is generating an empty file. Also check all your voltages, any out of whack will cause you no end of headaches and as Blueroom mentioned, check the port speeds etc do not exceed the limitations of the programmer.

rgds
 
OK, so looks like I need a decent programmer. I don't mind if it is/isn't USB and I don't mind external power.

It would be nice if I could get something which is a combination of programmer and test board, even just 8 LEDs and a few switches so I can learn some more assembly/C. I'll probably be sticking with 16F628s for the moment, but support for better devices wouldn't be a problem. A header for an LCD would be nice, I might play with one of them soon. I'm using Windows XP. I don't really want to spend too much on it as I can't guarantee I'll use it lots.

So, does anybody have a recommendation for a board?
 
edeca said:
OK, so looks like I need a decent programmer. I don't mind if it is/isn't USB and I don't mind external power.

It would be nice if I could get something which is a combination of programmer and test board, even just 8 LEDs and a few switches so I can learn some more assembly/C. I'll probably be sticking with 16F628s for the moment, but support for better devices wouldn't be a problem. A header for an LCD would be nice, I might play with one of them soon. I'm using Windows XP. I don't really want to spend too much on it as I can't guarantee I'll use it lots.

So, does anybody have a recommendation for a board?

Take a look at the Junebug and Unicorn kits on my site.

Search the forums here for their names :)
 
edeca said:
It would be nice if I could get something which is a combination of programmer and test board, even just 8 LEDs and a few switches so I can learn some more assembly/C. ..

So, does anybody have a recommendation for a board?

Look at the Junebug. It is a top notch programmer/debugger. The 18F1320 target/tutor section has just enough gadgets to make it useful.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top