Decryption principle of AT89C51 microcontroller

Publisher:tyloo820Latest update time:2023-03-27 Source: elecfansKeywords:AT89C51 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

  MCU decryption is simply to erase the encryption lock bit in the MCU. Due to the unreasonable design of the erase operation timing of the AT89C series microcontroller. Makes it possible to erase the cryptographic lock bits first before erasing the on-chip program.


  The timing sequence of the erase operation of the AT89C series microcontroller is: erase start----》Erase operation hardware initialization (10 microseconds)----》Erase encryption lock bit (50----200 microseconds)-- -》Erase the data in the on-chip program memory (10 milliseconds)-----》Erase ends. If a program is used to monitor the erasing process, once the encryption lock bit is erased, the erasing operation will be terminated and further erasing of the on-chip program memory will be stopped. The encrypted microcontroller will become an unencrypted microcontroller. On-chip programs can be read out via the bus.


  There are two unbreakable encryption methods for the AT89C series microcontroller.

  1. An encryption method that permanently destroys the encryption bits of the microcontroller. Referred to as OTP encryption mode.


  2. An encryption method that permanently destroys the data bus of the microcontroller. Referred to as burn bus encryption mode. AT89C series microcontroller OTP encryption mode principle This programming encryption algorithm burns the encryption lock bit (breaks down the silicon chip in the chip) without damaging other parts and does not occupy any resources of the microcontroller. After the encryption lock bit is burned out, it no longer has the erasure feature. 89C51/52/55 has 3 encryption bits to further increase the reliability of encryption. Once encrypted in OTP mode, the encryption bits in the microcontroller and the data in the program memory cannot be erased again. The 89C51/52/55 microcontroller seems to have become a one-time programmed OTP microcontroller.


  If the length of the user program is greater than the capacity of the 89C51 microcontroller's on-chip memory, the OPT mode can also be used for encryption.


  The specific methods are as follows:

  1. Expand a large-capacity program memory as usual, such as 27C512 (64K).

  2. Arrange the key program parts in the first 4K of the program.

  3. Write the entire program to 27C512, and then fill the first 4K of 27C512 with 0s.

  4. Solidify the first 4K of the program into AT89C51 and use OPT mode for encryption.

  5. Connect the EA pin of the microcontroller to high level. In this way, the first 4K of the program runs inside the microcontroller, and the last 60K runs outside the chip. Pirates cannot read the first 4K of a program, and even knowing the last 60K is useless.


  The principle of AT89C series microcontroller bus encryption mode is that the program code in the microcontroller will eventually be read through the data bus. If one of the lines of the data bus that guides the microcontroller is permanently damaged, the decryptor will not be able to erase the encryption bit even if it erases the encryption bit. Read the correct code of the program on the chip. The data bus of 89C1051/2051 is P1 port. The bus mode burns out the P1.0 port of 89C2051. The original program codes are 02H, 01H, and 00H. The read data is 03H, 01H, 00H. The lowest bit is always 1, and the read program code is obviously the wrong code. This encryption mode is used to encrypt the 89C1051/2051 microcontroller. The disadvantage is that it takes up the resources of the microcontroller. Developers and designers only need to reserve the export line P1.0 when designing the microcontroller hardware system, and then they can use the bus burning mode to encrypt the microcontroller in the future.


Keywords:AT89C51 Reference address:Decryption principle of AT89C51 microcontroller

Previous article:An introduction to the pin functions of the external structure of the microcontroller and an overview of the usage information
Next article:89C51 microcontroller structure block diagram

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号