PicoMite: driving a passive buzzer


Author Message
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9940
Posted: 02:15pm 28 Nov 2022      

  Quote  Note that the manual (at least the version I have) says the duty for the PWM command is optional, though not the comma before it ... this does not seem to be true, you get a syntax error if no duty is supplied.


The manual is sort-of correct except that we don't have the syntax for the real situation which is that one of dutyA or dutyB is manadatory but it doesn't have to be dutyA like in other MMBasic versions. I think this is explained in the text of the latest version.

To drive the buzzer you really want to use an H bridge so that it sees +/- 5V