Download Print this page
Panasonic MICROCOMPUTER MN103S Application Note
Panasonic MICROCOMPUTER MN103S Application Note

Panasonic MICROCOMPUTER MN103S Application Note

Panasonic laptop - computer user manual
Hide thumbs Also See for MICROCOMPUTER MN103S:

Advertisement

Quick Links

MICROCOMPUTER
MN103S
MN103S927/92A/F92G
LSI Application Notes Excerption
Pub.No.3329211-010E

Advertisement

loading

Summary of Contents for Panasonic MICROCOMPUTER MN103S

  • Page 1 MICROCOMPUTER MN103S MN103S927/92A/F92G LSI Application Notes Excerption Pub.No.3329211-010E...
  • Page 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.
  • Page 4: About This Manual

    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. •...
  • Page 5 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 with the programs described in this document are available. Contact your Panasonic sales representative or access the following URL. http://panasonic.co.jp/semicon/e-micom/inquiry Evaluation boards are sold through Panasonic sales offices.
  • Page 6 About This Manual3...
  • Page 7 Table of Contents Chapter 1 Overview Chapter 2 Introduction Chapter 3 Microcomputer Basics 1 Chapter 4 Microcomputer Basics 2 Chapter 5 Appendix...
  • Page 8 Table of Contents Chapter 1 Overview Overview ...2 What is an MN103S92 Series microcomputer ...3 MN103S92 Series internal configuration ...4 MN103S92 Series features ...5 Example application ...8 Development language and OS ...9 Development tools ...9 Chapter 2 Introduction Overview ...2 2.1.1 Overall configuration of sample program ...3 2.1.2...
  • Page 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 Main routine ...54 2.7.1 A/D conversion processing ...55 2.7.2 Serial reception data processing ...57 2.7.3 Key input processing ...60 2.7.4 PWM output setting ...62 2.7.5 Switching PWM output phase ...68 Watchdog timer settings ...71...
  • Page 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 ...52 3.6.5 Interrupt generation every 60 seconds using the cascade connection of timer 0, timer 1, timer 2 and timer 3 ...59...
  • Page 11 Writing in/reading from EEPROM using synchronous serial interface ...3 120 degrees power on PWM output ...22 Sin wave PWM output using motor control PWM ...37 Chapter 5 Appendix Appendix-1 ...2 Appendix-2 ...3 Appendix-3 ...4 Table of Contents 4...
  • Page 12 Table of Contents 5...
  • Page 13 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.
  • Page 14: Register Description

    Chapter 3 Microcomputer Basics 1 ■ Register description Group 4 Interrupt Control Register (G4ICR: 0x00008910) Flag name  G4LV2 14-12 G4LV1 G4LV0  11-10 G4IE1 G4IE0  G4IR1 G4IR0  G4ID1 G4ID0 Timer 1 Base Register (TM1BR: 0x0000A149) Flag name TM1BR7 TM1BR6 TM1BR5...
  • Page 15 Timer 1 Binary Counter (TM1BC: 0x0000A151) Flag name Description TM1BC7 TM1BC6 TM1BC5 TM1BC4 Timer 1 binary counter TM1BC3 TM1BC2 TM1BC1 TM1BC0 Timer 1 Mode Register (TM1MD: 0x0000A141) Flag name Description Timer operation enable TM1CNE 0: Operation disabled 1: Operation enabled Timer initialization 0: Normal operation TM1LDE...
  • Page 16 Chapter 3 Microcomputer Basics 1 Port 3 Output Mode Register (P3MD: 0x0000A033) Flag name  P33M P32M P31M P30M III−40 8-bit timer operation Description  Switching outputs 0: I/O port 1: TM3IO Switching outputs 0: I/O port 1: TM2IO Switching outputs 0: I/O port 1: TM1IO Switching outputs...
  • Page 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 ()
  • Page 18: Example Program

    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 /* Port 1 : Unused /* Port 2 : Unused /* Port 3 : Used as Timer 1 input /* Port 4 : Used as output port...
  • Page 19 asm (" nop\n"); asm (" nop\n"); TM1MD = TM1MD | 0x80; while(1){ /*---------------------------------------------- Operation initial setting ----------------------------------------------*/ void initialize(void) asm (" 0xF0FF,PSW\n"); asm (" nop\n"); asm (" nop\n"); CPUM = 0x0000; /*----------------------------------------------- Timer 1 underflow -----------------------------------------------*/ void int_timer1(void) if(P4OUT & 0x10){ P4OUT = 0x00;...
  • Page 20 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 upload LSI User’s Manuals and Tool Manuals in PDF format at URL above. • For inquiries on microcomputer technical information http://panasonic.co.jp/semicon/e-micom/inquiry...
  • Page 21: Sales Offices

    Semiconductor Group (Shum Yip Centre Office) 25F, Shum Yip Centre, #5045, East Shennan Road, Shenzhen 518010, China Tel:86-755-8211-0888  Panasonic Shun Hing Industrial Sales (Hong Kong) Co., Ltd. [PIE] Semiconductor Group 11th Floor, Great Eagle Centre, 23 Harbour Road, Wanchai, Hong Kong Tel:852-2529-7322 ...