Aaeon PICO-KBU4 User Manual page 102

Table of Contents

Advertisement

; CH - device ID
;Output : AL - Value read
Ct_I2CReadByte Proc Near
mov ch,06eh
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
inc ch ; Set the slave address and
mov al, ch ; prepare for a READ command
out dx, al
mov dx, F040h + 05h ; Host Command Register
mov al, cl ; offset to read
out dx, al
mov dx, F040h + 06h
xor al, al ; Clear old data
out dx, al
mov dx, F040h + 01h ; Host Status Register
mov al, 07h ; Clear all status bits
out dx, al
mov dx, F040h + 00h ; Host Control Reegister
mov al, 12h ; Start a byte access
out dx, al
call CT_Chk_SMBus_Ready
mov dx, F040h + 06h
Appendix D –DIO
89

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents