P87LPC768BD,512 NXP Semiconductors, P87LPC768BD,512 Datasheet - Page 14

no-image

P87LPC768BD,512

Manufacturer Part Number
P87LPC768BD,512
Description
IC 80C51 MCU 4K OTP 20-SOIC
Manufacturer
NXP Semiconductors
Series
LPC700r
Datasheet

Specifications of P87LPC768BD,512

Core Processor
8051
Core Size
8-Bit
Speed
20MHz
Connectivity
I²C, UART/USART
Peripherals
Brown-out Detect/Reset, LED, POR, PWM, WDT
Number Of I /o
18
Program Memory Size
4KB (4K x 8)
Program Memory Type
OTP
Ram Size
128 x 8
Voltage - Supply (vcc/vdd)
2.7 V ~ 6 V
Data Converters
A/D 4x8b
Oscillator Type
Internal
Operating Temperature
0°C ~ 70°C
Package / Case
20-SOIC (7.5mm Width)
Processor Series
P87LPC7x
Core
80C51
Data Bus Width
8 bit
Data Ram Size
128 B
Interface Type
I2C, UART
Maximum Clock Frequency
10 MHz, 20 MHz
Number Of Programmable I/os
18
Number Of Timers
2
Operating Supply Voltage
2.7 V to 6 V
Maximum Operating Temperature
+ 70 C
Mounting Style
SMD/SMT
3rd Party Development Tools
PK51, CA51, A51, ULINK2
Minimum Operating Temperature
0 C
On-chip Adc
8 bit, 4 Channel
For Use With
OM10063 - PROGRAMMER LPC700 P76XLCPOM10050 - EMULATOR LPC700 PDS76X
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Eeprom Size
-
Lead Free Status / Rohs Status
 Details
Other names
568-3218-5
935267360512
P87LPC768BD
Philips Semiconductors
Code Examples for the A/D
The first piece of sample code shows an example of port configuration for use with the A/D. This example sets up the pins so that all four A/D
channels may be used. Port configuration for analog functions is described in the section Analog Functions.
Following is an example of using the A/D with interrupts. The routine ADStart begins an A/D conversion using the A/D channel number supplied
in the accumulator. The channel number is not checked for validity. The A/D must previously have been enabled with sufficient time to allow for
stabilization.
The interrupt handler routine reads the conversion value and returns it in memory address ADResult. The interrupt should be enabled prior to
starting the conversion.
Following is an example of using the A/D with polling. An A/D conversion is started using the channel number supplied in the accumulator. The
channel number is not checked for validity. The A/D must previously have been enabled with sufficient time to allow for stabilization. The
conversion result is returned in the accumulator.
2002 Mar 12
Low power, low price, low pin count (20 pin) microcontroller
with 4 kB OTP 8-bit A/D, Pulse Width Modulator
; Set up port pins for A/D conversion, without affecting other pins.
; Start A/D conversion.
ADStart:
;
;
; A/D interrupt handler.
ADInt:
ADRead:
ADChk:
mov
anl
orl
orl
setb
orl
orl
ret
push
mov
mov
clr
anl
pop
reti
orl
setb
jnb
mov
clr
anl
ret
PT0AD,#78h
P0M2,#87h
P0M1,#78h
ADCON,A
ADCS
PCON,#01h
PCON,#02h
ACC
A,DAC0
ADResult,A
ADCI
ADCON,#0fch
ACC
ADCON,A
ADCS
ADCI,ADChk
A,DAC0
ADCI
ADCON,#0fch
; Disable digital inputs on A/D input pins.
; Disable digital outputs on A/D input pins.
; Disable digital outputs on A/D input pins.
; Add in the new channel number.
; Start an A/D conversion.
; The CPU could be put into Idle mode here.
; The CPU could be put into Power Down mode here if RCCLK = 1.
; Save accumulator.
; Get A/D result,
;
; Clear the A/D completion flag.
; Clear the A/D channel number.
; Restore accumulator.
; Add in the new channel number.
; Start A/D conversion.
; Wait for ADCI to be set.
; Get A/D result.
; Clear the A/D completion flag.
; Clear the A/D channel number.
and save it in memory.
12
P87LPC768
Preliminary data

Related parts for P87LPC768BD,512