ACS-2645 User Manual
53
outportb(0x4E, 0x30); //Logic device activation control
outportb(0x4F, (inportb(0x4F)|0x4));
//Set bit[2] to enable GPIO Port6 if LDN=8
Configure GPIO register
Example x86 assembly code:
mov dx, 4Eh
mov al, 0E6h ;GPIO inversion reg.
out dx, al
mov dx, 4Fh
mov al, 000h ;0
– normal, 1 - inverted
out dx, al
mov dx, 4Eh
mov al, 0E4h ;GPIO I/O selection reg.
out dx, al
mov dx, 4Fh
mov al, 0FFh ;0
– Output, 1 – Input
;or mov al, 0F0h to set output
out dx, al
Example C code:
outportb(0x4E, 0xE6); //GPIO I/O selection reg.
outportb(0x4F, 0x0); //0
– normal, 1 – inverted
outportb(0x4E, 0xE4); //GPIO inversion reg.
outportb(0x4F, 0xFF); //0
– Output, 1 - Input
or
outportb(0x4E, 0xE4); //GPIO inversion reg.
outportb(0x4F, 0xF0); //0
– Output, 1 – Input
Read GPIO value
Example x86 assembly code:
mov dx, 4Eh
mov al, 0E5h ;GPIO data reg.
out dx, al
mov dx, 4Fh
in al, dx ;Bit[3::0] = GPI[3::0] value
Example C code:
outportb(0x4E, 0xE5); //GPIO data reg.
Summary of Contents for ACS-2645
Page 7: ...ACS 2645 User Manual 7 1 2 Dimensions ...
Page 8: ...ACS 2645 User Manual 8 Figure 1 1 Dimensions of ACS 2645 ...
Page 16: ...ACS 2645 User Manual 16 2 2 Board Dimensions Figure 2 1 Mainboard Dimensions ...
Page 18: ...ACS 2645 User Manual 18 Board Bottom Figure 2 3 Jumpers and Connectors Location Bottom ...
Page 67: ...ACS 2645 User Manual 67 Step 5 Click Install to begin the installation Step 6 Click Finish ...
Page 69: ...ACS 2645 User Manual 69 Step 3 Click Yes I want to restart my computer now to continue ...