ページ1に含まれる内容の要旨
MICROCOMPUTER MN103S
MN103S927/92A/F92G
LSI Application Notes Excerption
Pub.No.3329211-010E
ページ2に含まれる内容の要旨
ページ3に含まれる内容の要旨
Request for your special attention and precautions in using the technical information and semiconductors described in this book (1) If any of the products or technical information described in this book is to be exported or provided to non-residents, the laws and regulations of the exporting country, especially, those with regard to security export control, must be observed. (2) The technical information described in this book is intended only to show the main characteristics and application ci
ページ4に含まれる内容の要旨
About This Manual ■ Configuration of This Manual This LSI application note consists of the following sections. • Overview: This section presents a brief description of this LSI's overview and features as information useful for selecting and using a microcomputer. • Introduction: This section describes a sample program that implements this LSI's basic functions. • Microcomputer Basics: This section provides a brief description of the settings and sample programs for peripheral LSI functions that
ページ5に含まれる内容の要旨
Format used for sample program explanations The sample programs included in the Introduction, Microcomputer Basics are explained in the following order of headings. Unnecessary headings may be omitted depending on their sample program. • Specification • Hardware allocation list • Register description • Flowchart • Example program The following oscillation frequencies this documentís sample programs use: fosc = 10 MHz, fx = 32.768 kHz. More information Program CDs and evaluation boards for use w
ページ6に含まれる内容の要旨
About This Manual3
ページ7に含まれる内容の要旨
.. Table of Contents Chapter 1 Overview 1 Chapter 2 Introduction 2 Chapter 3 Microcomputer Basics 1 3 Chapter 4 Microcomputer Basics 2 4 Chapter 5 Appendix 5
ページ8に含まれる内容の要旨
Table of Contents Chapter 1 Overview 1.1 Overview ................................................................................................................................2 1.2 What is an MN103S92 Series microcomputer .......................................................................3 1.3 MN103S92 Series internal configuration ...............................................................................4 1.4 MN103S92 Series features .................................................
ページ9に含まれる内容の要旨
2.6.3 Serial interface UART transmission interrupt ................................................................48 2.6.4 A/D conversion interrupt ................................................................................................50 2.6.5 Enable multiple interrupts ..............................................................................................52 2.7 Main routine .........................................................................................................
ページ10に含まれる内容の要旨
3.6.1 Counting rising edges using the event count ..................................................................37 3.6.2 Setting timer output pin ..................................................................................................44 3.6.3 50 kHz signal output using the timer output ..................................................................47 3.6.4 Interrupt generation every 100 milli seconds using the cascade connection of timer 0 and timer 1 ..........................
ページ11に含まれる内容の要旨
4.2 Writing in/reading from EEPROM using synchronous serial interface .................................3 4.3 120 degrees power on PWM output .....................................................................................22 4.4 Sin wave PWM output using motor control PWM ..............................................................37 Chapter 5 Appendix 5.1 Appendix-1 ............................................................................................................................
ページ12に含まれる内容の要旨
Table of Contents 5
ページ13に含まれる内容の要旨
Chapter 3 Microcomputer Basics 1 3.6 8-bit timer operation 3.6.1 Counting rising edges using the event count ■ Overview This program uses Timer 1 to count the rising edges of the external signal input from the TM1IO input pin with a binary counter. When the external input signal is detected 5 times, an interrupt is generated and LED connected to P44 flashes. The setting stored in the base register determines the number of rising edge detections that is counted until an interrupt is generated.
ページ14に含まれる内容の要旨
Chapter 3 Microcomputer Basics 1 ■ Register description Group 4 Interrupt Control Register (G4ICR: 0x00008910) bp Flag name Description 15 G4LV2 Group 4 interrupt priority level 14-12 G4LV1 Set a level from 6 to 0. G4LV0 11-10 Timer 1 underflow interrupt enable flag 9G4IE1 0: Disabled 1: Enabled Timer 0 underflow interrupt enable flag 8G4IE0 0: Disabled 1: Enabled 7-6 Timer 1 underflow interrupt request flag 5G4IR1 0: No interrupt request 1: Interrupt request Timer 0 underflow interrupt
ページ15に含まれる内容の要旨
Chapter 3 Microcomputer Basics 1 Timer 1 Binary Counter (TM1BC: 0x0000A151) bp Flag name Description 7 TM1BC7 6 TM1BC6 5 TM1BC5 4 TM1BC4 Timer 1 binary counter 3 TM1BC3 2 TM1BC2 1 TM1BC1 0 TM1BC0 Timer 1 Mode Register (TM1MD: 0x0000A141) bp Flag name Description Timer operation enable 7TM1CNE 0: Operation disabled 1: Operation enabled Timer initialization 0: Normal operation 6TM1LDE 1: Initialization TM1BR value is loaded into TM1BC. Timer pulse output 1 is reset to low level. 5-3 Count s
ページ16に含まれる内容の要旨
Chapter 3 Microcomputer Basics 1 Port 3 Output Mode Register (P3MD: 0x0000A033) bp Flag name Description 7-4 Switching outputs 3 P33M 0: I/O port 1: TM3IO Switching outputs 2 P32M 0: I/O port 1: TM2IO Switching outputs 1 P31M 0: I/O port 1: TM1IO Switching outputs 0 P30M 0: I/O port 1: TM0IO III−40 8-bit timer operation
ページ17に含まれる内容の要旨
Chapter 3 Microcomputer Basics 1 ■ Flowchart main () Initialize CPU Set P44 output Set Timer 1 input pin Set the base register Set count clock source Initialize Timer 1 Select Timer 1 normal operation Set an interrupt level Enable the interrupt Start event Binary counter underflow int_timer1 () P44 state Low (LED off) High (LED on) High output (LED on) Low output (LED off) END 8-bit timer operation III−41
ページ18に含まれる内容の要旨
Chapter 3 Microcomputer Basics 1 ■ Example program /************************************************************************/ /* CHECK Program for The count of the rising edge */ /* which used event count operation(8-bit) */ /************************************************************************/ /* Setting of Main Peripheral */ /* Port 0 : Unused */
ページ19に含まれる内容の要旨
Chapter 3 Microcomputer Basics 1 asm (" nop\n"); asm (" nop\n"); TM1MD = TM1MD | 0x80; /* Start the counter */ while(1){ } } /*---------------------------------------------- Operation initial setting ----------------------------------------------*/ void initialize(void) { asm (" and 0xF0FF,PSW\n"); /* Disable all maskable interrupts */ asm (" nop\n"); asm (" nop\n"); CPUM = 0x0000; /* Set normal mode */ }
ページ20に含まれる内容の要旨
Inquiries If you have questions regarding technical information on this manual, please visit the following URL. User Support Team Semiconductor Company Matsushita Electric Industrial Co., Ltd. URL: http://panasonic.co.jp/semicon/e-micom/inquiry For inquiries regarding Microcomputer, • Microcomputer Web site We offer you technical information regarding microcomputers at http://panasonic.co.jp/semicon/e-micom. • Microcomputer Manual Download Site http://panasonic.co.jp/semicon/e-micom/manual We u