gc80c510 CORERIVER Semiconductor, gc80c510 Datasheet - Page 41

no-image

gc80c510

Manufacturer Part Number
gc80c510
Description
Eprom/rom 8-bit Turbo Microcontrollers
Manufacturer
CORERIVER Semiconductor
Datasheet
6.2.1.3 PORT 2
MiDAS1.1 Family
ADCON, ADCSEL, and ADCSELH register.
ADC input channels are disabled. Note that the port 2[6:2] (= P2[6:2]) is configurable as an ADC input
pins. The ADC7 ~ ADC11 input channels of the port 2 are selected by ADCSEL and ADCLSELH
register.
[How to control the ADC input channel enable / disable for P2]
any effect of port 2 state. Namely, ADC input channel is valid by ADC selection registers (ADCSEL,
ADCSELH) even if port 2 is operating on the output mode (bit value of P2DIR = 0). If ADC input
channel is disabled, port configuration will be back to the state before entering the ADC input channel
enable mode. To select the ADC channel input, set the bit of the ADCSEL or ADCSELH register to “0”
(0 = ADC channel bit enable, 1 = disable (Default)). In more detail about ADC, refer to “6.2.7 ADC” part.
[How to control the P2 input / output mode]
mode of P2 is input mode. To configure the bit of the P2 to output mode, set to the bit of the P2DIR
register to “0” (0 = Output, 1 = Input (Default)).
[How to control the P2 pull-up ON/OFF]
of P2 is ON. To disable the pull-up resistor control, set to the bit of the P2SEL register to “1” (0 = Pull-
up ON (Default), 1=Pull-up OFF).
Port 2 has the following configuration modes in according to P2DIR, P2SEL, P2TYPE, ALTSEL,
After reset, port 2 is configured as input mode with push-pull output type and pull-up is turn-on. Also,
If an ADC input of port 2 is enabled, port 2 is automatically configured as ADC input channel without
The initial value of P2DIR (Port 2 Input/Output Control) register is *1111111. This means that the
The initial value of P2SEL (Port 2 Pull-up Control) register is *0000000h. This means that the pull-up
Input / Output mode controlled by P2DIR (Default = *1111111, Input mode)
Push-pull / Open-drain output type controlled by P2TYPE (Default = *0000000h, Push-pull
output type)
Pull-up ON / OFF controlled by P0SEL (Default = *1111111h, Pull-up ON)
ADC input enable & digital input disable, or ADC input disable & digital input enable by ADCSEL
and ADCSELH (Default = FFh is ADC input disable & digital input enable.)
Page 41 of 211

Related parts for gc80c510