
Function: Inserts a delay for a specific time interval. The time unit is
0.01 ms and uses the Timer 1 of the CPU.
Syntax:
void Delay_2(unsigned ms);
Header: #include
”7188xc.h”
Description: Inserts a delay for a specific time interval. The time unit
is 0.01 ms and uses the Timer 1 feature of the CPU.
ms: the delay time.
Example: Please refer to “TimerOpen()” function for more detailed
information.
StopWatchStart()
Function: Starts using a StopWatch channel, and resets the
StopWatch value to 0.
Syntax:
int StopWatchStart(int channel);
Header: #include
”7188xc.h”
Description: The system timer ISR will increment the StopWatch
value by 1 in 1 ms intervals.
channel: 0-7, a total of 8 channels.
Return Value: On success, returns NoError.
If the channel is out of range, returns ChannelError
(-15).
Example:
#include “7188xc.h”
void main(void)
{
unsigned long value;
int quit=0; InitLib();
Print("\n\rTest the StopWatch ... Press 'q' to quit\n\r ");
TimerOpen();
StopWatchStart(0); /*start using the StopWatchStart function*/
while(!quit){
if(Kbhit()){ switch(Getch()){ case 'q': quit=1; break; } }
StopWatchReadValue(0,&value);
Print("SWatch=%d \r",value);
if(value==2000){
StopWatchPause(0);
DelayMs(2000);
StopWatchContinue(0); }
if(value==4000){
StopWatchStop(0);
I-7188XC Series User’s Manual(Ver.1.0, Apr/2007,7MH-21-10) ---
120
Содержание I-7188XC Series
Страница 87: ...I 7188XC Series User s Manual Ver 1 0 Apr 2007 7MH 21 10 87...
Страница 136: ...I 7188XC Series User s Manual Ver 1 0 Apr 2007 7MH 21 10 136...
Страница 142: ...Step 8 Make the project I 7188XC Series User s Manual Ver 1 0 Apr 2007 7MH 21 10 142...
Страница 149: ...Step 8 Rebuild the project I 7188XC Series User s Manual Ver 1 0 Apr 2007 7MH 21 10 149...