ICS Advent AOB8/16 Product Manual page 33

Table of Contents

Advertisement

AOB8/16 &AOB16/16 Manual
printf("(20000 maximum, program will use modulus if needed);");
scanf("%u",&counts);
counts%=20001;
}
/end setparms*/
Function: sendtoport( ) - local routine
Purpose:
Input:
Calls:
Output:
void sendtoport()
{
int
long
unsigned char
/*Each point is broken into the high byte and low byte, and then written to the
DAC in two separate bytes. */
do
{
for(i = 0; i <counts,i++)
{
temp = progstruct{i} % 256;
lowbyte = (unsigned char)temp;
temp = progstruct{i} / 256;
hibyte = (unsigned char)temp;
outportb(baseadrs+(dacnum*2),lowbyte);
outportb(baseadrs+(dacnum*2+1),hibyte);
}
}
while (!kbhit());
outportb(baseadrs+(dacnum*2),0);
outportb(baseadrs+(dacnum*2+1),0);
}
Function: sinecurve() - local routine
Purpose:
Input:
Calls:
Output:
Page 24
Writes point buffer to the DAC until a key is pressed
None
None
None
i,temp;
j;
lowbyte,hibyte;
Calculate the points to create a sine wave
None
None
None
/*set DAC to 0 output */
/*end sendtoport */
Manual Number: 00650-010-6

Advertisement

Table of Contents
loading

This manual is also suitable for:

Aob16/16

Table of Contents