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

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

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

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

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

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

UART. Embedded RISC Microcontroller Core Peripheral

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

2-wire Serial EEPROM Smart Card Modules AT24C32SC AT24C64SC

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

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

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

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

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

Section 1 ATAVRAUTOEK1 Getting Started

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

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

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

AT17(A) Series FPGA Configuration Memory. Application Note

AT89C5131 Starter Kit... Software User Guide

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

AVR32 UC3 Software Framework... User Manual

Bluetooth General Information White Paper

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

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

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

Interrupt Controlled UART

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

When is Data Susceptible to Corruption

1-megabit (64K x 16) 5-volt Only Flash Memory AT49F1024 AT49F1025

Migration From AT89C51SND1C to AT83C51SDN1C. Application Note. MP3 Microcontrollers

Atmel FPGA Integrated Development System (IDS)

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

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

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

Atmel FPGA Integrated Development System (IDS)

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

Preparations. Creating a New Project

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

DIP Top View A18 A16 A15 A12 A7 A6 A5 A4 A3 A2 A1 A0 I/O0 I/O1 I/O2 GND VCC A17 A14 A13 A8 A9 A11 A10 I/O7 I/O6 I/O5 I/O4 I/O3 VCC A18 A17

Product Description. Application Note. AVR360: XmodemCRC Receive Utility for the AVR. Features. Theory of Operation. Introduction

1-megabit (64K x 16) 3-volt Only Flash Memory AT49LV1024 AT49LV1025

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

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

OrCAD Support for Atmel PLDs. Application Note. OrCAD Support for Atmel PLDs. Overview

Parallel EEPROM Die Products. Die Products. Features. Description. Testing

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

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

CAN, 80C51, AVR, Microcontroller. Application Note

ATAVRAUTO User Guide

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)

SPI Serial EEPROMs AT25010 AT25020 AT SPI, 1K Serial E 2 PROM

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

a Serial Peripheral Interace (SPI). Embedded RISC Microcontroller Core Peripheral

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

P_D_OUT[31:0] SPI_INT SPI_MOSI_OUT SPI_MOSI_OEN

Atmel-Synario CPLD/PLD Design Software ATDS1100PC ATDS1120PC ATDS1130PC ATDS1140PC. Features. Description

ATAVRAUTO User Guide

AT17A Series FPGA Configuration EEPROM Memory. Application Note. FPGAs. AT17A Series Conversions from Altera FPGA Serial Configuration Memories

Interfacing the internal serial EEPROM

Secure Microcontrollers for Smart Cards. AT90SC Summary

AVR -based Bridge between Full-speed USB and Fast Serial Asynchronous Interfaces AT76C711

80C51 MCUs T89C51AC2. Errata Sheet

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

design cycle involving simulation, synthesis

3-Wire Serial EEPROM AT93C46C

AT89C51CC03 UART Bootloader

CryptoRF EEPROM Memory 8 Kbits

2-wire Serial EEPROM AT24C01A AT24C02 AT24C04 AT24C08 AT24C16

2-wire Serial EEPROMs AT24C128 AT24C256

Battery-Voltage. 16K (2K x 8) Parallel EEPROMs AT28BV16. Features. Description. Pin Configurations

32-megabit 2.7-volt Only Serial DataFlash AT45DB321. AT45DB321 Preliminary 16- Megabit 2.7-volt Only Serial DataFlash

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

FPGA Configuration EEPROM Memory AT17C65A AT17LV65A AT17C128A AT17LV128A AT17C256A AT17LV256A

2-wire Serial EEPROM AT24C512. Preliminary. 2-Wire Serial EEPROM 512K (65,536 x 8) Features. Description. Pin Configurations.

AT89C51SND1 UART Bootloader

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

1-megabit 2.7-volt Only Serial DataFlash AT45DB011. AT45DB011 Preliminary 16- Megabit 2.7-volt Only Serial DataFlash

AT40K FPGA IP Core AT40K-FFT. Features. Description

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

8-bit Microcontroller. Application Note. AVR134: Real-Time Clock (RTC) using the Asynchronous Timer. Features. Theory of Operation.

1-Megabit (128K x 8) Low Voltage Paged Parallel EEPROMs

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

T89C5115 UART Bootloader

EPROM. Application Note CMOS EPROM. Interfacing Atmel LV/BV EPROMs on a Mixed 3-Volt/5- Volt Data Bus

AT89STK-10 Starter Kit... Hardware User Guide

16-megabit 2.7-volt Only Serial DataFlash AT45DB161

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

T89C51AC2 UART Bootloader

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

ARM7TDMI - based Microcontroller AT91RM3400. Errata Sheet

32-bit Embedded Core Peripheral. Cache Memory. and Bus Interface Unit

2-wire Serial EEPROM AT24C512

2-wire Serial EEPROM AT24C01A AT24C02 AT24C04 AT24C08 AT24C16

3-wire Serial EEPROMs AT93C46 AT93C56 AT93C57 AT93C66

8-bit Microcontroller. Application Note. AVR410: RC5 IR Remote Control Receiver

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

VCC CS SO WP GND HOLD SCK SI VCC HOLD CS SO NC NC SCK SI WP GND

32-bit Embedded Core Peripheral. Advanced Interrupt Controller (AIC)

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

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

Transcription:

FPSLIC Baud Rate Generator Features: Generates any required baud rate High baud rates at low crystal clock frequencies Uses both internal and external clock sources Supports in both single speed and double speed modes Easy-to-use "Excel" table to calculate any baud rate Description: The baud rate generator provides both the receiver and the transmitter with the baud rate clock, a bit-period clock. Each generator consists of a 16-bit time constant register and a 16-bit down counter. In operation, the counter decrements with each baud rate generator clock, with the time constant automatically reloaded when the count reaches zero. The output of the baud rate generator toggles when the counter reaches a count of one-half of the time constant, and it toggles again when the counter reaches zero. A new time constant may be written at any time, but the new value will not take effect until the next load of the counter. The baud rate generator output frequency is shown on the following section. Figure 1. Block Diagram of Baud Rate Generator UBRR AT94K Series Field Programmable System Level Integrated Circuit Application Note XTAL 16-bit down counter : 16 BAUD x 16 Baud DATA Recovery Logic Rev. 2284A 04/01 1

The Baud Rate Generator in Single UART Speed Mode The baud rate generator is a frequency divider that generates baud rates according to the following equation: Figure 2. Baud Rate Equation at Double Speed Notes: 1. BAUD = Baud rate 2. f CK = Crystal Clock frequency 3. UBR = Contents of the UBRRH and UBRR registers, (0-4095) 4. This equation is not valid when the UART transmission speed is doubled. See Table 2 on page 4 for a detailed description. The most commonly used baud rates for standard crystal frequencies can be generated by using the UBR settings in Table 1. UBR values that yield an actual baud rate differing less than 2% from the target baud rate appear in bold. However, it is not recommended to use baud rates that have more than 1% error. High error ratings give less noise resistance. Table 1. UBR Settings at Various Crystal Frequencies 2 AT94K Series

AT94K Series UART0 and UART1 High byte Baud Rate Register UBRRHI Bit $20 ($40) Read/Write Initial Value 7 6 5 4 3 2 1 0 MSB1 LSB1 MSB0 LSB0 R/W R/W R/W R/W R/W R/W R/W R/W 0 0 0 0 0 0 0 0 The UART baud register is a 12-bit register. The 4 most significant bits are located in a separate register, UBRRHI. Note that both UART0 and UART1 share this register. Bit 7 to bit 4 of UBRRHI contain the 4 most significant bits of the UART1 baud register. Bit 3 to Bit 0 contain the 4 most significant bits of the UART0 baud register. UART0 Baud Rate Register Low byte - UBRR0 Bit $09 ($29) Read/Write Initial Value 7 6 5 4 3 2 1 0 MSB LSB R/W R/W R/W R/W R/W R/W R/W R/W 0 0 0 0 0 0 0 0 UART1 Baud Rate Register Low byte - UBRR1 Bit $00 ($20) Read/Write Initial Value 7 6 5 4 3 2 1 0 MSB LSB R/W R/W R/W R/W R/W R/W R/W R/W 0 0 0 0 0 0 0 0 The Baud Rate Generator in Double UART Speed Mode Note that the baud rate equation is different from the equation on Figure 2 on page 2 when the UART speed is doubled. Figure 3. Baud Rate Equation Notes: 1. BAUD = Baud rate 2. f CK = Crystal Clock frequency 3. UBR = Contents of the UBRRHI and UBRR registers, (0-4095) 4. This equation is only valid when the UART transmission speed is doubled. See Table 2 on page 4 for a detailed description. The most commonly used baud rates for standard crystal frequencies can be generated by using the UBR settings in Table 2 on page 4. UBR values that yield an actual baud rate differing less than 1.5% from the target baud rate are bold in the table. However since the number of samples are reduced and the system clock might have some variance (this applies especially when using resonators), it is recommended that the baud rate error is less than 0.5%. 3

4 AT94K Series Table 2. UBR Settings at Various Crystal Frequencies in Double Speed Mode

AT94K Series Calculating your own Baud Rate Following is a sample Excel table used to calculate the different baud rate. Each cell's equation is shown below: UBRRHI = DEC2BIN((E2/256),4) UBRRn = DEC2BIN(MOD(E2, 256), 8) UBR HEX = DEC2HEX(E2, 3) Actual Freq= (clock1 (1) 1000000)/((1+E2)*16) % Error = ABS(((G2-F2)/F2) (1) -100) Note: 1. Some of the functions don't come as default when you first install your Excel. Please go to Tools >> Add-Ins to install the required library. The baud rate excel sheet can be found under C:\SystemDesigner\examples\at94k\resources\baudrate.xls Brief C example on how to set UBRRHI and UBRRn int UBR = 25;/* Set UBR value */ UBRRHI = (((UBR) >> 8) & 0x000F ); /* Calculate UBRRHI from 3 down to 0 */ UBRR0 = ((UBR) & 0x00FF); /* Calculate UBRR0 */ UBRRHI = (((UBR) >> 4) & 0x00F0 );/* Calculate UBRRHI from 7 down to 4 */ UBRR1 = ((UBR) & 0x00FF);/* Calculate UBRR1 */ 5

Atmel Headquarters Corporate Headquarters 2325 Orchard Parkway San Jose, CA 95131 TEL (408) 441-0311 FAX (408) 487-2600 Europe Atmel SarL Route des Arsenaux 41 Casa Postale 80 CH-1705 Fribourg Switzerland TEL (41) 26-426-5555 FAX (41) 26-426-5500 Asia Atmel Asia, Ltd. Room 1219 Chinachem Golden Plaza 77 Mody Road Tsimhatsui East Kowloon Hong Kong TEL (852) 2721-9778 FAX (852) 2722-1369 Japan Atmel Japan K.K. 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 FPSLIC Hotline 1-(408) 436-4119 Atmel FPSLIC e-mail fpslic@atmel.com FAQ Available on web site Atmel Operations Atmel Colorado Springs 1150 E. Cheyenne Mtn. Blvd. Colorado Springs, CO 80906 TEL (719) 576-3300 FAX (719) 540-1759 Atmel Rousset Zone Industrielle 13106 Rousset Cedex France TEL (33) 4-4253-6000 FAX (33) 4-4253-6001 Atmel Smart Card ICs Scottish Enterprise Technology Park East Kilbride, Scotland G75 0QR TEL (44) 1355-357-000 FAX (44) 1355-242-743 Atmel Grenoble Avenue de Rochepleine BP 123 38521 Saint-Egreve Cedex France TEL (33) 4-7658-3000 FAX (33) 4-7658-3480 Fax-on-Demand North America: 1-(800) 292-8635 International: 1-(408) 441-0732 e-mail literature@atmel.com Web Site http://www.atmel.com BBS 1-(408) 436-4309 Atmel Corporation 2001. Atmel Corporation makes no warranty for the use of its products, other than those expressly contained in the Company s standard warranty which is detailed in Atmel s Terms and Conditions located on the Company s web site. The Company assumes no responsibility for any errors which may appear in this document, reserves the right to change devices or specifications detailed herein at any time without notice, and does not make any commitment to update the information contained herein. No licenses to patents or other intellectual property of Atmel are granted by the Company in connection with the sale of Atmel products, expressly or by implication. Atmel s products are not authorized for use as critical components in life support devices or systems. FPSLIC is the trademark of Atmel Corporation. Other terms and product names may be the trademark of others. Printed on recycled paper. 2284A 04/01/xM