
ML610Q431/ML610Q432 User’s Manual
Contents
Contents – 8
22.1 Overview................................................................................................................................................... 22-1
22.1.1
Features............................................................................................................................................. 22-1
22.1.2
Configuration .................................................................................................................................... 22-1
22.1.3
List of Pins ........................................................................................................................................ 22-2
22.2 Description of Registers............................................................................................................................ 22-3
22.2.1
List of Registers ................................................................................................................................ 22-3
22.2.2
Port 4 Data Register (P4D) ............................................................................................................... 22-4
22.2.3
Port 4 Direction Register (P4DIR).................................................................................................... 22-5
22.2.4
Port 4 Control Registers 0, 1 (P4CON0, P4CON1) ..........................................................................22-6
22.2.5
Port 4 Mode Registers 0, 1 (P4MOD0, P4MOD1) ........................................................................... 22-8
22.3 Description of Operation......................................................................................................................... 22-10
22.3.1
Input/Output Port Functions ........................................................................................................... 22-10
22.3.2
Secondary and Tertiary Functions .................................................................................................. 22-10
Chapter 23
23. Port A............................................................................................................................................................ 23-1
23.1 Overview................................................................................................................................................... 23-1
23.1.1
Features............................................................................................................................................. 23-1
23.1.2
Configuration .................................................................................................................................... 23-1
23.1.3
List of Pins ........................................................................................................................................ 23-1
23.2 Description of Registers............................................................................................................................ 23-2
23.2.1
List of Registers ................................................................................................................................ 23-2
23.2.2
Port A Data Register (PAD) ............................................................................................................. 23-3
23.2.3
Port A Direction Register (PADIR) .................................................................................................. 23-4
23.2.4
Port A Control Registers 0, 1 (PACON0, PACON1) ....................................................................... 23-5
23.3 Description of Operation........................................................................................................................... 23-7
23.3.1
Input/Output Port Functions ............................................................................................................. 23-7
Chapter 24
24. Melody Driver .............................................................................................................................................. 24-1
24.1 Overview................................................................................................................................................... 24-1
24.1.1
Features............................................................................................................................................. 24-1
24.1.2
Configuration .................................................................................................................................... 24-1
24.1.3
List of Pins ........................................................................................................................................ 24-1
24.2 Description of Registers............................................................................................................................ 24-2
24.2.1
List of Registers ................................................................................................................................ 24-2
24.2.2
Melody 0 Control Register (MD0CON) ........................................................................................... 24-3
24.2.3
Melody 0 Tempo Code Register (MD0TMP) ...................................................................................24-4
24.2.4
Melody 0 Scale Code Register (MD0TON)...................................................................................... 24-5
24.2.5
Melody 0 Tone Length Code Register (MD0LEN) .......................................................................... 24-6
24.3 Description of Operation........................................................................................................................... 24-7
24.3.1
Operation of Melody Output............................................................................................................. 24-7
24.3.2
Tempo Codes .................................................................................................................................... 24-8
24.3.3
Tone Length Codes ........................................................................................................................... 24-9
24.3.4
Scale Codes..................................................................................................................................... 24-10
24.3.5
Example of Using Melody Circuit .................................................................................................. 24-11
24.3.6
Operations of Buzzer Output .......................................................................................................... 24-12
24.4 Specifying port registers ......................................................................................................................... 24-13
24.4.1
Functioning P22 (MD0) as the Melody or Buzzer output............................................................... 24-13
Chapter 25
25. RC Oscillation Type A/D Converter............................................................................................................. 25-1
25.1 Overview................................................................................................................................................... 25-1
25.1.1
Features............................................................................................................................................. 25-1
25.1.2
Configuration .................................................................................................................................... 25-1
25.1.3
List of Pins ........................................................................................................................................ 25-2