Programmer for AT24C64

May 02, 2004 10 Replies

Hi All,



I support a product that's been manufactured with a bug in the flash memory of the microcontroller. The factory has come up with a solution and the design allows the update to be loaded via the products RS232 connector, so this part is simple.



When the update is done I need to go into the adjustment menu and manually edit 116 different locations in the EEPROM according to a table provided by the factory. Now there is a high chance for error as it's a mind numbingly boring exercise to change the data, it's not as simple as changing a setting from 0 to 1.



My thought is to do the following


  1. Remove the EEPROM from the product and install it in a programmer.


  1. Download the contents of the EEPROM to a PC (Unfortunately every EEPROM contains certain addresses that are specific to the product, such as A-D gain and offset adjustments, Hour meter etc so we can't simply install factory initial data)

  2. Have the programmer software "OR" the downloaded data with a file that changes only the 116 locations.


  1. Upload the modified file to the EEPROM.

  2. Install the EEPROM back in the product.

Does anyone know of a programmer and software that will allow you to do this?



Thanks in advance! James


Please Note - E-mail address corrupt. Please change "no" to "i"

Most device programmers should do this. Assuming your 116 locations are fixed, you would be best to create a HEX file with _just_those_locations_.

Ask the factory for this file, if you are unsure how to create one :)

Then, your operation would be

- Install Device

- READ Device into programmer buffer

- Load FixFile.HEX - this should REPLACE.Merge just the 116 values. [ I think that is what you want, rather than a Logical OR ? ]

- PROGRAM the device.

That preserves the original EE contents, but replaces your FixUp values.

-jg

"James254" wrote in news:c71sme$hhp$ snipped-for-privacy@lust.ihug.co.nz:

Hi James,

If you can download a program through the serial port, wouldn't it be more convenient to download a tiny program to change those 116 locations without removing the EEPROM from the product? I'm assuming the product has in- circuit programming capabilities (for storing its gain setting etc) so you could even call the existing function rather than writing another in the downloaded app, minimising the transfer time over RS232.

Peter.

I would do one of the following things:

  1. Enable device in which EEPROM is inside to program the EEPROM on PC request, and just those addresses you need

  1. Make a device for programming EEPROMs from PC

Mickey

memory

by

setting

Hi Jim, CodeSprite & Mickey,

Thanks for taking the time to reply.

I should have made myself a little clearer in the original message. I only provide the support for the product (I don't have access to the code for the microcontroller, therefore there is no possibility of using the RS232 connector to change the EEPROM data. The factory will not release the information it's a secret!).

So the options left open to me are to make a device that programs the EEPROM when it's removed from the product. I think that I could do that using a PIC microcontroller but it'll take me some time as I've never written I2C code for this microcontroller.

I think Jim's idea about asking the factory write a .hex file that changes just the 116 locations is the best idea.

Is it possible to write a .hex file to change 116 non-sequential locations?

If so, I think that Ponyprog software and a "Easy I2C" programmer will do the job. What do you think?

Thanks in advance, James

PS. I'm open to suggestions if anyone has a better idea...

memory

by

setting

Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.672 / Virus Database: 434 - Release Date: 28/04/2004

Hi Jim,

Should have been more elaborate :)

I think I can get the EEPROM address locations (I already know the data values) from the factory, but I'm not sure how I would go about writing the .hex file. If you can suggest a user friendly windows program that would do the job I would appreciate it!

Thanks > > Hi Jim, CodeSprite & Mickey,

locations?

--- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system

formatting link
Version: 6.0.672 / Virus Database: 434 - Release Date: 28/04/2004

You did not specify a format, but from your extension it looks like you want Intel hex.

Intel hex:

formatting link

Motorola-S:

formatting link

You can write these file with any simple editor (like notepad) and a calculator. But maybe someone here can point you to a more user friendly editor for these files.

Stef (remove caps, dashes and .invalid from e-mail address to reply) The Golden Rule of Arts and Sciences: He who has the gold makes the rules.

Use almost any assembler, and the ORG and DB commands therein eg ORG 1234H DB 55H ORG 4321H DB 0AAH

should ( after linking ) create a .HEX file with just those two bytes

55H and 0AAH You can also use an editor/Hex Calc, but for 100+ values, I'd favour an assembler - simple, generic ones like AS do not need the link step.

formatting link

-jg

If I were doing it, I would probably use an absolute assembler for some

8-bit micro -- it doesn't matter which one. Use ORG (starting addr) and DB to define the values you want. Have the assembler generate a Intel or Motorola hex file.

Thad

Hi Jim and Thad,

Thanks for the clear suggestions. I've got no problems doing this; I understand what you are trying to get me to do. I would have never thought of doing it that way and it's something I won't forget.

Once again thanks for your help. James

-- Please Note - E-mail address corrupt. Please change "no" to "i"

--- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system

formatting link
Version: 6.0.672 / Virus Database: 434 - Release Date: 28/04/2004

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required