Fortec Star iBASE IB898 User Manual page 52

Table of Contents

Advertisement

APPENDIX
void Dio5Initial(void)
{
unsigned char ucBuf;
ucBuf = Get_NCT5523D_Reg(0x1C);
ucBuf &= ~0x02;
Set_NCT5523D_Reg(0x1C, ucBuf);
Set_NCT5523D_LD(0x07);
//enable the GP2 group
ucBuf = Get_NCT5523D_Reg(0x30);
ucBuf |= 0x04;
Set_NCT5523D_Reg(0x30, ucBuf);
}
//---------------------------------------------------------------------------
void Dio5SetOutput(unsigned char NewData)
{
Set_NCT5523D_LD(0x07);
Set_NCT5523D_Reg(0xE1, NewData);
}
//---------------------------------------------------------------------------
unsigned char Dio5GetInput(void)
{
unsigned char result;
Set_NCT5523D_LD(0x07);
result = Get_NCT5523D_Reg(0xE1);
return (result);
}
//---------------------------------------------------------------------------
void Dio5SetDirection(unsigned char NewData)
{
//NewData : 1 for input, 0 for output
Set_NCT5523D_LD(0x07);
Set_NCT5523D_Reg(0xE8, NewData);
}
//---------------------------------------------------------------------------
unsigned char Dio5GetDirection(void)
{
unsigned char result;
Set_NCT5523D_LD(0x07);
result = Get_NCT5523D_Reg(0xE8);
return (result);
}
//---------------------------------------------------------------------------
IB898 User's Manual
//switch to logic device 7
//switch to logic device 7
//switch to logic device 7
//switch to logic device 7
//switch to logic device 7
47

Advertisement

Table of Contents
loading

This manual is also suitable for:

E3825E3815

Table of Contents