Intel IB935 User Manual page 65

Socket lga775 pentium 4 intel q35 chipset picmg 1.3 shb express cpu card
Table of Contents

Advertisement

//=====================================================================
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
// PURPOSE.
//=====================================================================
#include <dos.h>
#include <conio.h>
#include <stdio.h>
#include <stdlib.h>
#include "W627HF.H"
//=====================================================================
void ClrKbBuf(void);
int main (int argc, char *argv[]);
//=====================================================================
int main (int argc, char *argv[])
{
unsigned char ucDO = 0;
unsigned char ucDI;
unsigned char ucBuf;
Set_W627HF_LD( 0x07);
Set_W627HF_Reg(0xF1, 0x00);
ucDI = Get_W627HF_Reg(0xF1) & 0x0F;
ClrKbBuf();
while(1)
{
ucDO++;
Set_W627HF_Reg(0xF1, ((ucDO & 0x0F) << 4));
ucBuf = Get_W627HF_Reg(0xF1) & 0x0F;
if (ucBuf != ucDI)
{
ucDI = ucBuf;
printf("Digital I/O Input Changed. Current Data is 0x%X\n",ucDI);
}
if (kbhit())
{
getch();
break;
}
delay(500);
}
return 0;
}
//=====================================================================
void ClrKbBuf(void)
{
while(kbhit())
{
getch();
}
//---------------------------------------------------------------------------
}
IB935 User's Manual
APPENDIX
//data for digital output
//data for digital input
//switch to logic device 7
//clear
61

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ib935 rf

Table of Contents