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.

Electronic serial number storage (ESN)

Status
Not open for further replies.

Mark_R

Member
Hi, have a question about ESN storage; I'm working on a project that requires each unit to have a fixed ESN to identify itself. I don't want to store it on the µC as it's socketed and could be swapped out in the future for firmware upgrades, the ESN must stay with the unit.

I have included an I2C RTC that has a built in EEPROM to store the ESN and a couple of parameters, the question is how to program it? I don't want any hidden menus or anything that the end user could find. Not enough volume to have them pre-programmed. How is this usually done?

  1. Load temporary "EEPROM programmig firmware" into µC then load production firmware
  2. Have test points on the I2C buss to externally program somehow
  3. Solder jumper to enable hidden ESN programing function
  4. ???

I'm leaning toward #2

Thanks.
 
Any of the methods you have listed will work. If your product has some sort of communications port that can access the uC I would do it that way, since the uC already can access the EEPROM. Plug a computer into the communications port and use a password to write to the ESN location in the EEPROM.
 
Any of the methods you have listed will work. If your product has some sort of communications port that can access the uC I would do it that way, since the uC already can access the EEPROM. Plug a computer into the communications port and use a password to write to the ESN location in the EEPROM.

No external serial, but there is serial comms to a modem daughter card, I could put test points on that and use one of these neat USB ==> TTL serial cables to program USB TTL Serial as there is no on board rs232 level converter.
That would be easier than trying to "talk I2C" from a PC.
 
You could switch to a dallas one wire RTC as they have a unique serial number already laser programmed.

Mike.
 
If the ESN has a particular format then make a little "programming" board. Pic chip, ZIF socket and a push button will allow you to preprogram each RTC chip with a serial number, add an LCD and you can keep track of each ESN as you go. If you go this route then power the RTC via a port pin (or 2 if needed) so you can hot swap the chips.

Mike.
 
If the ESN has a particular format then make a little "programming" board. Pic chip, ZIF socket and a push button will allow you to preprogram each RTC chip with a serial number, add an LCD and you can keep track of each ESN as you go. If you go this route then power the RTC via a port pin (or 2 if needed) so you can hot swap the chips.

Mike.

I had tossed around that idea, but wasn't sure how to go about dealing with the RTCs after programming (getting them to the board stuffer, labeling them, keeping them in order, Etc.) BTW, using the port pins to power the chip being programmed is genius :).

I figure since I need to power up the finished product to run through tests anyway, that would be the best time to get the programming done in-circuit somehow.
 
Unless this is a existing bit of canned software how hard would it be to reformat the 1 Wire codes ?
Not sure what you mean. The Dallas RTC has a 64 bit ESN, which is way too big for my needs. I can't really go bigger than 12 bits.
 
i could be wrong but wouldn't the RTC EEPROM be non volatile meaning if you loose the battery backup the number will be lost? I have used the DS1307 before and have had a similar problem where i needed to store permanent data on its EEPROM but then had a problem with loosing data
 
If you're downloading the runtime code And the IDE has a debugger: include an ESN programming code module that can only be accessed in the debugger. Write a "stall" at the end (infinite loop), set the ESN in RAM, put the program counter at the module & run it. About as fast as you can hit break, it'll already be done & stalled.

This adds the time to run the debugger & programming module, so only a low volume method.

I use this to initialize parameters the runtime code copies in from flash in one project. Stuff like current position, initial low & high limit values, etc, that are overwritten on powerdown with the values at powerdown. Works for me...<<<)))
 
Sorry, micr0man, just opposite: nonvolatile means loss of Any/All power doesn't affect stored data. My suspicion is you were saving stuff in the RTCs' spare RAM which is volatile, instead of its' flash (EEROM).

Oops, my bad, didn't check RTC specs: no flash... TNX G (nxt post)
 
Last edited:
Yeh DS1307's do not have EEPROM, they only have volatile RAM.

You cannot save anything into the DS1307 and expect it to be there after a power cycle, unless you have battery backup.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top