mk90.basic.statements

Statement SOUND

Drive the buzzer with raw controller parameters.

Syntax

SOUND divisor, cycles

Parameters

ParameterMeaning
divisorExpression interpreted as an unsigned 16-bit value, 1–65535.
cyclesExpression in the inclusive range 0–256.

Behavior

The first value is a raw controller divisor. The second controls the driver’s bounded transfer loop. Zero cycles performs no waveform-data iterations and is not interpreted as an infinite duration.

The transaction releases the shared controller afterwards. Values outside the accepted bounds cause status 35.

Example

10 SOUND 800,8
20 WAIT 8
30 SOUND 600,8
40 END

Limits and diagnostics

The arguments are not frequency in hertz and duration in milliseconds. No music-string PLAY command or calibrated pitch/duration API is implemented. Use RTC waits for nominal timing between operations.

Status-code reference.

See also

BEEP · WAIT · Language syntax