Sample Code (Method 2: LPC Mode) | Hardware Setup | ||||||||
|
|
| |||||||
|
|
|
|
|
|
|
|
| |
|
| Control LPC LAN |
|
|
|
|
| ||
| mov | al,0fh |
|
| ;Select LPC Mode (bit 4 =1) |
|
|
| |
| mov | dx,005eh |
|
|
|
|
|
| |
| out | dx,al |
|
|
|
|
|
| |
Note: bit 0 = 1, change LAN 1, 2 to bypass, |
|
|
| ||||||
|
| bit 0 = 0, change LAN 1, 2 to normal (power on status) |
|
|
| ||||
|
| bit 1 = 1, change LAN 3, 4 to bypass, |
|
|
| ||||
|
| bit 1 = 0, change LAN 3, 4 to normal (power on status) |
|
|
| ||||
|
| bit 2 = 1, change LAN 1, 2 to bypass, |
|
|
| ||||
|
| bit 2 = 0, change LAN 1, 2 to normal (power off status) |
|
| |||||
|
| bit 3 = 1, change LAN 3, 4 to bypass, |
|
|
| ||||
|
| bit 3 = 0, change LAN 3, 4 to normal (power off status) |
|
| |||||
Watch Dog function setup sample code |
|
|
| ||||||
|
|
|
|
|
|
|
|
| |
|
|
| mov | dx, 4Eh | ;Send "87" twice to IO port 4Eh |
|
|
| |
|
|
| mov | al, 87h | ;to unlock SIO. |
|
|
| |
|
|
| out | dx, al |
|
|
|
|
|
|
|
| out | dx, al |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| mov | dx, 4Eh |
|
|
|
|
|
|
|
| mov | al, 2Dh |
|
|
|
|
|
|
|
| out | dx, al |
|
|
|
|
|
|
|
| mov | dx, 4Fh |
|
|
|
|
|
|
|
| in | al, dx |
|
|
|
|
|
|
|
| and | al, 11111110b | ;Set PIN77 to WDTO# |
|
|
| |
|
|
| out | dx, al |
|
|
|
|
|
|
|
| mov | dx, 4Eh | ;Choose LDN8 |
|
|
| |
|
|
| mov | al, 07h |
|
|
|
|
|
|
|
| out | dx, al |
|
|
|
|
|
|
|
| mov | dx, 4Fh |
|
|
|
|
|
|
|
| mov | al, 08h |
|
|
|
|
|
|
|
| out | dx, al |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
|
|
| mov | dx, 4Eh | ;Set to enable |
|
|
| |
|
|
| mov | al, 30h |
|
|
|
|
|
|
|
| out | dx, al |
|
|
|
|
|
|
|
| mov | dx, 4Fh |
|
|
|
|
|
|
|
| mov | al, 01h |
|
|
|
|
|
|
|
| out | dx, al |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
|
|
| mov | dx, 4Eh | ;Enable WDTO# and set to KBRST# |
|
|
| |
|
|
| mov | al, 0F7h |
|
|
|
|
|
|
|
| out | dx, al |
|
|
|
|
|
|
|
| mov | dx, 4Fh |
|
|
|
|
|
|
|
| in | al, dx |
|
|
|
|
|
|
|
| and | al, 0F7h | ;CR 0F7h bit4 |
|
|
| |
|
|
| out | dx, al |
|
|
|
|
|
|
|
| .. |
| ;CR 0F6h |
|
|
| |
|
|
| .. |
| ;CR 0F5h bit1 |
|
| ||
|
|
| .. |
|
| bit3 |
|
| |
|
|
| mov | dx, 4Eh | ;Exit SIO access and lock it up. |
| |||
|
|
| mov | al, 0AAh |
|
|
| ||
|
|
|
|
|
|
|
| ||
|
|
| out | dx, al |
|
|
|
|
|