Thales IoT Developer Community
How to use Digital-Analog converter
Showcase, December 16, 2016 - 12:17pm, 2081 views
Gemalto Java modules offer built-in Digital/Analog converter (DAC). It may be particularly useful to control some peripherals which does not provide any other API than pure analog lines. In this simple example we are showing how DAC can be used to drive an external buzzer.
- We have used pure ConceptBoard with the danger shield V1 (e.g. http://wiki.seeedstudio.com/wiki/Danger_Shield_Complete_Kits)
- It is enough to use simple piezzo electric buzzer (e.g. http://eu.mouser.com/search/ProductDetail.aspx?R=254-PB507-ROX) and connect to module's DAC line. On ConceptBoard it will be GPIO6.
- Since GPIO6 may be used both for GPIO and for DAC converter, if we would like to use it with DAC we need to make sure that the following setting is set in SCFG command: ^SCFG: "Gpio/mode/PWM","std". We can check it by sending "AT^SCFG?" command. Keep in mind, that when changing this parameter, module needs to be rebooted, before the new setting will be valid.