/* DEMO97.c: Using the DelayMs function to toggle the LED at regular intervals of approximately 500 ms. Compiler: BC++ 3.1, Turbo C++ 1.01 (3.01), MSVC 1.52 Compile mode: Large Project: DEMO97.c ..\..\Lib\upac5000.lib Hardware: uPAC-5000 Description DelayMs(): Suspends execution for interval (milliseconds) [Dec 21, 2011] by Liam */ #include #include "..\..\lib\upac5000.h" void main(void) { int quit=0; InitLib(); /* InitLib() must be called before other functions in the library may be used */ Print("Press 'q' to quit\r\n"); while(!quit) { if(Kbhit() && Getch()=='q') quit=1; /* Toggle the LED at regular intervals of approximately 500 ms */ DelayMs(500); LedToggle(); } }