How to Calculate the Capacitor of the Reset Input of a C51 Microcontroller 80C51. Application Note. Microcontrollers. Introduction



Similar documents
8-bit Microcontroller. Application Note. AVR222: 8-point Moving Average Filter

8-bit RISC Microcontroller. Application Note. AVR182: Zero Cross Detector

8-bit Microcontroller. Application Note. AVR400: Low Cost A/D Converter

AVR305: Half Duplex Compact Software UART. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

8-bit Microcontroller. Application Note. AVR415: RC5 IR Remote Control Transmitter. Features. Introduction. Figure 1.

AT91 ARM Thumb Microcontrollers. Application Note. Interfacing a PC Card to an AT91RM9200-DK. Introduction. Hardware Interface

Application Note. C51 Bootloaders. C51 General Information about Bootloader and In System Programming. Overview. Abreviations

Tag Tuning/RFID. Application Note. Tag Tuning. Introduction. Antenna Equivalent Circuit

8-bit RISC Microcontroller. Application Note. AVR236: CRC Check of Program Memory

Quick Start Guide. CAN Microcontrollers. ATADAPCAN01 - STK501 CAN Extension. Requirements

AVR106: C functions for reading and writing to Flash memory. 8-bit Microcontrollers. Application Note. Features. Introduction

General Porting Considerations. Memory EEPROM XRAM

8-bit Microcontroller. Application Note. AVR314: DTMF Generator

AT89C5131A Starter Kit... Software User Guide

8-bit Microcontroller. Application Note. AVR105: Power Efficient High Endurance Parameter Storage in Flash Memory

AVR319: Using the USI module for SPI communication. 8-bit Microcontrollers. Application Note. Features. Introduction

AVR030: Getting Started with IAR Embedded Workbench for Atmel AVR. 8-bit Microcontrollers. Application Note. Features.

AVR245: Code Lock with 4x4 Keypad and I2C LCD. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

AVR134: Real Time Clock (RTC) using the Asynchronous Timer. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

AVR317: Using the Master SPI Mode of the USART module. 8-bit Microcontrollers. Application Note. Features. Introduction

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

AT91 ARM Thumb Microcontrollers. AT91SAM CAN Bootloader. AT91SAM CAN Bootloader User Notes. 1. Description. 2. Key Features

8-bit Microcontroller. Application. Note. AVR204: BCD Arithmetics. Features. Introduction. 16-bit Binary to 5-digit BCD Conversion bin2bcd16

3-output Laser Driver for HD-DVD/ Blu-ray/DVD/ CD-ROM ATR0885. Preliminary. Summary

AVR034: Mixing C and Assembly Code with IAR Embedded Workbench for AVR. 8-bit Microcontroller. Application Note. Features.

AVR32110: Using the AVR32 Timer/Counter. 32-bit Microcontrollers. Application Note. Features. 1 Introduction

AVR241: Direct driving of LCD display using general IO. 8-bit Microcontrollers. Application Note. Features. Introduction AVR

AVR120: Characterization and Calibration of the ADC on an AVR. 8-bit Microcontrollers. Application Note. Features. Introduction

AVR442: PC Fan Control using ATtiny13. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

How To Prevent Power Supply Corruption On An 8Bit Microcontroller From Overheating

USB 2.0 Full-Speed Host/Function Processor AT43USB370. Summary. Features. Overview

8-bit RISC Microcontroller. Application Note. AVR155: Accessing an I 2 C LCD Display using the AVR 2-wire Serial Interface

AVR32100: Using the AVR32 USART. 32-bit Microcontrollers. Application Note. Features. 1 Introduction

8-bit Microcontroller. Application Note. AVR461: Quick Start Guide for the Embedded Internet Toolkit. Introduction. System Requirements

Application Note. Migrating from RS-232 to USB Bridge Specification USB Microcontrollers. Doc Control. References. Abbreviations

ATF15xx Product Family Conversion. Application Note. ATF15xx Product Family Conversion. Introduction

Application Note. USB Mass Storage Device Implementation. USB Microcontrollers. References. Abbreviations. Supported Controllers

Application Note. 8-bit Microcontrollers. AVR091: Replacing AT90S2313 by ATtiny2313. Features. Introduction

Two-wire Automotive Serial EEPROM AT24C01A AT24C02 AT24C04 AT24C08 (1) AT24C16 (2)

2-wire Serial EEPROM AT24C1024. Advance Information

2-Wire Serial EEPROM AT24C32 AT24C64. 2-Wire, 32K Serial E 2 PROM. Features. Description. Pin Configurations. 32K (4096 x 8) 64K (8192 x 8)

AVR444: Sensorless control of 3-phase brushless DC motors. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

Two-wire Serial EEPROM AT24C1024 (1)

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

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

USB Test Environment ATUSBTEST- SS7400. Summary

AVR1301: Using the XMEGA DAC. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

AVR32138: How to optimize the ADC usage on AT32UC3A0/1, AT32UC3A3 and AT32UC3B0/1 series. 32-bit Microcontrollers. Application Note.

8-bit. Application Note. Microcontrollers. AVR282: USB Firmware Upgrade for AT90USB

AVR353: Voltage Reference Calibration and Voltage ADC Usage. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

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

AVR1900: Getting started with ATxmega128A1 on STK bit Microcontrollers. Application Note. 1 Introduction

AVR32701: AVR32AP7 USB Performance. 32-bit Microcontrollers. Application Note. Features. 1 Introduction

Table of Contents. Section 1 Introduction Section 2 Getting Started Section 3 Hardware Description

Application Note Microcontrollers. Guidelines to Keep ADC Resolution within Specification. Introduction. ADC Resolution

AVR033: Getting Started with the CodeVisionAVR C Compiler. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

All-band AM/FM Receiver and Audio Amplifier IC U2510B

Application Note. 8-bit Microcontrollers. AVR280: USB Host CDC Demonstration. 1. Introduction

AVR1309: Using the XMEGA SPI. 8-bit Microcontrollers. Application Note. Features. 1 Introduction SCK MOSI MISO SS

8-bit RISC Microcontroller. Application Note. AVR335: Digital Sound Recorder with AVR and DataFlash

Using CryptoMemory in Full I 2 C Compliant Mode. Using CryptoMemory in Full I 2 C Compliant Mode AT88SC0104CA AT88SC0204CA AT88SC0404CA AT88SC0808CA

Step Motor Controller. Application Note. AVR360: Step Motor Controller. Theory of Operation. Features. Introduction

Application Note. 8-bit Microcontrollers. AVR307: Half Duplex UART Using the USI Module

AVR1318: Using the XMEGA built-in AES accelerator. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

AVR1600: Using the XMEGA Quadrature Decoder. 8-bit Microcontrollers. Application Note. Features. 1 Introduction. Sensors

STK 500, AVRISP, AVRISP

AVR055: Using a 32kHz XTAL for run-time calibration of the internal RC. 8-bit Microcontrollers. Application Note. Features.

AVR068: STK500 Communication Protocol. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

3-output Laser Driver for HD-DVD/ Blu-ray/DVD/ CD-ROM ATR0885. Preliminary. Summary. Features. Applications. 1. Description

AT86RF230 (2450 MHz band) Radio Transceiver... User Guide

Application Note. 8-bit Microcontrollers. AVR435: BLDC/BLAC Motor Control Using a Sinus Modulated PWM Algorithm. 1. Features. 2.

80C51 MCU s. Application Note. Analyzing the Behavior of an Oscillator and Ensuring Good Start-up. Oscillator Fundamentals

2-wire Serial EEPROM AT24C512

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

8-bit. Application Note. Microcontrollers. AVR273: USB Mass Storage Implementation. Features. 1. Introduction

AVR318: Dallas 1-Wire master. 8-bit Microcontrollers. Application Note. Features. Introduction

8-bit RISC Microcontroller. Application Note. AVR910: In-System Programming

Application Note. 8-bit Microcontrollers. AVR270: USB Mouse Demonstration

AVR441: Intelligent BLDC Fan Controller with Temperature Sensor and Serial Interface. 8-bit Microcontrollers. Application Note.

AVR2006: Design and characterization of the Radio Controller Board's 2.4GHz PCB Antenna. Application Note. Features.

AVR1510: Xplain training - XMEGA USART. 8-bit Microcontrollers. Application Note. Prerequisites. 1 Introduction

AVR040: EMC Design Considerations. 8-bit Microcontrollers. Application Note PRELIMINARY. Scope. 1 Introduction

AVR32788: AVR 32 How to use the SSC in I2S mode. 32-bit Microcontrollers. Application Note. Features. 1 Introduction

AT91 ARM Thumb Microcontrollers. Application Note. GNU-Based Software Development on AT91SAM Microcontrollers. 1. Introduction. 2.

Atmel AVR1017: XMEGA - USB Hardware Design Recommendations. 8-bit Atmel Microcontrollers. Application Note. Features.

256K (32K x 8) OTP EPROM AT27C256R 256K EPROM. Features. Description. Pin Configurations

AVR125: ADC of tinyavr in Single Ended Mode. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

AVR447: Sinusoidal driving of three-phase permanent magnet motor using ATmega48/88/ bit Microcontrollers. Application Note.

AVR2004: LC-Balun for AT86RF230. Application Note. Features. 1 Introduction

Application Note. 8-bit Microcontrollers. AVR272: USB CDC Demonstration UART to USB Bridge

APPLICATION NOTE. Atmel AVR134: Real Time Clock (RTC) Using the Asynchronous Timer. Atmel AVR 8-bit Microcontroller. Introduction.

AVR115: Data Logging with Atmel File System on ATmega32U4. Microcontrollers. Application Note. 1 Introduction. Atmel

8051 Flash Microcontroller. Application Note. A Digital Thermometer Using the Atmel AT89LP2052 Microcontroller

Atmel AVR4920: ASF - USB Device Stack - Compliance and Performance Figures. Atmel Microcontrollers. Application Note. Features.

8-bit Microcontroller. Application Note. AVR313: Interfacing the PC AT Keyboard

Application Note. AVR Microcontrollers. AVR493: Sensorless Commutation of Brushless DC Motor (BLDC) using AT90PWM3 and ATAVRMC

ATF1500AS Device Family. Application Note. In-System Programming of Atmel ATF1500AS Devices on the HP3070. Introduction.

User Guide. Introduction. HCS12PLLCALUG/D Rev. 0, 12/2002. HCS12 PLL Component Calculator

Transcription:

How to Calculate the Capacitor of the Reset Input of a C51 Microcontroller This application note explains how the reset of the 80C51 microcontroller works when the RST pin is a pure input pin and when the RST input is bi-directional. It gives rules to determine the extra components required to operate the reset function properly. The reset process can be active on low or high level depending on the product. In this application note only the high level case is discussed. 80C51 Microcontrollers Application Note Introduction The reset is used to start-up or to restart the 80C51 microcontroller activities. It forces the 80C51 in a known state by reinitializing all the internal registers needed to properly start the program execution. The reset must be kept active until all three of the following conditions are respected: The power supply must be in the specified range. The oscillator must reach a minimum oscillation level to ensure a good noise to signal ratio and a correct internal duty cycle generation. The reset pulse width duration must be at least two machine cycles. If one of the conditions is not respected the microcontroller will not startup properly. Theory of Reset Operation To ensure a good startup, the reset pulse width has to be wide enough to cover the period of time where the electrical conditions are not met. Two parameters should be considered for a proper reset sequence to determine the reset pulse width (see Figure 1): t osc : time needed by the oscillator to reach the Vih1 or Vil1 level. t vddrise : rise time of the power-supply taken between 10 to 90% of V DD. When these two parameter conditions are met, the reset has to be maintained at least two machine cycles in order to synchronize the internal activity of the core. In normal mode, a machine cycle is 12-clock periods and in X2 mode is 6-clock periods. Rev.

Figure 1. t osc and t vddrise are the Two Parameters to Evaluate, Depending on the Application treset t osc Vih1 V DD t vddrise XTAL1 Vih1 is the reference parameter taken to calculate and determine the time constant of the reset. Indeed, normally the input is considered to be low when its level reaches Vil1. But in reality the trigger is somewhere between Vih1 and Vil1. So, the worst case condition is considered at the Vih1 level. When the reset is released, the program execution starts and the ALE signal toggles as it is illustrated in Figure 2. and showing a proper startup condition: V DD is within the voltage operating range, The level of Xtal1 is greater than the Vih1 level specification, The reset reached its active level (Vih1) and is maintained at least two machine cycles. Figure 2. Reset Conditions to Properly Startup a Microcontroller ALE V V DD DD Vrst Reset is released XTAL2 2 C51 Reset Guidelines

C51 Reset Guidelines Why Does the Reset Does Not Properly Start the Microcontroller? The Oscillator is not Stabilized Figure 3 shows the case where the RST signal is applied while the oscillator is not stabilized and there is no clock to reset the internal registers of the CPU. Due to this bad reset, the first address fetched can be anywhere in the program space except address 0000h. Figure 3. If electrical Conditions are not Met, the Reset Signal is Applied but without the Clock ALE The reset is applied while the clock is not stabilized V DD XTAL2 Vrst Reset is Released before V DD is Stable Figure 4 shows the case where the reset is released before the V DD is stable. The microcontroller will never see the reset and can start anywhere in the program space and with a bad register initialization. Figure 4. The Reset is Released before the Clock and the V DD are Stable ALE V DD XTAL2 Vrst 3

Reset Input Circuitry Description At least two kinds of reset input structure exist in C51 products. The first one is a pure input which allows an external device to reset the microcontroller. The second one is bidirectional. The microcontroller can be reset by an external device. The microcontroller can reset an external device when, for example the internal watchdog expires. Table 1 lists some C51 Atmel products which have uni-directional or bi-directional reset. Table 1. Examples of Products Using Uni-directional and Bi-directional Reset Product Main Features Uni/Bidir T83C51RB2 16 KB of ROM, Watchdog B T89C51RD2 64 KB of Flash, Watchdog B AT89C51CC01 10-bit ADC, CAN controller B AT89C51SND1 MP3 decoder, TWI, MMC, USB U uni-directional Reset Input Description The uni-directional reset input circuitry is shown in Figure 5. A pull-down resistor, Rrst, is connected between the RST input and the ground. An external capacitor, Crst, is connected between the RST input and the V DD. The value of Crst determines the reset time duration. The calculation of Crst is explained in the next chapter. Figure 5. Reset Structure for an uni-directional Circuitry Theory of Operation When a reset is applied on the RST input, Crst is discharged and then charged through Rrst. The reset is active until the level applied on the RST pin is below Vih1. Crst determines the reset pulse width duration. 4 C51 Reset Guidelines

C51 Reset Guidelines Bi-directional Reset Input Description The bi-directional reset circuitry is shown in Figure 6. In addition to the uni-directional structure, the RST pin is able to drive an external reset for example when a watchdog expires. To do this, a pull-up resistor (Rrstwt) controlled by the rstcon signal drives a high level on the RST pin. An extra resistor (Rrstext) must be added between the RST input and Crst (Figure 6.). Figure 6. Reset Structure in a Bi-directional Mode VDD Crst 1 2 rstcon Rrstext RST Rrstwt Internal reset External reset vrst(t) Rrst Reset circuitry X1 Oscillator Q1 X2 1 2 CPU clock ALE Theory of Operation External Reset Internal Reset During a power-up or when an external reset is applied to the RST input, the Crst capacitor is charged through the two resistors Rrstext and Rrst. The reset is active until the level applied on the RST pin is below Vih1. The Rsrtext resistor is required when an internal reset is applied by the microcontroller and will be explained in the next session. In some cases, such as a watchdog reset, the microcontroller generates an internal reset by driving the rstcon signal and consequently by applying a high level on the RST pin. The pulse duration depends on the product and is typically equal to 96 clock periods (see the product datasheet). The Rrstext allows a reset pulse to occur on the RST pin. The reset time constant (several ms) is large in comparison to the reset pulse duration (96 clock periods). In that condition, Crst maintains its charge (V DD ) for all the duration of the reset pulse even if Rrstwt is active (see Figure 7). V DD is applied across the Rrst and Rrstwt resistors and expression of Vrst is given below: Rrstext Vrst = VDD ------------------------------------------- Rrstext + Rstwt For a given Rrstwt resistance, Rrstext determines the active level of the reset pin. To take into account on the external and internal reset constraints, Rrstext must be chosen in the 1 kω and 10 kω range. 5

Figure 7. Reset Circuitry When an Internal Reset is Applied VDD Rrstwt Vrst Internal reset Crst V DD Rrstext Rrst Vih1 0 0 Without Rrstext no external reset signal will be generated. Use Excel File to Determine Crst To determine Crst, the reset pulse width needs to be calculated using the following equation: treset = t vddrise + t osc t vddrise (typically 1 ms to 100 ms), is the rise time of the V DD (10% and 90% of the V DD ). It depends on the power supply and the decoupling capacitors used. t osc (typically 1 ms to 50 ms), time taken by the oscillator at startup. It depends on the crystal characteristics and the capacitors connected to the crystal. Because the power supply has a finite transition time (several hundreds of microseconds to several milliseconds), Crst is not so easy to compute by hand. Excel tool is used to calculate Crst versus t vddrise and t osc parameters. A spreadsheet can be downloaded from the Atmel Web site to compute Crst. Four parameters have to be entered and Crst is directly computed by the spreadsheet while 1kΩ is chosen for Rrst. Here is how to do it: V DD, the power supply voltage, is entered in the cell F3 t vddrise, the rise time of the power-supply, is entered in the cell F4 t osc, the oscillator startup time, is entered in cell F8 Rrstmin, the minimum pull-down resistor, is entered in the cell F13 After these steps, the cell E31 has to be clicked to compute the Crst and the minimum reset pulse width. 6 C51 Reset Guidelines

C51 Reset Guidelines Table 2. Excel Spreadsheet Use to Calculate Crst Power Supply Characteristics Power Supply Voltage V DD = 5 V Power Supply Rise Time (10% to 90%) tvddrs = 1 ms Oscillator Oscillator Startup Time time, measured at VIH1 tosct = 10 ms Electrical Characteristics of the Reset Input Minimum pull-down resistance Rrstmin = 100 kω Minimum Pulse Width Calculation of the reset pulse width trstmin = 22, 726 ms Evaluation of Reset Capacitor: C Minimum reset pulse width Trst = 65, 545 ms Value of reset capacitor C C = 0.649 µf Table 3 gives the Crst value computed from the Excel file for different values of t vddrise and t osc parameters. Table 3. Minimum Reset Capacitor Value for a 50kΩ Pull-down Resistor (Rrstmin) t vddrise t osc 1 ms 10 ms 100 ms 5 ms 820 nf 1.2 µf 12 µf 20 ms 2.7 µf 3.9 µf 12 µf Table 4. Minimum Reset Capacitor Value for a 100KΩ Pull-down Resistor t vddrise t osc 1 ms 10 ms 100 ms 5 ms 390 nf 0.56 µf 5.6 µf 20 ms 1.2 µf 2 µf 5.6 µf 7

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: 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. Atmel Corporation 2003. All rights reserved. Atmel and combinations thereof are the registered trademarks of Atmel Corporation or its subsidiaries. Other terms and product names may be the trademarks of others. Printed on recycled paper.