Aaeon PICO-KBU4 User Manual page 103

Table of Contents

Advertisement

in al, dx
ret
Ct_I2CReadByte Endp
;Input : CL - register index
; CH - device ID
; AL - Value to write
;Output: none
Ct_I2CWriteByte Proc Near
mov ch,06eh
xchg ah, al
mov dx, F040h + 00h ; Host Control Register
xor al, al ; Clear previous commands
out dx, al
call Delay5ms
mov dx, F040h + 04h ; Transmit Slave Address Register
mov al, ch ; Set the slave address and
out dx, al ; prepare for a WRITE command
mov dx, F040h + 05h ; Host Command Register
mov al, cl ; offset to write
out dx, al
mov dx, F040h + 06h
mov al, ah
out dx, al
mov dx, F040h + 01h ; Host Status Register
mov al, 07h ; Clear all status bits
Appendix D –DIO
90

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents