User Tools

Site Tools

Sound Bytes

This application note will demonstrate a few examples that generate sound
with the Cubloc. Sound can be generated using the Cubloc's I/O port or
PWM channel. With a PWM channel, sounds of varying frequency can be
generated.

When using the PWM port for other purposes, the FreqOut command cannot
be used. To get around this limitation, any regular I/O port can be used to
create sound.
The following example shows how to make an alert sound with I/O port P4.
This program uses the Reverse and UDelay commands to alternate the I/O
port between logic-high and logic-low