AT90S8515

Manufacturer Part NumberAT90S8515
Description8-bit microcontroller with 8K bytes in-system programmable flash, 2.7-6.0V
ManufacturerATMEL Corporation
AT90S8515 datasheet
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
Page 41
42
Page 42
43
Page 43
44
Page 44
45
Page 45
46
Page 46
47
Page 47
48
Page 48
49
Page 49
50
Page 50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
Page 41/112:

Effects on Unsynchronized OCR1 Latching

Download datasheet (3Mb)Embed
PrevNext
0841G–09/01
Figure 32. Effects on Unsynchronized OCR1 Latching
Compare Value changes
Synchronized
Compare Value changes
Unsynchronized
Note: X = A or B
During the time between the write and the latch operation, a read from OCR1A or
OCR1B will read the contents of the temporary location. This means that the most
recently written value always will read out of OCR1A/B.
When the OCR1 contains $0000 or TOP, the output OC1A/OC1B is updated to low or
high on the next compare match according to the settings of COM1A1/COM1A0 or
COM1B1/COM1B0. This is shown in Table 13.
Note:
If the compare register contains TOP value and the prescaler is not in use (CS12..CS10
= 001), the PWM output will not produce any pulse at all, because up-counting and
down-counting values are reached simultaneously. When the prescaler is in use
(CS12..CS10 ≠ 001 or 000), the PWM output goes active when the counter reaches the
TOP value; but the down-counting compare match is not interpreted to be reached
before the next time the counter reaches the TOP value, making a one-period PWM
pulse.
Table 13. PWM Outputs OCR1X = $0000 or TOP
COM1X1
COM1X0
1
0
1
0
1
1
1
1
Note:
X = A or B
In PWM mode, the Timer Overflow Flag1 (TOV1) is set when the counter advances from
$0000. Timer Overflow Interrupt1 operates exactly as in normal Timer/Counter mode,
i.e., it is executed when TOV1 is set, provided that Timer Overflow Interrupt1 and global
interrupts are enabled. This also applies to the Timer Output Compare1 flags and
interrupts.
AT90S8515
Counter Value
Compare Value
PWM Output OC1X
OCR1X Latch
Counter Value
Compare Value
PWM Output OC1X
OCR1X Latch
Glitch
OCR1X
Output OC1X
$0000
TOP
$0000
TOP
L
H
H
L
41