p87lpc778-01 NXP Semiconductors, p87lpc778-01 Datasheet - Page 16
p87lpc778-01
Manufacturer Part Number
p87lpc778-01
Description
P87lpc778 Cmos Single-chip 8-bit 80c51 Microcontroller With 128-byte Data Ram, 8 Kb Otp
Manufacturer
NXP Semiconductors
Datasheet
1.P87LPC778-01.pdf
(79 pages)
- Current page: 16 of 79
- Download datasheet (376Kb)
Philips Semiconductors
9397 750 12378
Product data
8.4.2 Code examples for the A/D
on the accuracy of A/D readings. Using the A/D without Power-down mode while the
clock is divided through the use of CLKR or DIVM has an adverse effect on A/D
accuracy.
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
on page
; Set up port pins for A/D conversion, without affecting other pins.
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.
; Start A/D conversion.
ADStart:
; orl
; orl
RCCLK = 1.
; A/D interrupt handler.
ADInt:
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.
ADRead:
ADChk:
push
mov
mov
clr
anl
pop
ret
orl
setb ADCS
jnb
mov
clr
anl
ret
orl
setb
ret
mov
anl
orl
ADCON,A
ADCI,ADChk
A,DAC0
ADCI
ADCON,#0fch
ACC
A,DAC0
ADResult,A
ADCI
ADCON,#0fch ; Clear the A/D channel number.
ACC
12.
ADCON,A
ADCS
PCON,#01h
PCON,#02h
PT0AD,#78h
P0M2,#87h
P0M1,#78h
Rev. 01 — 31 March 2004
; 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
; Save accumulator.
; Get A/D result, by reading DAC0 SFR
; and save it in memory.
; Clear the A/D completion flag.
; 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.
; Disable digital inputs on A/D input pins.
; Disable digital outputs on A/D input pins.
; Disable digital outputs on A/D input pins.
CMOS single-chip 8-bit microcontroller
Section 8.2 “Analog functions”
© Koninklijke Philips Electronics N.V. 2004. All rights reserved.
P87LPC778
16 of 79
Related parts for p87lpc778-01
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
NXP Semiconductors designed the LPC2420/2460 microcontroller around a 16-bit/32-bitARM7TDMI-S CPU core with real-time debug interfaces that include both JTAG andembedded trace
Manufacturer:
NXP Semiconductors
Datasheet:
Part Number:
Description:
NXP Semiconductors designed the LPC2458 microcontroller around a 16-bit/32-bitARM7TDMI-S CPU core with real-time debug interfaces that include both JTAG andembedded trace
Manufacturer:
NXP Semiconductors
Datasheet:
Part Number:
Description:
NXP Semiconductors designed the LPC2468 microcontroller around a 16-bit/32-bitARM7TDMI-S CPU core with real-time debug interfaces that include both JTAG andembedded trace
Manufacturer:
NXP Semiconductors
Datasheet:
Part Number:
Description:
NXP Semiconductors designed the LPC2470 microcontroller, powered by theARM7TDMI-S core, to be a highly integrated microcontroller for a wide range ofapplications that require advanced communications and high quality graphic displays
Manufacturer:
NXP Semiconductors
Datasheet:
Part Number:
Description:
NXP Semiconductors designed the LPC2478 microcontroller, powered by theARM7TDMI-S core, to be a highly integrated microcontroller for a wide range ofapplications that require advanced communications and high quality graphic displays
Manufacturer:
NXP Semiconductors
Datasheet:
Part Number:
Description:
The Philips Semiconductors XA (eXtended Architecture) family of 16-bit single-chip microcontrollers is powerful enough to easily handle the requirements of high performance embedded applications, yet inexpensive enough to compete in the market for hi
Manufacturer:
NXP Semiconductors
Datasheet:
Part Number:
Description:
The Philips Semiconductors XA (eXtended Architecture) family of 16-bit single-chip microcontrollers is powerful enough to easily handle the requirements of high performance embedded applications, yet inexpensive enough to compete in the market for hi
Manufacturer:
NXP Semiconductors
Datasheet:
Part Number:
Description:
The XA-S3 device is a member of Philips Semiconductors? XA(eXtended Architecture) family of high performance 16-bitsingle-chip microcontrollers
Manufacturer:
NXP Semiconductors
Datasheet:
Part Number:
Description:
The NXP BlueStreak LH75401/LH75411 family consists of two low-cost 16/32-bit System-on-Chip (SoC) devices
Manufacturer:
NXP Semiconductors
Datasheet:
Part Number:
Description:
The NXP LPC3130/3131 combine an 180 MHz ARM926EJ-S CPU core, high-speed USB2
Manufacturer:
NXP Semiconductors
Datasheet:
Part Number:
Description:
The NXP LPC3141 combine a 270 MHz ARM926EJ-S CPU core, High-speed USB 2
Manufacturer:
NXP Semiconductors
Part Number:
Description:
The NXP LPC3143 combine a 270 MHz ARM926EJ-S CPU core, High-speed USB 2
Manufacturer:
NXP Semiconductors
Part Number:
Description:
The NXP LPC3152 combines an 180 MHz ARM926EJ-S CPU core, High-speed USB 2
Manufacturer:
NXP Semiconductors
Part Number:
Description:
The NXP LPC3154 combines an 180 MHz ARM926EJ-S CPU core, High-speed USB 2
Manufacturer:
NXP Semiconductors
Part Number:
Description:
Standard level N-channel enhancement mode Field-Effect Transistor (FET) in a plastic package using NXP High-Performance Automotive (HPA) TrenchMOS technology
Manufacturer:
NXP Semiconductors
Datasheet: