AT89C51CC02 Atmel Corporation, AT89C51CC02 Datasheet

no-image

AT89C51CC02

Manufacturer Part Number
AT89C51CC02
Description
Manufacturer
Atmel Corporation
Datasheets

Specifications of AT89C51CC02

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

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
AT89C51CC02CA-RATUM
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
AT89C51CC02CA-SISUM
Manufacturer:
Atmel
Quantity:
972
Part Number:
AT89C51CC02CA-SISUM
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
AT89C51CC02CA-SISUM
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Part Number:
AT89C51CC02CA-TISUM
Manufacturer:
Atmel
Quantity:
1 492
Part Number:
AT89C51CC02CA-UM
Manufacturer:
AD
Quantity:
10
Part Number:
AT89C51CC02UA-RATUM
Manufacturer:
Atmel
Quantity:
1 845
Part Number:
AT89C51CC02UA-RATUM
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
AT89C51CC02UA-SISUM
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
AT89C51CC02UA-UM
Manufacturer:
NEDI
Quantity:
4
Features
Description
This document describes the UART bootloader functionalities as well as the serial
protocol to efficiently perform operations on the on-chip memory. Additional informa-
tion on the T89C51CC02 product can be found in the T89C51CC02 datasheet and the
T89C51CC02 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 available from the Atmel web site.
Bootloader Revision
Revisions 1.2.0
Revision 1.2.1
Protocol
In-System Programming
In-Application Programming/Self Programming
– UART used as 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
Standardization of tasks in source
program.
Date
03/12/2002
19/03/2007
CAN
Microcontrollers
T89C51CC02
UART
Bootloader
4223C–CAN–03/08

Related parts for AT89C51CC02

AT89C51CC02 Summary of contents

Page 1

Features • Protocol – UART used as Physical Layer – Based on the Intel Hex-type records – Autobaud • In-System Programming – Read/Write Flash and EEPROM Memories – Read Device ID – Full-chip Erase – Read/Write Configuration Bytes – Security ...

Page 2

Functional The T89C51CC02 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

Regular Boot Process Yes Start Application 4223C–CAN–03/08 T89C51CC02 UART Bootloader RESET ENBOOT = 0 Yes PC = 0000h BLJB = 1 No P1_CF = FFh No P1_CF = P1 Yes No P3_CF = P3 BSB = SBV ...

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 Stream Protocol All commands are sent using the same flow. Each frame sent by the host is echoed by the bootloader. Figure 4. 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

Example 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 Note: The maximum size of block is 400h. To read more ...

Page 14

Example 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 Record Type Erase SBV & BSB ...

Page 15

Flow Description Host Send Write Command OR Wait Checksum Error COMMAND ABORTED OR Wait Security Error COMMAND ABORTED Wait COMMAND_OK COMMAND FINISHED Example 4223C–CAN–03/08 T89C51CC02 UART Bootloader Write Command ’X’ & CR & LF ’P’ & CR & LF ’.’ ...

Page 16

Read Configuration The flow described below allows the user to read the configuration or manufacturer information. Information or Manufacturer Information Requests from Host Command Name Read Manufacturer Code Read Family Code Read Product Name Read Product Revision Read SSB Read ...

Page 17

Flow Description Host Send Read Command OR Wait Checksum Error COMMAND ABORTED OR Wait Security Error COMMAND ABORTED Wait Value of Data COMMAND FINISHED Example 4223C–CAN–03/08 T89C51CC02 UART Bootloader Read Command ’X’ & CR & LF ’L’ & CR & ...

Page 18

Erase the Flash The flow described below allows the user to erase the Flash memory. Two modes of Flash erasing are possible: • Full Chip erase • Block erase The Full Chip erase command erases the whole Flash (16K bytes) ...

Page 19

Flow Description Host Send Erase Command OR Wait Checksum Error COMMAND ABORTED OR Wait Security Error COMMAND ABORTED Wait COMMAND_OK COMMAND FINISHED Example 4223C–CAN–03/08 T89C51CC02 UART Bootloader Erase Command ’X’ & CR & LF ’P’ & CR & LF ’.’ ...

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’s on-chip Flash memory without removing it from the system and while the embedded application is running. Programming/ The user application can call some Application Programming Interface (API) routines allowing Self- 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

API_name __api_rd_bootloader_version • 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 API Name __api_set_X2 __api_clr_X2 __api_set_BLJB __api_clr_BLJB __api_wr_BSB __api_wr_SBV __api_wr_EB ...

Page 24

Erase Flash The T89C51CC02 flash memory is divided in several blocks: Block 0: from address 0000h to 1FFFh Block 1: from address 2000h to 3FFFh These two blocks contain 64 pages. • Parameter settings API Name __api_erase_block0 __api_erase_block1 • Instruction: ...

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) Start application with a reset pulse generation Start application with a jump at “address” Erase SBV & BSB Program ...

Page 26

Table 3. Summary of frames from Host (Continued) Command Read Manufacturer Code Read Family Code Read Product Name Read Product Revision Read SSB Read BSB Read SBV Read P1_CF Read P3_CF Read P4_CF Read EB Read Hardware Byte Read Device ...

Page 27

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_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 4223C–CAN–03/08 T89C51CC02 UART ...

Page 28

Document Revision History 4223C - 03/08 1. Updated Bootloader version. T89C51CC02 UART Bootloader 28 4223C–CAN–03/08 ...

Page 29

... 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