AVR/ATmega8L Datasheet

ATmega8L Datasheet

ElectricShock 2016. 7. 5. 15:47

http://www.atmel.com/images/atmel-2486-8-bit-avr-microcontroller-atmega8_l_datasheet.pdf


.

.

.

96쪽  (PWM관련)

ATmega128은 TCCR1A, TCCR1B, TCCR1C 의 3개의 채널을 갖고있는 반면

ATmega8은 TCCR1A, TCCR1B 의 2개의 채널을 갖고있다.

ATmega128에서의 TCCR1A Register Bit configuration

TCCR1A = (1<<COM1A1)|(0<<COM1A0)|(0<<COM1B1)|(0<<COM1B0)|(0<<COM1C1)|(0<<COM1C0)|(1<<WGM11)|(0<<WGM10);

COM1C1, COM1C0 비트가 있다.

반면...

ATmega8에서의 TCCR1A Register는 COM1C1, COM1C0 비트 없이 구성되어있다.


The FOC1A/FOC1B bits are only active 

when the WGM13:0 bits specifies a non-PWM mode. 

However, for ensuring compatibility with future devices, 

these bits must be set to zero when TCCR1A is written when operating in a PWM mode. 

When writing a logical one to the FOC1A/FOC1B bit, 

an immediate Compare Match is forced on the waveform generation unit. 

The OC1A/OC1B output is changed according to its COM1x1:0 bits setting. 

Note that the FOC1A/FOC1B bits are implemented as strobes. 

Therefore it is the value present in the COM1x1:0 bits that determine the effect of the forced compare.