Appendix c p rogrammable g pio & watchdog timer – Advantech PCM-9588 User Manual
Page 97
![background image](/manuals/42461/97/background.png)
87
PCM-9588 User Manual
Appendix C
P
rogrammable
G
PIO
&
Watchdog
Timer
;
AL - Value to write
;Output: none
;==============================================================
Ct_I2CWriteByteProcNear
push ax
push cx
mov dx,SMBus_Port +04h
mov al,ch
;ID cmd(Write)
out
dx,al
call Delay5ms
call Delay5ms
call CT_Chk_SMBus_Ready
pop ax
mov dl,03h
out
dx,al
;Index
call Delay5ms
call Delay5ms
pop ax
mov dl,05
out
dx,al
;Data0
call Delay5ms
call Delay5ms
mov dl,02h
mov al,48h
out
dx,al
;write data
call Delay5ms
call Delay5ms
mov cx, 100h
@@:
newiodelay
loop short @B
call CT_Chk_SMBus_Ready
ret
Ct_I2CWriteByteEndp
CT_Chk_SMBus_ReadyProcNear
mov dx,SMBus_Port + 0;status port