| Electronics > Projects, Designs, and Technical Stuff |
| How to modify code in micro controller during mass production? |
| (1/3) > >> |
| Sai teja:
Hello, In our application, we need to program a micro controller and a variable need to be changed for before uploading code in every micro controller. Is there any way to automate the process for uploading code in this situation? |
| DDunfield:
Which microcontroller and how is it being programmed? Is the variable stored in the main code image? In a separate NVM area? Many mass programming environments have the ability to program an incrementing value on a per-unit basis. I've done a number of products which required special unit-specific values to be assigned and programmed into each unit (Serial#, mac-addresses etc.), and what I usually do is perform this assignment, program the firmware and any other permanent memories required in the test stage. The manufacturing test system takes "new" devices fresh from the production line, installs firmware, serial#s etc. then tests it to determine that it performing to specifications before releasing it as finished product. Dave |
| abraxa:
Is "we" a company? If so, then I'm kinda unhappy that companies can come here and ask for support. |
| DDunfield:
--- Quote from: abraxa on April 18, 2019, 02:13:14 pm ---Is "we" a company? If so, then I'm kinda unhappy that companies can come here and ask for support. --- End quote --- I dunno, from the "About Us" link at the top of every page: "This is a free and open forum, everyone is welcome, even commercial companies and people promoting their own products." I could see it being annoying if an engineer working on a company project was asking for significant "free" work/design, but this seems like a fairly simple question falling into the "how do I get started" category. Is this frowned upon if the asker is in a company? How about individuals contracting to a company? Do forum participants get unhappy if other participants share tips and tricks they gained through experience working at companies? Just wondering where the lines are? Dave (who sometimes does work for companies). |
| mariush:
You could start for example by compiling the code with a constant with an obvious value, like 0xAB , 0xBC, 0xCD, 0xDE ... then compile again with slightly different values ... all being the same, only those 4 bytes should be changed in the compiled code. Now you can make your own programmer ... make a gadget in which you upload the compiled code, and then add a button ... push the button and the programmer increments the value before sending the data to the microcontroller. Alternatively, you could have a predefined value that would normally be not expected in the eeprom or the flash area, for example 0xFFFFFFFF and if you start the micro with this value, the micro uses ADC to read a voltage or something from one or two pins. You could have a gadget with a bunch of resistors or a DAC ... insert into your pcb, start it up, wait 1s or so for the micro to update its internal value and then you can move on |
| Navigation |
| Message Index |
| Next page |