AN114 Xicor, AN114 Datasheet - Page 5

no-image

AN114

Manufacturer Part Number
AN114
Description
Interfacing the X9408/X9418 XDCP to 8051 Microcontrollers
Manufacturer
Xicor
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
AN1149FHKEBV
Manufacturer:
PANASONIC/松下
Quantity:
20 000
;-----------------------------------------------------------------------------
; CODE SEGMENT
;-----------------------------------------------------------------------------
Code_Seg segment CODE
;-----------------------------------------------------------------------------
;
; NAME: execute
; FUNCTION: Determines which X9408 instruction is issued,
;
; INPUTS: COMMAND
; OUTPUTS: none
; CALLS: read_wcr, read_dr, write_wcr, write_dr, xfr_dr,
;
; AFFECTED: DPTR, A
;
;-----------------------------------------------------------------------------
execute:
first:
;-----------------------------------------------------------------------------
;
; The following routines handle each X9408 instruction.
; These are called by the "execute" routine.
;
; read_wcrReads a WCR and returns its value in DATA_BYTE
; write_wcrWrites the value in DATA_BYTE to a WCR
; read_drReads a Data Register and returns its value in DATA_BYTE
; write_drWrites the value in DATA_BYTE to a data register
; xfr_drTransfers the value in a data register to its WCR
; xfr_wcrTransfers the value in a WCR to one of its data registers
; gxfr_drGlobal transfer of data registers to WCRs
; gxfr_wcrGlobal transfer of WCRs to Data Registers
; inc_wiperSingle Step Increment/Decrement of wiper position for WCR
;
REV 1.1 11/12/02
mov
mov
jmp
call
ret
call
ret
call
ret
call
ret
call
ret
call
ret
call
ret
call
ret
call
ret
rseg
using
then executes
xfr_wcr, gxfr_dr, gxfr_wcr, inc_wiper
dptr,#first
a,COMMAND
@a+dptr
read_wcr
write_wcr
read_dr
write_dr
xfr_dr
xfr_wcr
gxfr_dr
gxfr_wcr
inc_wiper
Code_Seg
; Get Base Address
; Jump Offset
; Jump to instruction handler
; COMMAND #0
; COMMAND #4
; COMMAND #8
; COMMAND #12
; COMMAND #16
; COMMAND #20
; COMMAND #24
; COMMAND #28
; COMMAND #32
Application Note
Switch to this code segment.
Specify register bank for the following
program code.
www.xicor.com
AN 114
5 of 12

Related parts for AN114