EasyManua.ls Logo

Atmel AT90S2313 User Manual

Atmel AT90S2313
87 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #26 background imageLoading...
Page #26 background image
AT90S2313
26
External Interrupts
The external interrupts are triggered by the INT1 and INT0 pins. Observe that, if enabled, the interrupts will trigger even if
the INT0/INT1 pins are configured as outputs. This feature provides a way of generating a software interrupt. The external
interrupts can be triggered by a falling or rising edge or a low level. This is set up as indicated in the specification for the
MCU Control Register - MCUCR. When the external interrupt is enabled and is configured as level triggered, the interrupt
will trigger as long as the pin is held low.
The external interrupts are set up as described in the specification for the MCU Control Register - MCUCR.
Interrupt Response Time
The interrupt execution response for all the enabled AVR interrupts is 4 clock cycles minimum. 4 clock cycles after the
interrupt flag has been set, the program vector address for the actual interrupt handling routine is executed. During this
4 clock cycle period, the Program Counter (2 bytes) is pushed onto the Stack, and the Stack Pointer is decremented by 2.
The vector is normally a relative jump to the interrupt routine, and this jump takes 2 clock cycles. If an interrupt occurs
during execution of a multi-cycle instruction, this instruction is completed before the interrupt is served
.
A return from an interrupt handling routine takes 4 clock cycles. During these 4 clock cycles, the Program Counter (2 bytes)
is popped back from the Stack, the Stack Pointer is incremented by 2, and the I flag in SREG is set. When the
AVR
exits
from an interrupt, it will always return to the main program and execute one more instruction before any pending interrupt is
served.
MCU Control Register - MCUCR
The MCU Control Register contains control bits for general MCU functions.
Bits 7, 6 - Res: Reserved bits
These bits are reserved bits in the AT90S2313 and always read as zero.
Bit 5 - SE: Sleep Enable
The SE bit must be set (one) to make the MCU enter the sleep mode when the SLEEP instruction is executed. To avoid the
MCU entering the sleep mode unless it is the programmers purpose, it is recommended to set the Sleep Enable SE bit just
before the execution of the SLEEP instruction.
Bit 4 - SM: Sleep Mode
This bit selects between the two available sleep modes. When SM is cleared (zero), Idle Mode is selected as Sleep Mode.
When SM is set (one), Power Down mode is selected as sleep mode. For details, refer to the paragraph “Sleep Modes”
below.
Bits 3, 2 - ISC11, ISC10: Interrupt Sense Control 1 bit 1 and bit 0
The External Interrupt 1 is activated by the external pin INT1 if the SREG I-flag and the corresponding interrupt mask in the
GIMSK register is set. The level and edges on the external INT1 pin that activate the interrupt are defined in the following
Table 5:
Note: When changing the ISC11/ISC10 bits, INT1 must be disabled by clearing its Interrupt Enable bit in the GIMSK Register.
Otherwise an interrupt can occur when the bits are changed.
Bit 76543210
$35 ($55) - - SE SM ISC11 ISC10 ISC01 ISC00 MCUCR
Read/Write R R R/W R/W R/W R/W R/W R/W
Initial value 0 0 0 0 0 0 0 0
Table 5. Interrupt 1 Sense Control
ISC11 ISC10 Description
0 0 The low level of INT1 generates an interrupt request.
01Reserved
1 0 The falling edge of INT1 generates an interrupt request.
1 1 The rising edge of INT1 generates an interrupt request.
Question and Answer IconNeed help?

Do you have a question about the Atmel AT90S2313 and is the answer not in the manual?

Atmel AT90S2313 Specifications

General IconGeneral
ArchitectureAVR
Flash Memory2 KB
SRAM128 bytes
EEPROM128 bytes
I/O Pins15
ADCNo
Timers1 x 8-bit, 1 x 16-bit
Data Bus Width8-bit
Instruction Set ArchitectureRISC
ManufacturerAtmel
CoreAVR
PackageSOIC

Summary

Features of AT90S2313 Microcontroller

AVR RISC Architecture

High-performance, low-power RISC architecture with single clock cycle execution.

Memory Features

2K Flash, 128B SRAM, 128B EEPROM with endurance specifications.

Peripheral Features

Includes timers, PWM, comparator, Watchdog, SPI, and UART modules.

Pin Configuration

Pin Descriptions

Architectural Overview

General Purpose Register File

In-System Programmable Flash Program Memory

EEPROM Data Memory

SRAM Data Memory Organization

Program and Data Addressing Modes

Memory Access and Instruction Execution Timing

I/O Memory Map

Status Register - SREG

Reset and Interrupt Handling

Reset Sources

Power-On Reset

External Reset

Watchdog Reset

Interrupt Handling

External Interrupts

MCU Control Register - MCUCR

Sleep Modes

Power Down Mode

Oscillator stopped; wake-up via external reset or interrupt.

Timer/Counters Overview

8-bit Timer/Counter0

Timer/Counter0 Control Register - TCCR0

16-bit Timer/Counter1

Timer/Counter1 Control Register A - TCCR1A

Timer/Counter1 Control Register B - TCCR1B

Timer/Counter1 - TCNT1H and TCNT1L

Timer/Counter1 Output Compare Register A

Timer/Counter1 Input Capture Register

Timer/Counter1 in PWM Mode

Watchdog Timer Functionality

Watchdog Timer Control Register - WDTCR

EEPROM Read/Write Access

EEPROM Control Register - EECR

Prevent EEPROM Corruption

UART Overview

UART Data Reception

UART Control

UART Control Register - UCR

Baud Rate Generator Functionality

Analog Comparator Overview

Analog Comparator Control and Status Register - ACSR

Analog Comparator Control Bits

Port B Description

Alternate Functions of Port B

Port D Description

Alternate Functions of Port D

Memory Programming Overview

Fuse Bits Configuration

Programming the Flash and EEPROM

Parallel Programming Interface

Enter Programming Mode

Chip Erase Procedure

Programming the Flash Memory

Reading the Flash Memory

Programming the EEPROM Memory

Reading the EEPROM Memory

Programming the Fuse Bits

Programming the Lock Bits

Parallel Programming Characteristics

Serial Downloading Procedure

Serial Programming Algorithm

Serial Programming Characteristics

Electrical Characteristics

Absolute Maximum Ratings

Operating limits to prevent device damage.

DC Characteristics

Register Summary

Instruction Set Summary

Instruction Set Summary (Continued)

Related product manuals