I have broken open a few circuits of some electronics (DVD player, handheld game device) and I can see the microcontrollers in them. However, I have no idea how they get their programs onto them! There is no micro usb or usb plug anywhere on them! How would they have gotten their program onto there?

  • \$\begingroup\$ Usually using SPI or JTAG or perhaps a bootloader. Different chips have slightly different ways of loading it in too there is no one way of doing it. \$\endgroup\$ – crowie Jan 1 '17 at 10:09
  • \$\begingroup\$ How are Arduino boards programmed with the bootloader program required for using the USB port in the first place? Microcontrollers are rarely initially programmed via USB. \$\endgroup\$ – alex.forencich Jan 1 '17 at 23:12

How the code gets loaded will depend on the type of microcontroller being used. Some possible schemes used:

  1. The MCU gets its program code from a ROM (read only memory) that is manufactured onto the part.
  2. The MCU has FLASH memory built onto the chip that contains the program code. This FLASH may be programmed in a number of ways. (see below)
  3. The MCU may load its program code from an external memory chip. This external memory could be a ROM, serial FLASH, FRAM chip or for some older types of products an EEPROM or parallel FLASH.

Embedded products that have the program code on re-programmable memory such as the on-chip FLASH or serial FLASH chip as mentioned above can have their program code loaded via:

  1. The code is programmed into the bare component before it is soldered down to the board.
  2. Sometimes the MCU or FLASH device is placed into a socket where it can be removed for programming at the chip level using an external programmer.
  3. There may be a special connector or header that is used to connect an external programming device that allows loading of the program code.
  4. Some high volume products do away with the connector mentioned above and allow access via spring loaded pins to test points on the board to permit a programmer to access the FLASH programming pins.

There area a couple of other ways of getting a program into a micro controller.

If the volume is high enough and the design is stable the controller can be manufactured with the program in it. This is referred to as mask programing. This is expensive to set up but for very high volumes it become economical.

The program can be loaded by a special piece of hardware that you load the chip into before assembly on the PCB.

Finally it could be still loaded on the pcb. Even though you don't see a usb header there may be connection points for the chip which still allows in circuit programming.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.