
Chapter 7. I/O Facilities
111
7.3 Timer and Beeper
7.3.1 Timer Functions
The timer functions (
TIMEA
,
TIMEB
, and
TIMEC
) are available in BHT-BASIC for accurate
time measurement.
Use these timer functions for monitoring the keyboard waiting time, communications timeout
errors, etc.
TIMEA = 100
’10 sec
WAIT 0,&H10
BEEP
PRINT "10sec."
TIMEC = 20
’2 sec
WAIT 0,&H41
BEEP
PRINT "2sec. or Keyboard"
7.3.2
BEEP
Statement
The
BEEP
statement sounds a beeper and specifies the frequency of the beeper.
The example below sounds the musical scale of do, re, mi, fa, sol, la, si, and do.
READ readDat%
WHILE (readDat% >= 0)
TIMEA = 3
BEEP 2,,,readDat%
WAIT 0,&h10
READ readDat%
WEND
DATA 523,587,659,698,783,880,987,1046,-1
Specifying the frequency with value 0, 1, or 2 produces the special beeper effects; that is, the
low-, medium-, or high-pitched tone, respectively.
FOR i% = 0 TO 2
TIMEC = 20
BEEP,,,i%
WAIT 0,&h40
NEXT
NOTE
Only if setting 0, 1, or 2 or making no specification to the frequency, you can adjust
the beeper volume on the LCD when turning on the BHT. (For the adjustment of the
beeper volume, refer to the BHT User’s Manual.)
Содержание BHT-BASIC 100 SERIES
Страница 1: ......
Страница 161: ...153 Chapter 10 Sleep Function CONTENTS 10 1 Sleep Function 154...
Страница 163: ...155 Chapter 11 Resume Function CONTENTS 11 1 Resume Function 156...
Страница 173: ...165 Chapter 13 Backlight Function CONTENTS 13 1 Backlight Function 166...
Страница 192: ...Chapter 14 Statement Reference 184 Example OPEN master Dat AS 1 FIELD 1 20 AS bar 10 AS ky CLFILE 1 CLOSE 1...
Страница 249: ...241 Example CLOSE IF kyIn Y THEN KILL Master Dat END IF Reference Statements CLFILE...
Страница 349: ...341 Run time errors Error code Meaning 05h Parameter out of the range checktype is out of the range...
Страница 383: ...375 Run time errors Reference Error code Meaning 05h Parameter out of the range Functions LEFT LEN and RIGHT...