单片机教程1

上传人:f****u 文档编号:115980205 上传时间:2019-11-15 格式:PDF 页数:32 大小:307.04KB
返回 下载 相关 举报
单片机教程1_第1页
第1页 / 共32页
单片机教程1_第2页
第2页 / 共32页
单片机教程1_第3页
第3页 / 共32页
单片机教程1_第4页
第4页 / 共32页
单片机教程1_第5页
第5页 / 共32页
点击查看更多>>
资源描述

《单片机教程1》由会员分享,可在线阅读,更多相关《单片机教程1(32页珍藏版)》请在金锄头文库上搜索。

1、Features Protocol CAN Used as Physical Layer 7 ISP CAN Identifiers Relocatable ISP CAN Identifiers Autobaud In-System Programming 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 In-A

2、pplication Programming/Self Programming Read/Write Flash and EEPROM Memories Read Device ID Block Erase Read/Write Configuration Bytes Bootloader Start Description This document describes the CAN bootloader functionalities as well as the CAN proto- col to efficiently perform operations on the on-chi

3、p Flash (EEPROM) memories. Additional information on the AT89C51CC03 product can be found in the AT89C51CC03 datasheet and the AT89C51CC03 errata sheet available on the Atmel web site. The bootloader software package (source code and binary) currently used for produc- tion is available from the Atme

4、l web site. Bootloader RevisionPurpose of ModificationsDate Revisions 1.0.0First release01/08/2003 Revisions 1.0.1SBV 0x7F00 bug fix (no doc and specification change) 15/04/2004 Revision 1.0.4Improvement of Autobaud detection.04/01/2006 4251BCAN03/08 CAN Microcontrollers AT89C51CC03 CAN Bootloader 2

5、 4251BCAN03/08 AT89C51CC03 CAN Bootloader Functional Description The AT89C51CC03 Bootloader facilitates In-System Programming and In-Application Programming. In-System Programming Capability In-System Programming allows the user to program or reprogram a microcontroller on-chip Flash memory without

6、removing it from the system and without the need of a pre-programmed application. The CAN bootloader can manage a communication with a host through the CAN network. It can also access and perform requested operations on the on-chip Flash Memory. In-Application Programming or Self Programming Capabil

7、ity In-Application Programming (IAP) allows the reprogramming of a microcontroller on-chip Flash memory without removing it from the system and while the embedded application is running. The CAN bootloader contains some Application Programming Interface routines named API rou- tines allowing IAP by

8、using the users firmware. Block DiagramThis section describes the different parts of the bootloader. The figure below shows the on-chip bootloader and IAP processes. Figure 1. Bootloader Process Description ISP Communication Management User Application CAN Protocol Communication Management Flash Mem

9、ory External host via the Flash Memory IAP Management User Call On Chip 3 4251BCAN03/08 AT89C51CC03 CAN Bootloader ISP Communication Management The purpose of this process is to manage the communication and its protocol between the on- chip bootloader and an external device (host). The on-chip bootl

10、oader implements a CAN proto- col (see Section “Protocol”). This process translates serial communication frames (CAN) into Flash memory accesses (read, write, erase.). User Call ManagementSeveral Application Program Interface (API) calls are available to the application program to selectively erase

11、and program Flash pages. All calls are made through a common interface (API calls) included in the bootloader. The purpose of this process is to translate the application request into internal Flash Memory operations. Flash Memory Management This process manages low level accesses to the Flash memor

12、y (performs read and write accesses). Bootloader Configuration Configuration and Manufacturer Information The table below lists Configuration and Manufacturer byte information used by the bootloader. This information can be accessed through a set of API or ISP commands. MnemonicDescriptionDefault Va

13、lue BSBBoot Status ByteFFh SBVSoftware Boot VectorFCh SSBSoftware Security ByteFFh EBExtra ByteFFh CANBT1CAN Bit Timing 1FFh CANBT2CAN Bit Timing 2FFh CANBT3CAN Bit Timing 3FFh NNBNode Number ByteFFh CRISCAN Re-locatable Identifier SegmentFFh Manufacturer58h Id1: Family codeD7h Id2: Product NameFFh

14、Id3: Product RevisionFEh 4 4251BCAN03/08 AT89C51CC03 CAN Bootloader Mapping and Default Value of Hardware Security Byte The 4 MSB of the Hardware Byte can be read/written by software (this area is called Fuse bits). The 4 LSB can only be read by software and written by hardware in parallel mode (wit

15、h parallel programmer devices). Note:U: Unprogram = 1 P: Program = 0 SecurityThe bootloader has Software Security Byte (SSB) to protect itself from user access or ISP access. The Software Security Byte (SSB) protects from ISP accesses. The command “Program Soft- ware Security Bit“ can only write a h

16、igher priority level. There are three levels of security: Level 0: NO_SECURITY (FFh) This is the default level. From level 0, one can write level 1 or level 2. Level 1: WRITE_SECURITY (FEh) In this level it is impossible to write in the Flash memory, BSB and SBV. The Bootloader returns ID_ERROR message. From level 1, one can write only level 2. Level 2: RD_WR_SECURITY (FCh) Level 2 forbids all read and write accesses to/from the Flash memory. The Boot

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 办公文档 > 其它办公文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号