
ML610Q421/ML610Q422 User’s Manual
Contents
Contents – 8
22.2.1
List of Registers ................................................................................................................................... 22-2
22.2.2
Port A Data Register (PAD) ................................................................................................................ 22-3
22.2.3
Port A Direction Register (PADIR) .................................................................................................... 22-4
22.2.4
Port A Control Registers 0, 1 (PACON0, PACON1) ......................................................................... 22-5
22.3 Description of Operation.............................................................................................................................. 22-7
22.3.1
Input/Output Port Functions ................................................................................................................ 22-7
Chapter 23
23. Melody Driver .................................................................................................................................................. 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
Melody 0 Control Register (MD0CON) ............................................................................................. 23-3
23.2.3
Melody 0 Tempo Code Register (MD0TMP) ..................................................................................... 23-4
23.2.4
Melody 0 Scale Code Register (MD0TON)........................................................................................ 23-5
23.2.5
Melody 0 Tone Length Code Register (MD0LEN) ............................................................................ 23-6
23.3 Description of Operation.............................................................................................................................. 23-7
23.3.1
Operation of Melody Output ............................................................................................................... 23-7
23.3.2
Tempo Codes ....................................................................................................................................... 23-8
23.3.3
Tone Length Codes .............................................................................................................................. 23-9
23.3.4
Scale Codes ........................................................................................................................................ 23-10
23.3.5
Example of Using Melody Circuit .................................................................................................... 23-11
23.3.6
Operations of Buzzer Output ............................................................................................................. 23-12
23.4 Specifying port registers ............................................................................................................................ 23-13
23.4.1
Functioning P22 (MD0) as the Melody or Buzzer output ................................................................ 23-13
Chapter 24
24. RC Oscillation Type A/D Converter ............................................................................................................... 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-2
24.2 Description of Registers............................................................................................................................... 24-3
24.2.1
List of Registers ................................................................................................................................... 24-3
24.2.2
RC-ADC Counter A Registers (RADCA0–2) .................................................................................... 24-4
24.2.3
RC-ADC Counter B Registers (RADCB0–2)..................................................................................... 24-5
24.2.4
RC-ADC Mode Register (RADMOD)................................................................................................ 24-6
24.2.5
RC-ADC Control Register (RADCON).............................................................................................. 24-7
24.3 Description of Operation.............................................................................................................................. 24-8
24.3.1
RC Oscillator Circuits.......................................................................................................................... 24-8
24.3.2
Counter A/Counter B Reference Modes ........................................................................................... 24-10
24.3.3
Example of Use of RC Oscillation Type A/D Converter ................................................................. 24-14
24.3.4
Monitoring RC Oscillation ................................................................................................................ 24-19
24.4 Specifying port registers ............................................................................................................................ 24-21
24.4.1
Functioning P35(RCM), P34(RCT0), P33(RT0), P32(RS0), P31(CS0) and P30(IN0) as the
RC-ADC(Ch0) ................................................................................................................................... 24-21
24.4.2
Functioning P47(RT1), P46(RS1), P45(CS1) and P44(IN1) as the RC-ADC(Ch1) ....................... 24-22
Chapter 25
25. Successive Approximation Type A/D Converter............................................................................................ 25-1
25.1 Overview ...................................................................................................................................................... 25-1
25.1.1
Features ................................................................................................................................................ 25-1
25.1.2
Configuration ....................................................................................................................................... 25-1