![Samsung S3C8248 User Manual Download Page 213](http://html1.mh-extra.com/html/samsung/s3c8248/s3c8248_user-manual_3975904213.webp)
I/O PORTS
S3C8248/C8245/P8245/C8247/C8249/P8249
9-8
PORT 2
Port 2 is an 8-bit I/O port that can be used for general-purpose I/O as A/D converter inputs, ADC0–ADC7. The
pins are accessed directly by writing or reading the port 2 data register, P2 at location F8H in set 1, bank 0.
To individually configure the port 2 pins P2.0–P2.7, you make bit-pair settings in two control registers located in
set 1, bank 0: P2CONL (low byte, E7H) and P2CONH (high byte, E6H). In input mode, ADC or external reference
voltage input are also available.
Port 2 Control Registers
Two 8-bit control registers are used to configure port 2 pins: P2CONL (E7H, set 1, Bank 0) for pins P2.0–P2.3
and P2CONH (E6H, set 1, Bank 0) for pins P2.4–P2.7. Each byte contains four bit-pairs and each bit-pair
configures one port 2 pin. The P2CONH and the P2CONL registers also control the alternative functions.
Port 2 Control Register, High Byte (P2CONH)
E6H, Set 1, Bank 0, R/W
.7
.6
.5
.4
.3
.2
.1
.0
MSB
LSB
P2.7
(VLDREF/ADC7)
P2.6 (ADC6)
P2.5 (ADC5)
P2.4 (ADC4)
P2CONH bit-pair pin configuration
00
01
10
11
NOTE:
If a pin is enabled for ADC mode by ADCEN or ADC & VLD
ENABLE signal, normal I/O and pull-up resistance are disabled.
When pins are enabled for ADC mode, the pins can be selected for
ADC input by ADCON.6. 5. 4.
And the P2.7 can be used for VLD external input.
Input mode
Input mode, pull-up
Alternative function (ADC & VLD External input ENABLE,
ADCEN signal Gen.)
Output mode, push-pull
Figure 9-8. Port 2 High-Byte Control Register (P2CONH)
Summary of Contents for S3C8248
Page 31: ...ADDRESS SPACES S3C8248 C8245 P8245 C8247 C8249 P8249 2 20 NOTES ...
Page 107: ...INTERRUPT STRUCTURE S3C8248 C8245 P8245 C8247 C8249 P8249 5 18 NOTES ...
Page 195: ...INSTRUCTION SET S3C8248 C8245 P8245 C8247 C8249 P8249 6 88 NOTES ...
Page 221: ...I O PORTS S3C8248 C8245 P8245 C8247 C8249 P8249 9 16 NOTES ...
Page 245: ...16 BIT TIMER 0 1 S3C8248 C8245 P8245 C8247 C8249 P8249 12 10 NOTES ...
Page 249: ...WATCH TIMER S3C8248 C8245 P8245 C8247 C8249 P8249 13 4 NOTES ...
Page 267: ...A D CONVERTER S3C8248 C8245 P8245 C8247 C8249 P8249 15 6 NOTES ...
Page 299: ...S3P8245 P8249 OTP S3C8248 C8245 P8245 C8247 C8249 P8249 21 8 NOTES ...
Page 307: ......
Page 309: ......
Page 311: ......
Page 313: ......