System Installation
PEB-2770/2780VG2A User’s Manual
3-9
unsigned char d2;
outportb(Superio2_Addr, Addr2);
delay(2);
d2 = inportb(Superi1);
#ifdef DEBUG
printf("\nGet data %x from CR%x",d2,Addr2);
#endif /*DEBUG*/
delay(2);
return(d2);
}
int main(void)
{
unsigned char d2;
printf("\n------------------------------------------------------------------------");
printf("\n- PEB-2770/2780 GPIO TEST Program R1.0 -");
printf("\n------------------------------------------------------------------------");
printf("\n Please short the following pins with 2.00mm-pitched jumper on J13");
printf("\n P.S: SIO: W83627UHG, Winbond");
printf("\n GP50(J13 PIN 1)----GP57(J13 PIN 2)");
printf("\n GP51(J13 PIN 3)----GP56(J13 PIN 4)");
printf("\n GP52(J13 PIN 5)----GP55(J13 PIN 6)");
printf("\n GP53(J13 PIN 7)----GP54(J13 PIN 8)");
printf("\n GND (J13 PIN10)****VCC (J13 PIN 9)");
printf("\n\n Starting...");
enter_Superio2_CFG();
// 87 87
/* CR2A B7 = 1 selet GPIO Port 1*/
d2 = Get_CFG2(0x2A);
d2 = (d2 & 0x7F) | 0x80;
Set_CFG2(0x2A, d2);
/* IO test loop 1 */
/* Set GPIO Port 5 Enable */
Set_CFG2(0x07, 0x08);
/* Select logic device 08*/
Set_CFG2(0x30, 0x02);
/* Enable GPIO Port 5 */
//--------------------------------------------------------------------------------------------------------
// GPIO50->57
// GPIO51->56
// GPIO52->55
// GPIO53->54
//--------------------------------------------------------------------------------------------------------