Summary: | 碩士 === 明新科技大學 === 精密機電工程研究所 === 97 === Microcontroller is a common embedded chip with simpler system architecture than personal computer. A small chip encapsulation is complete with the functions of processor, memory, peripheral I/O and various extension circuits. It is universally used in automobiles, household appliances, amusement apparatuses, fitness apparatuses, communication products and other personal products, as well as the production management and monitoring equipment in nearly every industry. It replaces traditional mechanical control to be responsible for sensing and monitoring, with the advantages that it not only can reduce the cost and manpower, but also increase the added value.
This study, based on H8 microcontroller produced by Hitachi, uses Visual C language to enhance the automatic update function of microcontroller. Aiming to the problems that it is inconvenient for archive protection during update and it is easily cracked and thus making piracy easy, the characteristics of MCU system are utilized to protect the software and the updating process and encipherment/ decipherment is added to provide more protection. The overall operation must prepare programs for mainframe and chip and operate by turns: the mainframe must prepare for writing the control program and the new application program that enciphered by specific algorithm, and the transmission takes RS232 connection and data is transmitted by X-MODEM; the chip must write the firmware program with the functions of transmission receiving, flash memory simulation, enciphering new application program and clear/write.
When updating, new application programs is transmitted to the designated zone through communication protocol in order to start the flash memory simulation, decipher by selecting a deciphering mode, conduct the clear/write function, clear the old applications and write new ones, and restart the chip after these moves. Then the new applications can be executed and the effects of automatic update of chip and program protection are achieved.
|