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.

PIC programming problems

Status
Not open for further replies.

rogerjef

New Member
Hi Folks.

I have a problem with programming various types of dsPICs, in a development environment

There seem to be a very limited number of times that the PIC can be reprogrammed.

Has anybody else encountered this problem, and or found a fix, (apart from replacing the PIC)?

Thanks

Roger
 
rogerjef said:
Hi Folks.

I have a problem with programming various types of dsPICs, in a development environment

There seem to be a very limited number of times that the PIC can be reprogrammed.

Has anybody else encountered this problem, and or found a fix, (apart from replacing the PIC)?

Never used a dsPIC, but the minimum number of times a PIC can be reprogrammed is listed in the datasheets, and is usually well in the thousands - I've never heard of anyone 'wearing one out'.
 
You're doing something wrong or foolish if you're wearing out the Flash. Most modern PICs have 100,000 write cycles. What's the application?
 
I've had similar issues. Your programmer connector is not getting a good connection, or if you're doing in-circuit programming, you might have a power supply issue. I've found that with ICP, I have to have the whole system powered up for it to work.
 
I have managed to hit the eeprom write limit on a PIC. My program was writing to the same location as fast as possible and after an hour or so that location was stuck.

However, some PICs, such as the 18F25J10 are a lot more limited and have a minimum endurance or 100, with a typical value of 1000.

It is also possible to have a PIC in an application that stops it being programmed. During programming the programmer briefly releases the reset line, and if the program / circuit does something odd immediately, the programmer gets upset.

On one application, we have a power reset that causes a system reboot. We reallocated the pin that drives that between hardware versions. If we program one hardware version with the software of the other, this kicks in immediately, so the power is only on for 1/2 a second at a time. With a 18F25J10 the maximum voltage is only 3.6V so we can't power it from the ICD2. We have to physically disable the power reset before we can reprogram.
 
Thanks guys.

The application is for a rotary steerable down hole tool.

We use a dsPIC30F6015 for our main processor, and a dsPIC30F3010 for the motor controller.

All voltages seem ok, including during programming. I have ,however, Just found that during programming the MCLR\ is going negative by some 1V.

I have just fitted a 100R resistor to limit the current out of the pin during these negative excursion.

Any other thoughts would be appreciated.

Regards

Roger
 
Driver300 said:
I have managed to hit the eeprom write limit on a PIC. My program was writing to the same location as fast as possible and after an hour or so that location was stuck.
I didn't know you could program a PIC to reprogram itself.

How did you resolve the issue?

Did you spread the writing across many locations, cut down on the frequency and only wright when the value actually changed.?
 
You can program PICs to program their own program memory. That is what bootloaders do.

On some PICs, such as pic18F24J10, the only EEPROM is the program memory.

I wasn't actually programming the program space. I was writing to the data EEPROM. That has a larger endurance, but it is still only 1,000,000 or so.

My code wrote to a couple of locations as fast as possible, so about every 2 ms, or 4ms for two locations. That is 250 times per second, so 1,000,000 in 4000 seconds, or about an hour.

My code was faulty. I was trying to get it to write only when the data wasn't correct, but that obviously didn't work. I changed it to write when the data was new.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top