CAN, 80C51, AVR, Microcontroller. Application Note

Similar documents
CAN Microcontrollers. Application Note. Migrating from T89C51CC01 to AT89C51CC03. Feature Comparison

Application Note. Microcontrollers. Using Keil FlashMon Emulator with AT89C51CC01/03 AT89C51CC01/ Summary. 2. Background overview

Rad Hard FPGA. AT40KEL-DK Design Kit Content. Description. Kit Content. Reference Material. Support

TSC695. Application Note. Annulled Cycle Management on the TSC695. References

AT89ISP Programmer Cable Introduction AT89ISP Programmer Cable Parallel Port Settings Application Note AT89ISP Software AT89ISP Cable polarized

AT17F Series. Application Note. Programming Circuits for AT17F Series Configurators with Xilinx FPGAs. 1. Introduction

AVR32 UC3 Software Framework... User Manual

AT91 ARM Thumb Microcontrollers. Application Note. AT91 Host Flash Loader. 1. Package Contents. 2. Definition of Terms. 3.

AT17 Series FPGA. Configuration Memory. Application Note. In-System Programming Circuits for AT17 Series Configurators with Atmel and Xilinx FPGAs

8-bit Microcontroller. Application Note. AVR320: Software SPI Master

8051 Microcontrollers. Application Note. Migration from AT89C5131 & AT89C5131A-L to AT89C5131A-M

Section 1 ATAVRAUTOEK1 Getting Started

Interfacing the internal serial EEPROM

FPGA Configuration EEPROM Memory. Application Note. Programming Atmel s EEPROMs: AT17LV020(A) vs. AT17LV002(A) Introduction.

8-bit RISC Microcontroller. Application Note. AVR 305: Half Duplex Compact Software UART

MARC4. Application Note. Hints and Tips for Hard- and Software Developments with MARC4 Microcontrollers

AT17(A) Series FPGA Configuration Memory. Application Note

AT89C5131 Starter Kit... Software User Guide

Trusted Platform Module AT97SC3203S. SMBus Two-Wire Interface. Summary

AT91 ARM Thumb Microcontrollers. Application Note. AT91M55800A Clock Switching Considerations using Advanced Power Management Controller.

8-bit Microcontroller. Application Note. AVR031: Getting Started with ImageCraft C for AVR

MP3 Player Reference Design Based on AT89C51SND1 Microcontroller... User Guide

8-bit Microcontroller. Application Note. AVR030: Getting Started with C for AVR

AT89STK-09 Starter Kit for AT83C26... User Guide

AVR501: Replacing ATtiny15 with ATtiny25. 8-bit Microcontrollers. Application Note PRELIMINARY. Features. 1 Introduction

8-bit RISC Microcontroller. Application Note. AVR151: Setup And Use of The SPI

SAM Boot Assistant (SAM-BA)... User Guide

Application Note Microcontrollers. C Flash Drivers for T89C51RC/RB/IC2 and AT89C51RC/RB/IC2 for Keil Compilers

ATAVRAUTO User Guide

Migration From AT89C51SND1C to AT83C51SDN1C. Application Note. MP3 Microcontrollers

System Designer. Programmable SLI AT94K/AT94S Series. Features. Description

ATAVRAUTO User Guide

AT89STK-10 Starter Kit... Hardware User Guide

FPGA Configurator Programming Kit (Enhanced) ATDH2200E. Features. Description

System Designer. Programmable SLI AT94K/AT94S Series. Features. Description

AVR1303: Use and configuration of IR communication module. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

AVR32752: Using the AVR32 UC3 Static Memory Controller. 32-bit Microcontrollers. Application Note. Features. 1 Introduction

Two-wire Serial EEPROM Smart Card Modules 128K (16,384 x 8) 256 (32,768 x 8) AT24C128SC AT24C256SC. Features. Description VCC NC

AT94K Series Field Programmable System Level Integrated Circuit. Application Note. FPSLIC Baud Rate Generator

8-bit Microcontroller. Application Note. AVR201: Using the AVR Hardware Multiplier

Programmable SLI AT40K AT40KAL AT94K. Application Note. Implementing a Single-coefficient Multiplier

a clock signal and a bi-directional data signal (SCL, SDA)

AVR1315: Accessing the XMEGA EEPROM. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

32-bit Secure. AT91SC CT-USB Summary. Microcontrollers. Features

Two-Wire Serial EEPROM AT24C164 (1)

Two-wire Serial EEPROM Smart Card Modules 1K (128 x 8) 2K (256 x 8) 4K (512 x 8) 8K (1024 x 8) 16K (2048 x 8)

80C51 MCUs T89C51AC2. Errata Sheet

256K (32K x 8) 5-volt Only Flash Memory AT29C256

DatasheetDirect.com. Visit to get your free datasheets. This datasheet has been downloaded by

256 (32K x 8) High-speed Parallel EEPROM AT28HC256N. Features. Description. Pin Configurations

2-Wire Serial EEPROM AT24C01. Features. Description. Pin Configurations. 1K (128 x 8)

8-bit Microcontroller. Application Note. AVR033: Getting Started with the CodeVisionAVR C Compiler

256K (32K x 8) 5-volt Only Flash Memory AT29C256

AVR1503: Xplain training - XMEGA Programmable Multi Interrupt Controller 8-bit Microcontrollers Application Note Prerequisites

hex file. The example described in this application note is written for the AT94K using the FPSLIC Starter Kit. Creating a New Project

GemCore Serial Lite PRO AT83C21GC. Summary

AT89C51CC03 UART Bootloader

ARM7TDMI - based Microcontroller AT91RM3400. Errata Sheet

AT85DVK-07 Demonstration Firmware... User s Manual

AT697E. Application Note. Checking AT697E Code for Occurrence of LDF/FPOPd Instructions Sequence with a dependency on an Odd-Numbered Register

T89C5115 UART Bootloader

2-megabit (256K x 8) 5-volt Only Flash Memory AT29C020

2-wire Serial EEPROM AT24C21. 2-Wire, 1K Serial EEPROM. Features. Description. Not Recommended for New Designs. Pin Configurations.

AVR32401: AVR32 AP7 Linux Interfacing DataFlash. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

64K (8K x 8) High Speed Parallel EEPROM with Page Write and Software Data Protection AT28HC64BF

1-megabit (128K x 8) 5-volt Only Flash Memory AT29C010A

T89C51AC2 UART Bootloader

4-megabit (512K x 8) 3-volt Only 256-byte Sector Flash Memory AT29LV040A

64K (8K x 8) Parallel EEPROM with Page Write and Software Data Protection AT28C64B. Features. Description. Pin Configurations

2-wire Serial EEPROM Smart Card Modules AT24C32SC AT24C64SC

AVR097: Migration between ATmega128 and ATmega1281/ATmega bit Microcontrollers. Application Note. Features. 1 Introduction

AT89C5122. Application Note. Preventing Windows XP from Displaying Unknown device Message at Startup

AT89C51SND1 UART Bootloader

3-Wire Serial EEPROM AT93C46C

8-megabyte, 4-megabyte, and 2-megabyte 2.7-volt Only DataFlash Cards AT45DCB008D AT45DCB004D AT45DCB002D. Not Recommended for New Design

CryptoRF EEPROM Memory 8 Kbits

512K (64K x 8) 5-volt Only Flash Memory AT49F512

UART. Embedded RISC Microcontroller Core Peripheral

AVR1922: Xplain Board Controller Firmware 8-bit Microcontrollers Application Note Features 1 Introduction

1-megabit (64K x 16) 3-volt Only Flash Memory AT49BV1024A AT49LV1024A

4-megabit (512K x 8) Single 2.7-volt Battery-Voltage Flash Memory AT49BV040A

T89C51CC01 CAN Bootloader

8-bit Microcontroller. Application Note. AVR033: Getting Started with the CodeVisionAVR C Compiler

AVR based 125kHz RFID Evaluation Kit (Re)Programming Guide ATA2270-EK1. Overview. Fuse Settings: ISP Programming

AT91 ARM Thumb Microcontrollers. Application Note. Using the ECC Controller on AT91SAM9260/9263 and AT91SAM7SE Microcontrollers. 1.

Bluetooth General Information White Paper

2-wire Serial EEPROM AT24C1024. Features. Description. Pin Configurations. 1M (131,072 x 8)

DIP Top View VCC A12 A14 A13 A6 A5 A4 A3 A2 A1 A0 A8 A9 A11 A10 I/O7 I/O6 I/O0 I/O1 I/O2 I/O5 I/O4 I/O3 GND. TSOP Top View Type 1 A11 A9 A8 A13 A14

8-bit Microcontroller. Application Note. AVR032: Linker Command Files for the IAR ICCA90 Compiler

2-megabit (256K x 8) 3-volt Only Flash Memory AT29LV020

AVR32917: picopower Board getting started. 32-bit Microcontrollers. Application Note. Preliminary. Features. 1 Introduction

AVR1501: Xplain training XMEGA Timer/Counter 8-bit Microcontrollers Application Note Prerequisites 1 Introduction

AVR532: Migration from ATmega48/88/168 to ATmega48A/88A/168A. 8-bit Microcontrollers. Application Note. 1 Introduction

AVR1518: XMEGA-A1 Xplained Training - XMEGA Clock System. 8-bit Atmel Microcontrollers. Application Note. Prerequisites.

AT91SAM-ICE... User Guide

Flash Microcontrollers. Application Note. Migrating from AT89C2051/C4051 to AT89LP2052/LP4052

8-bit Microcontroller with 2K/4K/8K Bytes In-System Programmable Flash. Appendix A. Preliminary. ATtiny261 ATtiny461 ATtiny861 Automotive

512K (64K x 8) 5-volt Only Flash Memory AT29C512

T89C51CC01 T89C51CC01UA T89C51CC01CA. Errata Sheet. CAN Microcontrollers

4-megabit (512K x 8) Flash Memory AT49BV040B

Transcription:

Migrating from Atmel C51/CAN: T89C51CC01, AT89C51CC03 To Atmel AVR/CAN: AT90CAN128, AT90CAN64, AT90CAN32 Introduction This application note is a guide, on the CAN controller, to help current T89C51CC01, AT89C51CC03 users convert existing designs to AT90CAN128, AT90CAN64, AT90CAN32. The CAN controller used in T89C51CC01/AT89C51CC03 and the CAN controller used in AT90CAN128 are almost identical. this application note presents their differences and helps users take advantage of additional features. Check the datasheets of these products for detailed information. CAN, 80C51, AVR, Microcontroller Same CAN controller The CAN controller implemented into AT89C51CC01, AT89C51CC03, AT90CAN128, AT90CAN64, AT90CAN32 offers V2.0B Active. This full-can controller provides the whole hardware for convenient acceptance filtering and message management. For each message to be transmitted or received this module contains one so called message object in which all information regarding the message (e.g. identifier, data bytes etc.) is stored. During the initialization of the peripheral, the application defines which messages are to be sent and which are to be received. When the CAN controller receives a message whose identifier matches the identifiers of the programmed message objects, the message is stored and an interrupt occurs. Another advantage is that incoming remote frames can be answered automatically by the full-can controller with the corresponding data frame. In this way, CPU load is strongly reduced compared to a basic-can solution. Using full-can controller, high baudrates and high bus loads with many messages can be handled. The CNHPMOB and BOFF registers have been added to the following products AT90CAN128, AT90CAN64, AT90CAN32 BOFF (Bus OFF Mode) BOFF gives the information of the state of the CAN channel. Only entering in bus Off mode generates the BOFFIT interrupt. CANHPMOB (CAN Highest Priority MOB Register) This register offer the possibility to quickly manage the MOB having the highest priority in CANSIT registers. AVR/CAN controller = C51/CAN controller + BOFFIT + CANHPMOB

Error Management The Bus Off Interrupt Flag (BOFFIT) in the AT90CAN128, AT90CAN64, AT90CAN32 provides functionality concerning error management not available in the AT89C51CC01 and AT89C51CC03 as illustrated in the following diagrams. Figure 1. Line Error Mode on AT89C51CC01, AT89C51CC03 Figure 2. Line Error Mode on AT90CAN128, AT90CAN64, AT90CAN32 2

CAN General Interrupt Register - CANGIT This register serves exactly the same function between T89C51CC01, AT89C51CC03 and AT90CAN128, AT90CAN64, AT90CAN32. The only difference is bit 6, which exists only on AT90CAN128, AT90CAN64, AT90CAN32: Bit 6 BOFFIT: Bus Off Interrupt Flag Writing a logical 1 resets this interrupt flag. BOFFIT flag is only set when the CAN enters in bus off mode coming from error passive mode. 0 - no interrupt. 1 - bus off interrupt when the CAN enters in bus off mode. In order to RESET the Interrupt, you have to write a level 0 on CANGIT for the T89C51CC01, AT89C51CC03. In order to RESET the Interrupt, you have to write a level 1 on CANGIT for the AT90CAN128, AT90CAN64, AT90CAN32. CAN Highest Priority Mob Register CANHPMOB This register only exists on AT90CAN128, AT90CAN64, AT90CAN32. This register offers the possibility to quickly manage the MOB having the highest priority in CAN- SIT registers. CAN General Interrupt Enable Register - CANGIE This register has exactly the same function between T89C51CC01, AT89C51CC03 and AT90CAN128, AT90CAN64, AT90CAN32. The only differences are bit 6 and bit 7, which exist only on AT90CAN128, AT90CAN64, AT90CAN32: Bit 7 ENIT: Enable all Interrupts (Except for CAN Timer Overrun Interrupt) 0 - interrupt disabled. 1- CANIT interrupt enabled. Bit 6 ENBOFF: Enable Bus Off Interrupt 0 - interrupt disabled. 1- bus off interrupt enabled. 3

Register Name Differences and Bit Name Differences These registers have exactly the same function between AT89C51CC01, AT89C51CC03 and AT90CAN128, AT90CAN64, AT90CAN32. Only some bits do not have the same name and some registers do not have exactly the same name (but the function is exactly the same). T89C51CC01 AT89C51CC03 AT90CAN128 AT90CAN64 AT90CAN32 CAN General Control Register CANGCON bit 3 AUTOBAUD LISTEN CAN General Status Register CANGSTA bit 3 RBSY RXBSY CAN General Status Register CANGSTA bit 4 TBSY TXBSY CAN Enable Mob Registers CANEN1 & CANEN2 ENCHx ENMOBx CAN Enable Interrupt Mob Registers CANIE1 & CANIE2 IECHx IENMOBx CAN Timer Control Register CANTCON TPRESCx TPRSCx CAN Page Mob register - CANPAGE CHNBx MOBNBx CAN Message Object Control and DLC register name difference CANCONCH CANCDMOB CAN Time Stamp Registers name difference CANSTMPx CANSTM 4

CAN Timer A programmable 16-bit timer is used for message stamping and time trigger communication (TTC). Before the CANTCON the AT89C51CC01, AT89C51CC03 we have a clock frequency divider of 6. For the AT90CAN128, AT90CAN64, AT90CAN32 we have a clock frequency divider of 8. Figure 3. CAN Timer Block Diagram on AT89C51CC01, AT89C51CC03 Figure 4. CAN Timer Block Diagram on AT90CAN128, AT90CAN64, AT90CAN32 5

Performance Comparison AVR versus C51 Atmel with CANopen Software Here are some figures of IXXAT CANopen software for a performance comparison: On the T89C51CC01 / AT89C51CC03 the CANISR runs about 80µs an RX PDO is processed in about 200µs an TX PDO is processed in about 440µs On the AT90CAN128 the CANISR runs about 14µs an RX PDO is processed in about 40µs an TX PDO is processed in about 100µs Depending on the application that is to be implemented, the on-chip RAM of a T89C51CC01 / AT89C51CC03 can also be a restriction with CANopen. 6

Atmel Corporation 2325 Orchard Parkway San Jose, CA 95131, USA Tel: 1(408) 441-0311 Fax: 1(408) 487-2600 Regional Headquarters Europe Atmel Sarl Route des Arsenaux 41 Case Postale 80 CH-1705 Fribourg Switzerland Tel: (41) 26-426-5555 Fax: (41) 26-426-5500 Asia Room 1219 Chinachem Golden Plaza 77 Mody Road Tsimshatsui East Kowloon Hong Kong Tel: (852) 2721-9778 Fax: (852) 2722-1369 Japan 9F, Tonetsu Shinkawa Bldg. 1-24-8 Shinkawa Chuo-ku, Tokyo 104-0033 Japan Tel: (81) 3-3523-3551 Fax: (81) 3-3523-7581 Atmel Operations Memory 2325 Orchard Parkway San Jose, CA 95131, USA Tel: 1(408) 441-0311 Fax: 1(408) 436-4314 Microcontrollers 2325 Orchard Parkway San Jose, CA 95131, USA Tel: 1(408) 441-0311 Fax: 1(408) 436-4314 La Chantrerie BP 70602 44306 Nantes Cedex 3, France Tel: (33) 2-40-18-18-18 Fax: (33) 2-40-18-19-60 ASIC/ASSP/Smart Cards Zone Industrielle 13106 Rousset Cedex, France Tel: (33) 4-42-53-60-00 Fax: (33) 4-42-53-60-01 1150 East Cheyenne Mtn. Blvd. Colorado Springs, CO 80906, USA Tel: 1(719) 576-3300 Fax: 1(719) 540-1759 Scottish Enterprise Technology Park Maxwell Building East Kilbride G75 0QR, Scotland Tel: (44) 1355-803-000 Fax: (44) 1355-242-743 RF/Automotive Theresienstrasse 2 Postfach 3535 74025 Heilbronn, Germany Tel: (49) 71-31-67-0 Fax: (49) 71-31-67-2340 1150 East Cheyenne Mtn. Blvd. Colorado Springs, CO 80906, USA Tel: 1(719) 576-3300 Fax: 1(719) 540-1759 Biometrics/Imaging/Hi-Rel MPU/ High Speed Converters/RF Datacom Avenue de Rochepleine BP 123 38521 Saint-Egreve Cedex, France Tel: (33) 4-76-58-30-00 Fax: (33) 4-76-58-34-80 Literature Requests www.atmel.com/literature 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 CONDITIONS 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. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL, PUNITIVE, SPECIAL OR INCIDENTAL DAMAGES (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF PROFITS, BUSINESS INTERRUPTION, OR LOSS OF INFORMATION) ARISING OUT OF THE USE OR INABILITY TO USE THIS DOCUMENT, EVEN IF ATMEL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Atmel makes no representations or warranties with respect to the accuracy or completeness of the contents of this document and reserves the right to make changes to specifications and product descriptions at any time without notice. Atmel does not make any commitment to update the information contained herein. Atmel s products are not intended, authorized, or warranted for use as components in applications intended to support or sustain life. Atmel Corporation 2005. All rights reserved. Atmel, logo and combinations thereof, are registered trademarks, and Everywhere You Are are the trademarks of Atmel Corporation or its subsidiaries. Other terms and product names may be trademarks of others. Printed on recycled paper.