參數(shù)資料
型號: MN103SA7D
廠商: PANASONIC CORP
元件分類: 微控制器/微處理器
英文描述: 32-BIT, MROM, MICROCONTROLLER, PQFP80
封裝: 14 X 14 MM, LEAD FREE, PLASTIC, LQFP-80
文件頁數(shù): 152/236頁
文件大?。?/td> 3095K
代理商: MN103SA7D
第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頁第42頁第43頁第44頁第45頁第46頁第47頁第48頁第49頁第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頁第113頁第114頁第115頁第116頁第117頁第118頁第119頁第120頁第121頁第122頁第123頁第124頁第125頁第126頁第127頁第128頁第129頁第130頁第131頁第132頁第133頁第134頁第135頁第136頁第137頁第138頁第139頁第140頁第141頁第142頁第143頁第144頁第145頁第146頁第147頁第148頁第149頁第150頁第151頁當前第152頁第153頁第154頁第155頁第156頁第157頁第158頁第159頁第160頁第161頁第162頁第163頁第164頁第165頁第166頁第167頁第168頁第169頁第170頁第171頁第172頁第173頁第174頁第175頁第176頁第177頁第178頁第179頁第180頁第181頁第182頁第183頁第184頁第185頁第186頁第187頁第188頁第189頁第190頁第191頁第192頁第193頁第194頁第195頁第196頁第197頁第198頁第199頁第200頁第201頁第202頁第203頁第204頁第205頁第206頁第207頁第208頁第209頁第210頁第211頁第212頁第213頁第214頁第215頁第216頁第217頁第218頁第219頁第220頁第221頁第222頁第223頁第224頁第225頁第226頁第227頁第228頁第229頁第230頁第231頁第232頁第233頁第234頁第235頁第236頁
Chapter 8
8-bit Timer
Cascade Connection
VIII - 45
8.7.2
Setup Example
■ Cascade Connection Setup Example
Setting example of timer function that an interrupt is constantly generated by cascade connection of timer 0 and
timer 1, as a 16-bit timer is shown. An interrupt is generated 30000 times every 1 ms by selecting clock source
IOCLK. Oscillation frequency is set to 10 MHz, 6 multiplication and IOCLK=MCLK/2.
An example setup procedure, with a description of each step is shown below.
Setup Procedure
Description
(1) Stop the counter
TM1MD(0x0000A181)
bp6: TM0LDE=0
bp7: TM0CNE=0
TM0MD(0x0000A180)
bp6: TM0LDE=0
bp7: TM0CNE=0
(1) Set the TM1LDE flag and the TM1CNE flag of the timer
1 mode register (TM1MD) to “0” to stop the counter. Set
the TM0LDE flag and TM0CNE flag of the timer 0 mode
register (TM0MD) to “0” to stop the timer 1 counting.
(2) Disable the interrupt
G3ICR(0x0000890C)
bp8: G3IE0=0
bp9: G3IE1=0
(2) Set the G3IEO flag of the G3ICR register to “0” to
disable the timer 0 underflow interrupt. Set the G3IE1
flag of the G3ICR register to “0” to disable the timer 1
underflow interrupt.
(3) Set the interrupt generation cycle
TM1BR(0x0000A189)=0x75
TM0BR(0x0000A188)=0x2F
(3) Set the interrupt generation cycle to the timer 0 base
register (TM0BR) and timer 1 base register (TM1BR). It
is set to 29999 (0x752F) due to 30000 dividing.
(4) Select the count clock source
TM1MD(0x0000A181)
bp2-0: TM1CK2-0=011
TM0MD(0x0000A180)
bp2-0: TM0CK2-0=000
(4) Select the count clock source (cascading with the timer
0) by the TM1CK2-0 flag of the TM1MD register. Select
the count clock source (IOCLK) by the TM0CK2-0 flag
of the TM0MD register.
(5) Initialize the timer 0 and 1
TM1MD(0x0000A181)
bp6: TM1LDE=1
TM0MD(0x0000A180)
bp6: TM0LDE=1
(5) Set the TM1LDE flag of the TM1MD register to “1” to
initialize the timer 1. Set the TM0LDE flag of the
TM0MD register to “1” to initialize the timer 0. The
value of the TM1BR register is loaded into the TM1BC
counter; and, the value of the TM0BR register is loaded
into the TM0BC counter. Reset the TM1LDE flag and
the TM0LDE flag to “0” after the setting.
(6) Set the interrupt level
G3ICR(0x0000890C)
bp14-12: G3LV2-0=100
(6) Set the interrupt level by the G3LV2-0 flag of the G3ICR
register. If any interrupt request flag may be already
set, clear all request flags.
(7) Enable the interrupt
G3ICR(0x0000890C)
bp9: G3IE1=1
(7) Set the G3IE1 flag of the G3ICR register to “1” to enable
the interrupt. Leave the G3IE0 as it is “0” with interrupts
disabled.
相關(guān)PDF資料
PDF描述
MN10SA7G 32-BIT, MROM, 60 MHz, MICROCONTROLLER, PQFP80
MN195007 16-BIT, 24.576 MHz, OTHER DSP, PQFP100
MN5523A SPECIALTY MICROPROCESSOR CIRCUIT, CBGA28
MPC107APX66L0 MULTIFUNCTION PERIPHERAL, PPGA503
MPC107APX100L0 MULTIFUNCTION PERIPHERAL, PPGA503
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
MN103SB9N 制造商:PANASONIC 制造商全稱:Panasonic Semiconductor 功能描述:MN103SB9N
MN103SF65GAL 制造商:PANASONIC 制造商全稱:Panasonic Semiconductor 功能描述:5V single power supply (regulator)
MN103SF65GBF 制造商:PANASONIC 制造商全稱:Panasonic Semiconductor 功能描述:5V single power supply (regulator)
MN103SF92GBL 制造商:PANASONIC 制造商全稱:Panasonic Semiconductor 功能描述:MICROCOMPUTER LSI
MN103SFB9R 制造商:PANASONIC 制造商全稱:Panasonic Semiconductor 功能描述:MN103SB9N