I-7188XA Series User’s Manual ( Ver1.2, Feb/2014, 7MH-019-10 ) ---
70
4.10 Using the Timer Function
The I-7188XA(D) can support one main time tick, 8 StopWatch timers
and 8 CountDown timers. The I-7188XA(D) uses a single 16-bit timer to
perform these timer functions, with a timer accuracy of 1 ms. The
InstallUserTimer()
function can be used to install a custom timer
function and the function will be called at 1 ms intervals. The system
timer of the MiniOS7 will call INT 9 every 1 ms and call INT 0x1C every
55 ms. The timer function of the library is linked to associated with
called by hooked to INT 9 and will call any custom timer function.
The
TimerOpen()
function is used to start the I-7188XA(D) timer, and
this function must be inserted at the beginning of the program. The
TimerClose()
function is used to stop the timer. The sample code is as
follows:
Refer to the demo programs in the
CD:\Napdos\7188XABC\7188XA\Demo\BC_TC\Timer folder for more
information.
unsigned long time iTime;
InitLib(); /* Initiate the 7188xa library */
TimerOpen();
/* Begin using the 7188XA timer function */
while(!quit)
{
if(Kbhit())
TimerResetValue();
/* Reset the main time ticks to 0 */
iTime=TimerReadValue(); /* Read main time ticks */
}
TimerClose(); /* Stop using the 7188XA timer function */
Summary of Contents for I-7188XA
Page 62: ...I 7188XA Series User s Manual Ver1 2 Feb 2014 7MH 019 10 62 5 6 COM1 RS 232 1 2 232...
Page 90: ...I 7188XA Series User s Manual Ver1 2 Feb 2014 7MH 019 10 90 1 2...
Page 140: ...I 7188XA Series User s Manual Ver1 2 Feb 2014 7MH 019 10 140...
Page 146: ...I 7188XA Series User s Manual Ver1 2 Feb 2014 7MH 019 10 146 Step 8 Make the project...
Page 153: ...I 7188XA Series User s Manual Ver1 2 Feb 2014 7MH 019 10 153 Step 8 Rebuild the project...
Page 158: ...I 7188XA Series User s Manual Ver1 2 Feb 2014 7MH 019 10 158...
Page 162: ...I 7188XA Series User s Manual Ver1 2 Feb 2014 7MH 019 10 162...
Page 164: ...I 7188XA Series User s Manual Ver1 2 Feb 2014 7MH 019 10 164...