T89C51CC02CA-TDSIM Atmel, T89C51CC02CA-TDSIM Datasheet

IC 8051 MCU FLASH 16K 24SOIC

T89C51CC02CA-TDSIM

Manufacturer Part Number
T89C51CC02CA-TDSIM
Description
IC 8051 MCU FLASH 16K 24SOIC
Manufacturer
Atmel
Series
AT89C CANr

Specifications of T89C51CC02CA-TDSIM

Core Processor
8051
Core Size
8-Bit
Speed
40MHz
Connectivity
CAN, UART/USART
Peripherals
POR, PWM, WDT
Number Of I /o
20
Program Memory Size
16KB (16K x 8)
Program Memory Type
FLASH
Eeprom Size
2K x 8
Ram Size
512 x 8
Voltage - Supply (vcc/vdd)
3 V ~ 5.5 V
Data Converters
A/D 8x10b
Oscillator Type
External
Operating Temperature
-40°C ~ 85°C
Package / Case
24-SOIC (7.5mm Width)
For Use With
AT89STK-06 - KIT DEMOBOARD 8051 MCU W/CAN
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
Other names
T89C51CC02CATDSIM
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 T89C51CC02CA-TDSIM

T89C51CC02CA-TDSIM Summary of contents

Page 1

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

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

... Application FLIP Software FLIP software program running under Windows that supports all Atmel Flash microcontroller and CAN protocol communication media. Program This software program is available free of charge from the Atmel web site. 4223C–CAN–03/08 T89C51CC02 UART Bootloader User Bootloader [SBV]00h ...

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

... COMMAND FINISHED Example 4223C–CAN–03/08 T89C51CC02 UART Bootloader Write Command ’X’ & CR & LF ’P’ & CR & LF ’.’ & CR & LF Programming Atmel function (write SSB to level 2) HOST : 02 0000 BOOTLOADER : 02 0000 F5 Writing Frame (write BSB to 55h) HOST : 03 0000 BOOTLOADER : 03 0000 ...

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

... CR & LF ’L’ & CR & LF ’value’ & ’.’ & CR & LF Read function (read SBV 0000 HOST BOOTLOADER : 02 0000 Value . CR LF Atmel Read function (read Bootloader version 0000 HOST : 02 0000 Value . CR LF BOOTLOADER Bootloader Wait Read Command Checksum error ...

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

... To call the corresponding API, the user must use a set of Flash_api routines which can be linked with the application. Example of Flash_api routines are available on the Atmel web site on the software application note: C Flash Drivers for the T89C51CC02UA The Flash_api routines on the package work only with the UART bootloader. ...

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

... Disclaimer: The information in this document is provided in connection with Atmel products. No license, express or implied, by estoppel or otherwise, to any intellectual property right is granted by this document or in connection with the sale of Atmel products. EXCEPT AS SET FORTH IN ATMEL’S TERMS AND CONDI- TIONS OF SALE LOCATED ON ATMEL’S WEB SITE, ATMEL ASSUMES NO LIABILITY WHATSOEVER AND DISCLAIMS ANY EXPRESS, IMPLIED OR STATUTORY WARRANTY RELATING TO ITS PRODUCTS INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT ...

Related keywords