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 CAN bootloader functionalities as well as the CAN proto-
col to efficiently perform operations on the on-chip Flash (EEPROM) memories.
Additional information 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
Revision 1.0.2
Revision 1.2.1
Protocol
In-System Programming
In-Application Programming/Self-Programming
– CAN Used as a Physical Layer
– 7 ISP CAN Identifiers
– Relocatable ISP CAN Identifiers
– Autobaud
– Read/Write Flash and EEPROM Memory
– Read Device ID
– Full-chip Erase
– Read/Write Configuration Bytes
– Security Setting From ISP Command
– Remote Application Start
– Read/Write Flash and EEPROM Memory
– Read Device ID
– Block Erase
– Read/Write Configuration Bytes
– Bootloader Start
Purpose of Modifications
First release
Standardization of tasks in source
program.
Date
14/12/2001
19/03/2007
CAN
Microcontrollers
T89C51CC02
CAN Bootloader

Related parts for AT89C51CC02

AT89C51CC02 Summary of contents

Page 1

Features • Protocol – CAN Used as a Physical Layer – 7 ISP CAN Identifiers – Relocatable ISP CAN Identifiers – Autobaud • In-System Programming – Read/Write Flash and EEPROM Memory – Read Device ID – Full-chip Erase – Read/Write ...

Page 2

Functional The T89C51CC02 Bootloader facilitates In-System Programming and In-Application Programming. Description In-System The ISP allows the user to program or reprogram a microcontroller on-chip Flash memory with- out removing it from the system and without the need of a pre-programmed ...

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 CAN proto- col (see Section “Protocol”, page 9). This ...

Page 4

Mapping and Default The 4 Most Significant Bit (MSB) of the Hardware Byte can be read/written by software (this area Value of Hardware is called Fuse bits). The 4 Least Significant Bit (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 Vector [SBV]00h in the application area (FM0). 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 CAN network without removing it from the system and without the need of a pre-pro- Programming grammed application. (ISP) This section describes how ...

Page 7

Figure 3. Regular Boot Process Yes Start Application 4208D–CAN–03/08 T89C51CC02 CAN Bootloader RESET ENBOOT = 0 Yes PC = 0000h BLJB = 1 No P1_CF = FFh No P1_CF = P1 Yes No P3_CF = P3 BSB = 0 No ...

Page 8

Physical Layer The CAN is used to transmit information has the following configuration: • Standard Frame CAN format 2.0A (identifier 11-bit) • Frame: Data Frame • Baud rate: autobaud is performed by the bootloader CAN Controller Two ways are possible ...

Page 9

CAN Autobaud The following table shows the autobaud performance for a point-to-point connection in X1 mode. 20K 100K 125K 250K 500K 1M Note: CAN Autobaud The CAN Autobaud implemented in the bootloader is efficient only in point-to-point connection. Limitation Because ...

Page 10

Identifier ID_PROG_START ID_PROG_DATA ID_DISPLAY_DATA ID_WRITE_COMMAND ID_READ_COMMAND ID_ERROR It is possible to allocate a new value for CAN ISP identifiers by writing the byte CRIS with the base value for the group of identifier. The maximum value for CRIS is 7Fh ...

Page 11

Figure 5. Identifier Remapping Communication The communication with a device (CAN node) must be opened prior to initiating any ISP Initialization communication. To open the communication with the device, the Host sends a “connecting” CAN message (ID_SELECT_NODE) with the node ...

Page 12

Request from Host Note: Answers from Bootloader Note: If the communication is closed then all the others messages won’t be managed by bootloader. ID_SELECT_NODE Flow Description Host Send Select Node Message with Node Number in Parameter OR Time-out 10 ms ...

Page 13

Programming the The communication flow described above shows how to program data in the Flash memory or in Flash or EEPROM data the EEPROM data memory. This operation can be executed only with a device previously opened in communication. 1. ...

Page 14

Answers from The device has two possible answers: Bootloader • If the device is ready to receive new data, it sends a “programming data” CAN message (Id_prog_data) with the result Command_new passed in parameter. • If the device has finished ...

Page 15

Programming Example Programming Data (write 55h from 0000h to 0008h in the flash) HOST BOOTLOADER HOST BOOTLOADER HOST BOOTLOADER Programming Data (write 55h from 0000h to 0008h in the flash), with SSB in write security HOST BOOTLOADER Reading the Flash ...

Page 16

Answer to a blank check command: ID_DISPLAY_DATA ID_DISPLAY_DATA Flow Description Host Send Display_data Message with Addresses or Blank Check OR Wait ERROR COMMAND ABORTED OR Wait Data Display All Data Read COMMAND FINISHED OR Wait COMMAND_OK COMMAND FINISHED Wait COMMAND_OK ...

Page 17

ID_Display_DATA Example Display Data (from 0000h to 0008h) HOST BOOTLOADER BOOTLOADER Blank Check HOST BOOTLOADER Programming The ID_WRITE_COMMAND flow described below allows the user to program Configuration Configuration Information regarding the bootloader functionalities. Information This operation can be executed only ...

Page 18

Requests from Host ID_WRITE_COMMAND Answers from The device has two possible answers: Bootloader • If the chip is protected from program access an “Error” CAN message is sent (see Section “Error Message Description”, page 23). • Otherwise an acknowledge “Command ...

Page 19

ID_WRITE_COMMAND Flow Description Host Send Write_Command OR Wait ERROR_SECURITY COMMAND ABORTED Wait COMMAND_OK COMMAND FINISHED ID_WRITE_COMMAND Example Write BSB at 88h HOST BOOTLOADER Write Fuse bit at Fxh HOST BOOTLOADER Reading Configuration The ID_READ_COMMAND flow described below allows the user ...

Page 20

Requests from Host ID_READ_COMMAND Answers from The device has two possible answers: Bootloader • If the chip is protected from read access an “Error” CAN message is sent (see Section “Error Message Description”, page 23). • Otherwise the device answers ...

Page 21

Flow Description Host Send read_com message OR Wait ERROR_SECURITY COMMAND ABORTED Wait Value of data COMMAND FINISHED ID_READ_COMMAND Example Read Bootloader Version HOST BOOTLOADER Read SBV HOST BOOTLOADER Read Fuse bit HOST BOOTLOADER 4208D–CAN–03/08 T89C51CC02 CAN Bootloader ID_READ_COM MESSAGE ID_ERROR ...

Page 22

Erasing the Flash The ID_WRITE_COMMAND flow described below allows the user to erase the Flash memory. This operation can be executed only with a device previously opened in communication. Two modes of Flash erasing are possible: • Full-chip erase • ...

Page 23

Starting the The ID_WRITE_COMMAND flow described below allows to start the application directly from Application the bootloader upon a specific command reception. This operation can be executed only with a device previously opened in communication. Two options are possible: • ...

Page 24

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/S The user application can call some Application Programming Interface (API) routines allowing elf- IAP. These ...

Page 25

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 26

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: Erasing Flash The T89C51CC02 Flash ...

Page 27

Starting the There are two start bootloader routines possible: Bootloader 1. This routine allows to start at the beginning of the bootloader or after a reset. After calling this routine the regular boot process is performed and the communication must ...

Page 28

Appendix-A Table 1. Summary of Frames from Host Identifier Length ID_SELECT_NODE 1 (CRIS:0h) ID_PROG_START 5 (CRIS:1h) ID_PROG_DATA n (CRIS:2h) ID_DISPLAY_DATA 5 (CRIS:3h) 2 ID_WRITE_COMMAND 3 (CRIS:4h T89C51CC02 CAN Bootloader 28 Data[0] Data[1] Data[2] num node - - ...

Page 29

Table 1. Summary of Frames from Host (Continued) Identifier Length 2 ID_READ_COMMAND (CRIS:5h 4208D–CAN–03/08 T89C51CC02 CAN Bootloader Data[0] Data[1] Data[2] 00h - 00h 01h - 02h - 00h - 01h - 02h - 03h - 04h - 05h ...

Page 30

Table 2. Summary of Frames from Target (Bootloader) Identifier Length ID_SELECT_NODE 2 (CRIS:0h) ID_PROG_START 0 (CIRS:1h) ID_PROG_DATA 1 (CRIS:2h) n ID_DISPLAY_DATA 0 (CRIS:3h) 2 ID_WRITE_COMMAND 1 (CIRS:4h) ID_READ_COMMAND 1 (CRIS:5h) ID_ERROR 1 (CRIS:6h) T89C51CC02 CAN Bootloader 30 Data[0] Data[1] Data[2] ...

Page 31

Appendix-B Table 3. 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_clr_X2 __api_set_X2 __api_rd_BSB __api_wr_BSB __api_rd_SBV __api_wr_SBV __api_erase_SBV __api_rd_SSB __api_wr_SSB __api_rd_EB __api_wr_EB __api_rd_CANBTC1 __api_wr_CANBTC1 __api_rd_CANBTC2 __api_wr_CANBTC2 __api_rd_CANBTC3 __api_wr_CANBTC3 __api_rd_NNB __api_wr_NNB __api_rd_CRIS __api_wr_CRIS __api_rd_manufacturer __api_rd_device_id1 __api_rd_device_id2 __api_rd_device_id3 __api_rd_bootloader_version 4208D–CAN–03/08 ...

Page 32

Table 3. API Summary (Continued) Function Name __api_eeprom_busy __api_rd_eeprom_byte __api_wr_eeprom_byte __api_start_bootloader __api_start_isp Datasheet Change Log Changes from 1. Clarified explanation regarding full chip erase. See “Erasing Flash” on page 26. 4208B - 04/03 to 42108C - 12/03 Changes from 1. ...

Page 33

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