Toshiba TLCS-90 Series Data Book page 286

8 bit microcontroller
Table of Contents

Advertisement

TOSHIBA
TMP90C840
TRUN5
TRUNl
Comparator Output
of Timer
0
, - - - - ' - - - . .
¢Tl
¢T16
¢T256
Up-Counter UCl
Clear
TCLK3,2
TMOD3,2
=
11
TlI,OD1,0
(n
=
6, 7
or 8)
TOl
Internal Data Bus
Fig. 3.6 (11)
Block Diagram of 8-bit PWM Mode
Example:
Generate the following PWM to the T01 pin at fc=10MHz.
I..
...1
50.4]15
Assuming the PWM cycle is 50.4
~s
when
~Tl
0.8 us and @fc
10MHz,
6
50.4~s/0.8~s
= 63 = 2 - 1
Consequently, n should be set at 6 (TMODl,O
=
01).
Given the "H" level period of
36~s,
setting
~Tl=0.8~s
results:
36us/0.8~s
=
45 = 2DH
As a result, TREGI should be set at 2DH.
TRUN
<-
TCLl<
<--
TMOD
<-
TFFCR
<-
TREG1
<-
0 0
SMMOD
<-
P67CR
<-
TRUN
<-
- 0 -
- 0 I
I 101
- - 0 0 1 1
I 0 1 101
x x 0
iJ
1
1 -
(Note)
x:
Don't care
Stop Timer 1.
Select
0T~
as the input clock.
Set the 2 - 1 cycle in the PWM mode.
Set the initial output to 0 (ilL" level).
Write "2DH ".
Select P60 as the TOI pin.
Start Timer 1.
No change
MPU90-88

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents