at90pwm81-16se ATMEL Corporation, at90pwm81-16se Datasheet - Page 37
at90pwm81-16se
Manufacturer Part Number
at90pwm81-16se
Description
8-bit Avr Microcontroller With 8k Bytes In- System Programmable Flash
Manufacturer
ATMEL Corporation
Datasheet
1.AT90PWM81-16SE.pdf
(323 pages)
- Current page: 37 of 323
- Download datasheet (6Mb)
7734M–AVR–03/10
can stop the previous clock source. It will be better to run this sequence once the interrupts disabled. The
user (code) has the responsibility of the clock switching sequence.
Here is a “light” C-code that describes such a sequence of commands.
Warning:
In the AT90PWM81, only one among the external clock sources can be enabled at a given time and it is
not possible to switch from external clock to external oscillator as both sources share one pin.
Also, it is not possible to switch the synchronization source of the PLL when the sytem clock is PLL/4.
See
As they are two CSEL adresses to access the Calibrated internal RC oscillator 8.0/1.0 MHz, the change
between the two frequencies is not allowed by the clock switching features. The CKRC81 bit in MCUCR
register must be used for this purpose.
C Code Example
Table 6-1 on page 28
void ClockSwiching (unsigned char clk-number, unsigned char sut) {
#define CLOCK-RECOVER
#define CLOCK-ENABLE
#define CLOCK-SWITCH
#define CLOCK-DISABLE
unsigned char previous-clk, temp;
}
// Disable interrupts
// “Recover System Clock Source” command
// “Enable Clock Source” command
// Wait for clock availability
// “Clock Source Switching” command
// Wait for effective switching
// “Disable Clock Source” command
// Re-enable interrupts
asm ("cli"); temp = SREG;
CLKCSR = 1 << CLKCCE;
CLKCSR = CLOCK-RECOVER;
previous-clk = CLKSELR & 0x0F;
CLKSELR = ((sut << 4 ) & 0x30) | (clk-number & 0x0F);
CLKCSR = 1 << CLKCCE;
CLKCSR = CLOCK-ENABLE;
while ((CLKCSR & (1 << CLKRDY)) == 0);
CLKCSR = 1 << CLKCCE;
CLKCSR = CLOCK-SWITCH;
while (1){
}
CLKSELR = previous-clk;
CLKCSR = 1 << CLKCCE;
CLKCSR = CLOCK-DISABLE;
SREG = temp; asm ("sei");
CLKCSR = 1 << CLKCCE;
CLKCSR = CLOCK-RECOVER;
if ((CLKSELR & 0x0F) == (clk-number & 0x0F)) break;
to identify these cases.
0x05
0x02
0x04
0x01
AT90PWM81
37
Related parts for at90pwm81-16se
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
Manufacturer:
Atmel Corporation
Datasheet:
Part Number:
Description:
INTERVAL AND WIPE/WASH WIPER CONTROL IC WITH DELAY
Manufacturer:
ATMEL Corporation
Datasheet:
Part Number:
Description:
Low-Voltage Voice-Switched IC for Hands-Free Operation
Manufacturer:
ATMEL Corporation
Datasheet:
Part Number:
Description:
MONOLITHIC INTEGRATED FEATUREPHONE CIRCUIT
Manufacturer:
ATMEL Corporation
Datasheet:
Part Number:
Description:
AM-FM Receiver IC U4255BM-M
Manufacturer:
ATMEL Corporation
Datasheet:
Part Number:
Description:
Monolithic Integrated Feature Phone Circuit
Manufacturer:
ATMEL Corporation
Datasheet:
Part Number:
Description:
Multistandard Video-IF and Quasi Parallel Sound Processing
Manufacturer:
ATMEL Corporation
Datasheet:
Part Number:
Description:
High-performance EE PLD
Manufacturer:
ATMEL Corporation
Datasheet:
Part Number:
Description:
8-bit Flash Microcontroller
Manufacturer:
ATMEL Corporation
Datasheet:
Part Number:
Description:
2-Wire Serial EEPROM
Manufacturer:
ATMEL Corporation
Datasheet: