/* FLASH.C
Copyright 1996-2001 by WinSystems Inc.
Permission is hereby granted to the purchaser of the WinSystems
UIO cards and CPU products incorporating the UIO device, to distribute
any binary file or files compiled using this source code directly or
in any work derived by the user from this file. In no case may the
source code, original or derived from this file, be distributed to any
third party except by explicit permission of WinSystems. This file is
distributed on an "As-is" basis and no warranty as to performance,
fitness of purposes, or any other warranty is expressed or implied.
In no case shall WinSystems be liable for any direct or indirect loss
or damage, real or consequential resulting from the usage of this
source code. It is the user's sole responsibility to determine
fitness for any considered purpose.
*/
#include <stdio.h>
#include <conio.h>
#include <dos.h>
#include "uio48.h"
/* This is where we have our board jumpered to */
#define BASE_PORT 0x120
/* This is an utlra-simple demonstration program of some of the functions
available in the UIO48 source code library. This program simply sets and
clears each I/O line in succession. It was tested by hooking LEDs to all
of the I/O lines and wathching the lit one race through the bits.
*/
void main()
{
int x;
/* Initialize all I/O bits, and set then for input */
init_io(BASE_PORT);
/* We'll repeat our sequencing until a key is pressed */
while(!kbhit())
{
/* We will light the LED attached to each of the 48 lines */
for(x=1; x <=48; x++)
{
/* Setting the bit lights the LED */
set_bit(x);
/* The wait time is subjective. We liked 100mS */
delay(100);
/* Now turn off the LED */
clr_bit(x);
}
}
getch();
}
Summary of Contents for EBC-LP
Page 68: ...APPENDIX C Mechanical Drawing...
Page 69: ......
Page 70: ......
Page 71: ...APPENDIX D WS16C48 I O Routines and Sample Program Listings...