Appendix
50
EC71813CLD2NA SERIES
outportb(BAR+0x05,0x0f);
tmp_val =(inportb(BAR+0x02)|0x08)&0xeb;
tmp_val |= 0x40;
outportb(BAR+0x02, tmp_val);
delay(30);
tmp_val =inportb(BAR);
while((tmp_val &0x02)!=0x02)
{
tmp_val =inportb(BAR);
if((tmp_val &0x04)!=0)
{
printf("ERROR\n");
return 0;
}
}
(2)
Input/output program:
a.
Output Program
Functions input: int pin Value 1 ~ 8 are corresponding with output pin 1 ~ 8
int lev_val 1 is to output high level; 0 is to output low level
Functions Output: none
void Out_Lev(int pin ,int lev_val)
{
unsigned int reg_val ;
outportb(BAR,0xbf);
if(pin < 5)
{
outportb(BAR+0x04,0x40);
}
else
{