參數(shù)資料
型號(hào): AN114
英文描述: Interfacing the X9408/X9418 XDCP to 8051 Microcontrollers
中文描述: 數(shù)字電位器的接口X9408/X9418的8051微控制器
文件頁(yè)數(shù): 7/12頁(yè)
文件大?。?/td> 262K
代理商: AN114
7 of 12
AN 114
Application Note
www.xicor.com
REV 1.1 11/12/02
gxfr_wcr:
mov
orl
mov
mov
call
ret
a,ID
a,#080h
ID, a
dptr,#case5
instr_gen
; Get bits R1 R0 x x
; Append to the GXFR WCR instruction code
; Save the result
; Jump to the addr for this instruction
inc_wiper:
mov
orl
mov
mov
call
ret
a,ID
a,#020h
ID,a
dptr,#case6
instr_gen
; Get bits x x P1 P0
; Append to the Incr Wiper instruction code
; Save the result
; Jump to the addr for this instruction
;-----------------------------------------------------------------------------
;
; NAME: instr_gen (Instruction generator)
; FUNCTION: Issues appropriate I2C protocol for each X9408 instruction
; INPUTS: ADDR_BYTE, ID, PULSES, DPTR, DATA_BYTE
; OUTPUTS: DATA_BYTE
; CALLS: start_cond, stop_cond, send_byte, send_bit, get_byte, polling
; AFFECTED: DATA_BYTE, A, COUNT
;
;-----------------------------------------------------------------------------
instr_gen:
call
start_cond
; Issue an I2C start condition
mov
a,ADDR_BYTE
; Send X9408 slave/address byte
call
send_byte
jc
stop_gen
; if NACK, end...
mov
a,ID
; Send X9408 instruction byte
call
send_byte
jc
stop_gen
; if NACK, end...
clr
a
; Reset offset before jump
jmp
@a +dptr
; Jump to various instruction cases
case6:
mov
anl
mov
mov
anl
a,PULSES
a,#00111111b ; A <- Bits 0 0 D5 D4 D3 D2 D1 D0
COUNT, a
; Save as the number of pulses
a,PULSES
a,#10000000b ; A <- Bits DIR 0 0 0 0 0 0 0
; A <- Bits DIR X D5 D4 D3 D2 D1 D0
wiper_lp:
call
djnz
send_bit
COUNT,wiper_lp ; Continue until all pulses are sent
; Send the bit (a single pulse)
case4:
jmp
stop_gen
; If program gets here, then it is done
case2:
mov
call
jmp
a,DATA_BYTE
send_byte
stop_gen
; Send X9408 data byte
case1:
call
jmp
get_byte
stop_gen
; Receive X9408 Data Byte
case3:
mov
call
a,DATA_BYTE
send_byte
; Send X9408 Data Byte
相關(guān)PDF資料
PDF描述
AN12-008-5 Analog IC
AN13-006-5 Analog IC
AP22-008-5 Analog IC
AP23-006-5 Analog IC
AN11-020-5 Analog IC
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
AN1149-3 制造商:LUMILEDS 制造商全稱(chēng):LUMILEDS 功能描述:Electrical Design Considerations for SuperFlux LEDs
AN1149-3A 制造商:LUMILEDS 制造商全稱(chēng):LUMILEDS 功能描述:Advanced Electrical Design Models
AN1149-3B 制造商:LUMILEDS 制造商全稱(chēng):LUMILEDS 功能描述:SuperFlux & SnapLED Emitter Forward Voltage Data
AN1149-4 制造商:LUMILEDS 制造商全稱(chēng):LUMILEDS 功能描述:Thermal Management Considerations for SuperFlux LEDs
AN1149-5 制造商:LUMILEDS 制造商全稱(chēng):LUMILEDS 功能描述:Secondary Optics Design Considerations for SuperFlux LEDs