User Manual

SubCompact Board GENE-U15B
Appendix D DIO D-5
;Input : CL - register index
; CH - device ID
;Output : AL - Value read
Ct_I2CReadByte Proc Near
mov ch,06eh
mov dx, 500h + 00h ; Host Control Register
xor al, al ; Clear previous commands
out dx, al
call Delay5ms
mov dx, 500h + 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, 500h + 05h ; Host Command
Register
mov al, cl ; offset to read
out dx, al
mov dx, 500h + 06h