Gemalto is now part of the Thales Group, find out more.

# EHS5 PWM to drive a buzzer - Frequency Selection - AT^SWDAC | Thales IoT Developer Community

May 21, 2014 - 8:13pm, 4281 views

The AT command AT^SWDAC allows the EHS5 to produce a PWM wave on GPIO6 or GPIO7. The command only provides a limited selection of 6 frequencies as follows: 0 400 Hz (accuracy of 1 percentage step) 1 1000 Hz (accuracy of 3 percentage steps) 2 8,125 Hz (accuracy of 1 percentage step) 3 16,250 Hz (accuracy of 1 percentage step) 4 32,500 Hz (accuracy of 1 percentage step) 5 65,000 Hz (accuracy of 2 percentage steps) For my application, I write short "songs" from a series of different notes (defined by frequency and time). I use a slew of different frequencies to do this and my current microcontroller allows me to do so. It is possible to recreate this application using the PWM onboard the EHS5? For example I pulse a piezo buzzer as follows to play a short song: playsong{ 2500 Hz for 100 ms delay 100 ms 6000 Hz for 100 ms delay 100 ms 5000 Hz for 100 ms delay 100 ms } Thanks!