ATMEL AT89STK-06 CAN Starter Kit User Guide

June 3, 2024
Atmel

**

ATMEL-logo**

ATMEL AT89STK-06 CAN Starter Kit

Introduction

The purpose of this section is to acquaint the user with the Atmel CAN Demo Board, the In-System Programming tool (FLIP), the 2 demonstration programs: CAN Generator and CAN Monitor, and finally with the 2 bootloaders (CAN and UART).

Abbreviations

  • FLIP: Flexible In-System Programmer
  • ISP: In-System Programming

Getting Started

The purpose of this section is to acquaint the user with the Atmel CAN Demo Board, the In-System Programming tool (FLIP), the 2 demonstration programs: CAN Generator and CAN Monitor, and finally with the 2 bootloaders (CAN and UART).

Hardware Requirements

  • CAN Demo board plus either a Second AT89STK-06 (1) and/or a CAN Dongle(1) (IXXAT, PCAN, CANCARDX, CAMPARI, or RMCANVIEW)
  • RS-232 Serial Cable (DB9/DB9 Male/Female)
  • Serial Cable DB9/DB9 Female/Female(1)
  • AT89C51CC03U-SLIM or AT89C51CC03U-SLSIM
  • AT89C51CC03C-S3SIM

Notes:

  1. Not included in CAN Demo Board kit.
  2. The AT89STK-06 can also be used with T89C51CC01 and T89C51CC02 CAN controllers (requires optional adapter for T89C51CC02)
  3. The AT89STK-06 can be used with AT89C51AC3, T89C51AC2, and T89C5115 controllers with ADC (requires an optional adapter for T89C5115).

Software Requirements
Several demonstration programs can be found in the accompanying CD-ROM

  • CAN generator UART bootloader demonstration program (HEX file)
  • CAN monitor UART bootloader demonstration program (HEX file)
  • CAN generator CAN bootloader demonstration program (HEX file)
  • CAN monitor CAN bootloader demonstration program (HEX file)
  • CAN Dongle program (HEX file)
  • ADC demonstration program (HEX file)(1)
  • A self-training package is also available on the CAN CD-ROM. It introduces CAN bit timing as welll as the CAN Software Library.

Note:

  1. The ADC demo is the only demonstration program that can be used with non-CAN products.

FLIP Software
FLIP software runs on Windows 98®, ME®, XP®, Windows NT® and Windows 2000®. FLIP supports In-system programming of Flash C51 devices through RS-232 and CAN (with a dongle). The latest version of FLIP software can be found on the Atmel web site. The CAN CD-ROM includes a copy of FLIP 2. The following figures were assembled with Flip.

A Linux version of FLIP is also available.

Software Demonstrations

UART Bootloader Demonstration Setup
The first demonstration (UART Bootloader) will use a PC running FLIP software to program a CAN Demo board through an RS-232 cable as illustrated in Figure 3-1.

PC to CAN Demoboard Through RS-232ATMEL-AT89STK-06-CAN-Starter-Kit-
fig-1

Hardware Connection

  1. Connect a 9 volts DC power supply.
  2. Connect the AT89STK-06 to the PC through the RS-232 cable.
  3. Ensure an AT89C51CC03U-SLSIM is connected to the AT89STK-06.

Setting the Hardware Condition
CAN microcontrollers come pre-programmed to start in Bootloader mode at first power-up? In the first ISP demonstration, the user will need to program the sample microcontroller set to boot in bootloader mode. To enter in ISP mode with hardware conditions, press both the RESET (SW5) and ISP (SW4) buttons simultaneously. First release the RESET button and then the ISP button.

Using FLIP

In this section, the user will program the AT89C51CC03UA-SLSIM microcontroller through the UART Bootloader using FLIP software. The following procedure will guide you through the programming of the demonstration program.

  1. Run FLIP software
    Flip default windowATMEL-AT89STK-06-CAN-Starter-Kit-
fig-2

  2. From the Device Menu, choose Select and select the device (AT89C51CC03) that is connected on the AT89STK-06.
    FLIP Window With Device Selected ATMEL-AT89STK-06-CAN-Starter-Kit-
fig-3

  3. From the “Settings” menu, select “Communication” and “RS232”. The following pop-up window appears and allows to select the COM port settings and Baud Rate.
    COM Port Settings

  4. Initialize the communication by selecting the ‘Connect’ button in the RS-232 popup window.
    If the connection is successful, the FLIP window should look like Figure 3-5. Detailed explanations of the significance of the fields can be found in the product datasheet on the Atmel site www.atmel.com.
    Note: On certain laptops, it is necessary to perform the following procedure. Click ‘Connect’, reset the AT89STK-06, then click ‘Sync’ (For detail information, see FLIP user’s manual).
    Succesful Connection on FLIPATMEL-AT89STK-06-CAN-Starter-Kit-
fig-5

  5. In the File menu, select ‘Load HEX’ and choose the demonstration program ‘can_gen.hex’. This is the program that performs the demonstration data exchange.
    The message ‘HEX file can_gen.hex loading is done’ is displayed at the bottom of the FLIP window.

  6. Ensure the following checkboxes are selected in the Operations Flow section of FLIP:

    • Erase
    • Blank Check
    • Program
    • Verify
      These are the operations that will be performed on the microcontroller.
  7. Press the Run button. Programming is executed.
    The Memory Verify Pass message confirms programming is successful and that the microcontroller has been programmed.

  8. Unchecked the BLJB box in order to execute the demonstration program after the next reset.

  9. Ensure the Reset box is checked, then press the Start Application button.

It is possible to connect a CAN monitoring device such as a CANALYZER or equivalent on the CAN DB9 connector to verify that the messages are transmitted on the CAN Bus.

To view the CAN messages transmission, the AT89STK-06 can also be connected to a standard RS232 terminal (like Hyperterminal).

The Hyperterminal should be configured as presented in the following figure.

RS232 Configuration

The following messages will appear on the RS232 terminal

CAN Generator RS232 outputATMEL-AT89STK-06-CAN-Starter-Kit-
fig-7

CAN Monitor Demonstration Program

Using a method similar to that discussed in the demonstration program above, it is possible to program the Monitor Demonstration ‘can_mon.hex’. The Monitor Demonstration displays the content of any incoming messages on an RS232 Terminal (9600 bauds).

For users with two CAN Demo boards, it is possible to program the CAN generator demonstration ‘can_gen.hex’ on one board and the CAN Monitor demonstration ‘mon_boot_can.hex’ on the other. The connection is made using a CAN DB9/DB9 Male/Male cable.

CAN Monitor RS232 OutputATMEL-AT89STK-06-CAN-Starter-Kit-
fig-8

CAN Bootloader Demonstration Setup
In this section, 2 demonstration programs will be explained. First, we will program the Atmel Dongle via the UART. Second, we will run the demonstration program from the AT89C51CC03CA-SLSIM microcontroller through a CAN bus to a second demo board that will display the results on the UART. If you use a CAN Dongle other than Atmel CAN go directly to Section 3.4 “CAN Boot-loader Demonstration Program”.

CAN Dongle for CAN DemoATMEL-AT89STK-06-CAN-Starter-Kit-
fig-9

Hardware Connections

  1. Connect a C51 Demo board and a CAN Demo board.
  2. Connect a 9 volts DC power supply.
  3. Ensure an AT89C51CC03CA-SLSIM microcontroller is connected to the CAN board.
  4. Connect the RS-232 cable to your PC and to the DB9 female port on the C51 demo board.
  5. Connect the CAN bus to the Atmel Dongle on both CAN boards. See Figure 3-9.

Programming Using FLIP
This section allows you to program the AT89C51CC03 microcontroller using FLIP software.

  1. Run FLIP.

  2. From the Device Menu, choose ‘Select’ and select the device (AT89C51CC03) that is connected on your demo board.

  3. From the ‘Settings’ menu, select ‘Communications’ then ‘RS-232’. Click ‘Connect’.

  4. In the File menu, select ‘Load HEX’ and choose the demonstration program ‘Atmel_dongle.hex’.
    The message ‘HEX file Atmel_dongle.hex loading done’ is displayed at the bottom of the FLIP window.

  5. Ensure the following checkboxes are selected in the Operations Flow section of FLIP:

    • Erase
    • Blank Check
    • Program
    • Verify
  6. These are the operations that will be performed on the microcontroller.

  7. Ensure the BLJB box is unchecked, in order to boot the demonstration program after the next reset.

  8. Ensure the Reset box is checked, then press the Start Application button. The UART displays the CAN messages that the program generates.

**CAN Bootloader Demonstration Program

**

The following procedure will guide you through the execution of the demonstration program.

  1. From the FLIP window, click ‘Device’ and select ‘AT89C51CC03’.

  2. From the ‘Settings’ menu select ‘Communication’ –> ‘CAN’ and choose the type of Dongle you are using. (See FLIP user’s manual)
    Dongle Configuration

  3. Click ‘Init’, then select ‘Node Connect’.
    The dongle sends a node to connect message with the Node Number Byte (NNB). ‘NNB = FF’ is the default NNB to which all CAN bootloaders will respond. If NNB is different than FF, the CAN microcontroller will respond only if its NNB matches the one specified in FLIP.
    The CAN bootloader starts autobaud, and once it is ready, acknowledges the message to FLIP to indicate that the communication is established. The default CRIS is 00. It is possible to set a different area for the 7 consecutive CAN message identifiers. FLIP and the CAN microcontroller must use the same CRIS to communicate.

  4. From the ‘File’ menu, select ‘Load HEX’ and select the ‘can_gen.hex’ file.

  5. Click ‘Run’ on the FLIP window. The CAN Generator program is successfully programmed. We will now program NNB and CRIS to different values.

  6. Click the ‘’Set CAN Node’ tab. The CAN Node Configuration dialog is displayed.
    CAN Node Configuration dialog

  7. Change the Node setting to ‘0F’ and CRIS to ‘08’. The BTC (Bit Timing Registers) settings remain unchanged. The NNB and CRIS settings are changed in order to give a unique number to the controller and to adapt it to Message Identifier mapping.

  8. Click ‘Set’ to program the settings, then click ‘Read’ to verify that programming was successful.

  9. Ensure the ‘Reset’ check box is selected.

  10. Click ’Start Application
    The microcontroller has been successfully programmed. The general program will run (send CAN messages and display them on the UART). The chip will now accept In-System Programming when ‘NNB = FF’ (default) or ‘0F’, and only with ‘CRIS = 08’.

ADC Demonstration

The purpose of this section is to demonstrate the basic functionality of the ADC module of the CAN microcontrollers. Using a method similar to that discussed in the section above, it is possible to program the ADC Demonstration ‘adc.hex’.

The demonstration software acquires an analog input voltage from the potentiometer and displays the converted value to the UART displays the content of any incoming messages on an RS232 Terminal (2400 bauds for XTAL frequency at 12MHz). The ADC demonstration program can be used with AT89C51CC03, T89C51CC01, T89C51CC02, AT89C51AC3, T89C51AC2, and T89C5115.

ADC Demonstration RS232 outputATMEL-AT89STK-06-CAN-Starter-Kit-
fig-12

Conclusion

We have successfully run 2 demonstration programs on the AT89C51CC03U with a UART bootloader and 2 demonstration programs on the AT89C51CC03C with CAN bootloader. In the CAN bootloader demonstrations, we also modified the NNB and CRIS in order to assign a unique number to the controller and adapt it to a Message Identifier mapping.

Using AT89C51CC03U with UART bootloader and AT89C51CC03C with CAN boot-loader, the same demonstration programs can be run on T89C51CC01. This illustrates the full compatibility between AT89C51CC03 and T89C51CC01.

Contact Information

Atmel Headquarters

Corporate Headquarters
2325 Orchard Parkway San Jose, CA 95131
TEL 1(408) 441-0311
FAX 1(408) 487-2600

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 Tsimhatsui 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
TEL 1(408) 441-0311
FAX 1(408) 436-4314

Microcontrollers
2325 Orchard Parkway San Jose, CA 95131
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
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
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.

e-mail
literature@atmel.com

Web Site
http://www.atmel.com

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 WEBSITE, 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. Unless specifically provided otherwise, 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.

© Atmel Corporation 2005. All rights reserved. Atmel®, logo and combinations thereof, Everywhere You Are® and others, are registered trademarks or trademarks of Atmel Corporation or its subsidiaries. Other terms and product names may be trademarks of others.

Read User Manual Online (PDF format)

Read User Manual Online (PDF format)  >>

Download This Manual (PDF format)

Download this manual  >>

Related Manuals