參數(shù)資料
型號: 935267487512
廠商: NXP SEMICONDUCTORS
元件分類: 微控制器/微處理器
英文描述: 8-BIT, OTPROM, 20 MHz, MICROCONTROLLER, PDSO20
封裝: 7.50 MM, PLASTIC, MS-013AC, SOT-163-1, SOP-20
文件頁數(shù): 6/69頁
文件大?。?/td> 352K
代理商: 935267487512
Philips Semiconductors
Preliminary specification
87LPC768
Low power, low price, low pin count (20 pin) microcontroller with
4 kB OTP 8-bit A/D, Pulse Width Modulator
2000 May 02
12
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.
; Set up port pins for A/D conversion, without affecting other pins.
mov
PT0AD,#78h
; Disable digital inputs on A/D input pins.
anl
P0M2,#87h
; Disable digital outputs on A/D input pins.
orl
P0M1,#78h
; Disable digital outputs on A/D input 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
ADCON,A
; Add in the new channel number.
setb
ADCS
; Start an A/D conversion.
;
orl
PCON,#01h
; The CPU could be put into Idle mode here.
;
orl
PCON,#02h
; The CPU could be put into Power Down mode here if RCCLK = 1.
ret
; A/D interrupt handler.
ADInt:
push
ACC
; Save accumulator.
mov
A,DAC0
; Get A/D result,
mov
ADResult,A
;
and save it in memory.
clr
ADCI
; Clear the A/D completion flag.
anl
ADCON,#0fch
; Clear the A/D channel number.
pop
ACC
; Restore accumulator.
reti
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:
orl
ADCON,A
; Add in the new channel number.
setb
ADCS
; Start A/D conversion.
ADChk:
jnb
ADCI,ADChk
; Wait for ADCI to be set.
mov
A,DAC0
; Get A/D result.
clr
ADCI
; Clear the A/D completion flag.
anl
ADCON,#0fch
; Clear the A/D channel number.
ret
相關(guān)PDF資料
PDF描述
08-70-1028 Crimp Socket Contact; Wire Size (AWG):28-22; Contact Material:Brass; Contact Plating:Tin
08-70-1029 Connector Contact,SKT,CRIMP Terminal
08-70-1031 Connector Contact,SKT,CRIMP Terminal
08-70-1039 Crimp Socket Contact; Wire Size (AWG):28-22; Contact Material:Phosphor Bronze; Contact Plating:Tin; Contact Termination:Crimp; For Use With:Molex 5264-N Series Shrouded Crimp Terminal Housings; Pack Quantity:1; Series:5263
08-70-1040 Crimp Socket Contact; Wire Size (AWG):28-22; Contact Plating:Tin; Series:5263; Operating Temp. Min:-40 C; Pitch Spacing:2.5mm; Voltage Rating:250V
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
935268081112 制造商:NXP Semiconductors 功能描述:SUB ONLY IC
935268721125 制造商:NXP Semiconductors 功能描述:Buffer/Line Driver 1-CH Non-Inverting 3-ST CMOS 5-Pin TSSOP T/R
935269304128 制造商:ST-Ericsson 功能描述:IC AUDIO CODEC W/TCH SCRN 48LQFP
935269544557 制造商:NXP Semiconductors 功能描述:SUB ONLY TDA9587-2US1-V1.3
935269987557 制造商:NXP Semiconductors 功能描述:SUB ONLY TDA9587-1US1-V1.8 SUBBED TO 935269987557