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.

Not to overwrite EEPROM while reprogramming micro controller

Status
Not open for further replies.

haxan

New Member
Hi, is it possible to not overwrite EEPROM data while reprogramming the controller? I only want to upgrade the program i write and not the previous EEPROM data contents.

Any suggestions please ?

I am using WinPIC800 to program my MCU.
 
Hi, is it possible to not overwrite EEPROM data while reprogramming the controller? I only want to upgrade the program i write and not the previous EEPROM data contents.

Any suggestions please ?

I am using WinPIC800 to program my MCU.

Only if you can use a bootloader to update your program, normal programming methods first erase the entire device.
 
Are the contents of the EEPROM known? If so you can place it in your source code.

Can just the EEPROM be read before programming?

Mike.
 
Only if you can use a bootloader to update your program, normal programming methods first erase the entire device.

Bootloader is like OS for the MCU?

Are the contents of the EEPROM known? If so you can place it in your source code.

Can just the EEPROM be read before programming?

No the content are different for each controller (i have 3 controllers). Want to update only their firmware as i develop and the EEPROM's data remains intact.
Basically each controller contains unique address in its EEPROM.

I dont think i can just read the contents of EEPROM from the programming software i am using.
 
Bootloader is like OS for the MCU?

No, a bootloader is a program that runs in the PIC that allows you to program it without using a programmer - usually connected via a serial port (or USB). Most modern PIC's allow bootloaders. Assuming you have a serial port on your target boards it would be very easy implement a bootloader.
 
Thank you Nigel, actually i use a PIC trainer to burn program and check data on ports. Yes it does have a serial port on it as well, one i use for programming and the other one is connected to PIC's serial port. I am using PIC18F4520.

Is bootloader program same for all PIC18 series? From what i understand, i will serially write program on the PIC using bootloader. But which software to send the program from hex file serially to target PIC.

3v0, my burner/trainer doesn't have ICSP programming interface. :(
 
Given that you have an working programmer you can build a ICD2 or PICkit2 clone. Or buy a real PICkit2 for about $35.

Both of these will give you in circuit debug as well as ICSP.
The PICkit2 also acts as a simple Logic Analyzer.
 
Thank you Nigel, actually i use a PIC trainer to burn program and check data on ports. Yes it does have a serial port on it as well, one i use for programming and the other one is connected to PIC's serial port. I am using PIC18F4520.

Is bootloader program same for all PIC18 series? From what i understand, i will serially write program on the PIC using bootloader. But which software to send the program from hex file serially to target PIC.

Check out this site:

Program Microchip PIC micros with C - sample source code, FAQ and more

I've used their excellent 16F series bootloaders. Both PIC and PC software are covered.
 
Nigel on the same website you sent, on page PIC micro and C - bootloader

it says "his bootloader is compatible with the PIC18F252 and the PIC18F452, running at either 3.68Mhz, 10Mhz, 20Mhz or 40Mhz."

I have two issues, i work with 4MHz and not on PIC18F452 but on PIC18F4520

As far as I'm aware they provide source code, so you can modify it as you wish - and the two examples they give (252 and 452) will drop in place for most 18F series. There should also be bootloader examples on MicroChips own site - the PICKit2 and ICD2 are even bootloaders, using it to update the processor on the programmer when you chnage device types.
 
Hi,

PICPgm **broken link removed** will allow you to reprogram your controller without disturbing the eeprom, it works fine with the JDM hardware.

SYE.
 
Status
Not open for further replies.

Latest threads

Back
Top