AT89C51AC2 Atmel Corporation, AT89C51AC2 Datasheet

no-image

AT89C51AC2

Manufacturer Part Number
AT89C51AC2
Description
Manufacturer
Atmel Corporation
Datasheets

Specifications of AT89C51AC2

Flash (kbytes)
32 Kbytes
Max. Operating Frequency
40 MHz
Cpu
8051-12C
Max I/o Pins
34
Uart
1
Adc Channels
8
Adc Resolution (bits)
10
Adc Speed (ksps)
62.5
Sram (kbytes)
1.25
Eeprom (bytes)
2048
Self Program Memory
API
Operating Voltage (vcc)
3.0 to 5.5
Timers
4
Isp
UART
Watchdog
Yes

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
AT89C51AC2-RLTUM
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
AT89C51AC2-SLSUM
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
AT89C51AC2-UM
Manufacturer:
ATMEL
Quantity:
4
Part Number:
AT89C51AC2-UM
Manufacturer:
ATMEL
Quantity:
2
Part Number:
AT89C51AC2-UM
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Features
Description
This document describes the UART bootloader functionalities as well as the serial
protocol to efficiently perform operations on the on chip Flash (EEPROM) memories.
Additional information on the A/T89C51AC2 product can be found in the
A/T89C51AC2 datasheet and the A/T89C51AC2 errata sheet available on the Atmel
web site, www.atmel.com.
The bootloader software package (source code and binary) currently used for produc-
tion is also available from the Atmel web site.
Bootloader Revision
Revision 1.2.0
Revisions 1.4.0
Revision 1.4.1
Protocol
In-System Programming
In-Application Programming/Self-Programming
– UART Used as a Physical Layer
– Based on the Intel Hex-type Records
– Autobaud
– Read/Write Flash and EEPROM Memories
– Read Device ID
– Full-chip Erase
– Read/Write Configuration Bytes
– Security Setting From ISP Command
– Remote Application Start Command
– Read/Write Flash and EEPROM Memories
– Read Device ID
– Block Erase
– Read/Write Configuration Bytes
– Bootloader Start
Purpose of Modifications
First release
New command supported
- EEPROM access
- Start application
- Extra Byte access
- 128 bytes page Flash programming
- New boot process
Standardization of tasks in source
program.
Date
23/04/2001
02/11/2001
20/03/2007
80C51
Microcontrollers
AT89C51AC2
T89C51AC2
UART
Bootloader
4231D–CAN–03/08

Related parts for AT89C51AC2

AT89C51AC2 Summary of contents

Page 1

... Purpose of Modifications Revision 1.2.0 First release Revisions 1.4.0 New command supported - EEPROM access - Start application - Extra Byte access - 128 bytes page Flash programming - New boot process Revision 1.4.1 Standardization of tasks in source program. 80C51 Microcontrollers AT89C51AC2 T89C51AC2 UART Bootloader Date 23/04/2001 02/11/2001 20/03/2007 4231D–CAN–03/08 ...

Page 2

Functional The A/T89C51AC2 Bootloader facilitates In-System Programming and In-Application Programming. Description In-System In-System Programming (ISP) allows the user to program or reprogram a microcontroller’s on- chip Flash memory without removing it from the system and without the need of a ...

Page 3

ISP Communication The purpose of this process is to manage the communication and its protocol between the on- Management chip bootloader and an external device (host). The on-chip bootloader implements a Serial pro- tocol (see Section “Protocol”, page 9). This ...

Page 4

Mapping and Default The 4 Most Significant Byte (MSB) of the Hardware Byte can be read/written by software (this Value of Hardware area is called Fuse bits). The 4 Least Significant Byte (LSB) can only be read by software and ...

Page 5

Software Boot The Software Boot Vector (SBV) forces the execution of a user bootloader starting at address [SBV]00h in the application area (FM0). Vector The way to start this user bootloader is described in the section “Boot Process”. Figure 2. ...

Page 6

In-System The ISP allows the user to program or reprogram a microcontroller’s on-chip Flash memory through the serial line without removing it from the system and without the need of a pre-pro- Programming grammed application. This section describes how to ...

Page 7

Figure 3. Regular Boot Process Start Application 4231D–CAN–03/08 A/T89C51AC2 UART Bootloader RESET Hardware Condition No ENBOOT = 0 Yes PC = 0000h BLJB = 1 No FCON = 00h No SBV < F8h Yes Start User Bootloader Bit ENBOOT in ...

Page 8

Physical Layer The UART used to transmit information has the following configuration: • Character: 8-bit data • Parity: none • Stop: 2 bit • Flow control: none • Baud rate: autobaud is performed by the bootloader to compute the baud ...

Page 9

Protocol Overview An initialization step must be performed after each Reset. After microcontroller reset, the boot- loader waits for an autobaud sequence (see Section “Autobaud Performances”). When the communication is initialized the protocol depends on the record type issued by ...

Page 10

Frequency (MHz) Baudrate (kHz) 38400 57600 115200 Command Data All commands are sent using the same flow. Each frame sent by the host is echoed by the Stream Protocol bootloader. Figure 5. Command Flow Host Sends first character of the ...

Page 11

Programming the The flow described below shows how to program data in the Flash memory or in the EEPROM Flash or EEPROM data memory. Data The bootloader programs on a page of 128 bytes basis when it is possible. The ...

Page 12

Read the Flash or The flow described below allows the user to read data in the Flash memory or in the EEPROM EEPROM Data data memory. A blank check command is possible with this flow. The device splits into blocks ...

Page 13

Flow Description: Blank Check Command Host Send Blank Check Command OR Wait Checksum Error COMMAND ABORTED Wait COMMAND_OK OR COMMAND FINISHED Wait Address not erased COMMAND FINISHED Example 4231D–CAN–03/08 A/T89C51AC2 UART Bootloader Blank Check Command ’X’ & CR & LF ...

Page 14

Flow Description: Read Command Host Send Display Command OR Wait Checksum Error COMMAND ABORTED OR Wait Security Error COMMAND ABORTED Wait Display Data All Data Read COMMAND FINISHED Example A/T89C51AC2 UART Bootloader 14 Display Command ’X’ & CR & LF ...

Page 15

Program The flow described below allows the user to program Configuration Information regarding the Configuration bootloader functionality. Information The Boot Process Configuration: – – – – – Requests from Host Command Name Erase SBV & BSB Program SSB level1 Program ...

Page 16

Flow Description Host Send Write Command OR Wait Checksum Error COMMAND ABORTED OR Wait Security Error COMMAND ABORTED Wait COMMAND_OK COMMAND FINISHED Program Configuration Example A/T89C51AC2 UART Bootloader 16 Write Command ’X’ & CR & LF ’P’ & CR & ...

Page 17

Read Configuration The flow described below allows the user to read the configuration or manufacturer information. Information or Manufacturer Information Requests from Host Read Manufacturer Code Read Product Name Read Product Revision Read HSB (Fuse bit) Read Bootloader version Note: ...

Page 18

Flow Description Host Send Read Command OR Wait Checksum Error COMMAND ABORTED OR Wait Security Error COMMAND ABORTED Wait Value of Data COMMAND FINISHED Read Example Flash Erase The flow described below allows the user to erase the Flash memory. ...

Page 19

Requests from Host Erase block0 (0K to 8K) Erase block1 (8K to 16K) Erase block2 (16K to 32K) Answers from As the Program Configuration Information flows, the erase block command has three possible Bootloader ...

Page 20

Start the Application The flow described below allows to start the application directly from the bootloader upon a spe- cific command reception. Two options are possible: • Start the application with a reset pulse generation (using watchdog). When the device ...

Page 21

In-Application The IAP allows to reprogram a microcontroller on-chip Flash memory without removing it from the system and while the embedded application is running. Programming/S The user application can call some Application Programming Interface (API) routines allowing elf- IAP. These ...

Page 22

API Commands Several types of APIs are available: • Read/Program Flash and EEPROM Data memory • Read Configuration and Manufacturer Information • Program Configuration Information • Erase Flash • Start bootloader Read/Program Flash All routines to access EEPROM Data are ...

Page 23

Instruction: LCALL FFF0h. • At the complete API execution by the bootloader, the value to read is in the api_value variable. Note: Program • Parameter Settings Configuration Information • Instruction: LCALL FFF0h. Note: 4231D–CAN–03/08 A/T89C51AC2 UART Bootloader ...

Page 24

Erase Flash The A/T89C51AC2 flash memory is divided in several blocks: Block 0: from address 0000h to 1FFFh Block 1: from address 2000h to 3FFFh Block 2: from address 4000h to 7FFFh These three blocks contain 128 pages. • Parameter ...

Page 25

Appendix-A Table 3. Summary of Frames From Host Command Program Nb Data Byte in Flash. Erase block0 (0000h-1FFFh) Erase block1 (2000h-3FFFh) Erase block2 (4000h-7FFFh) Start application with a reset pulse generation Start application with a jump at “address” Erase SBV ...

Page 26

Appendix-B Table 4. API Summary Function Name __api_rd_code_byte __api_wr_code_byte __api_wr_code_page __api_erase_block0 __api_erase_block1 __api_erase_block2 __api_rd_HSB __api_set_X2 __api_clr_X2 __api_set_BLJB __api_clr_BLJB __api_rd_BSB __api_wr_BSB __api_rd_SBV __api_wr_SBV __api_erase_SBV __api_rd_SSB __api_wr_SSB_level0 __api_wr_SSB_level1 __api_wr_SSB_level2 __api_rd_EB __api_wr_EB __api_rd_manufacturer __api_rd_device_id1 __api_rd_device_id2 __api_rd_device_id3 __api_rd_bootloader_version __api_eeprom_busy __api_rd_eeprom_byte __api_wr_eeprom_byte __api_start_bootloader A/T89C51AC2 UART ...

Page 27

... Datasheet Revision History 4231A - 04/ Bit stop for the UART protocol added. 4231B 12/03 4231B 12/ Added AT89C51AC2 part number. 4213C 03/05 4213C 03/ Updated Bootloader version. 4213D 03/08 4231D–CAN–03/08 A/T89C51AC2 UART Bootloader 27 ...

Page 28

... Atmel products are not suitable for, and shall not be used in, automotive applications. Atmel’s products are not intended, authorized, or warranted for use as components in applications intended to support or sustain life. © 2008 Atmel Corporation. All rights reserved. Atmel Atmel Corporation or its subsidiaries. Other terms and product names may be trademarks of others. International Atmel Asia ...

Related keywords