![]() |
MKM34Z256VLx7 Bare Metal Software Drivers
R4.1.6
Reference Manual
|
This example shows typical use of the Analog-to-Digital Converter (ADC) in 16-bit, software triggered single and polled conversion mode with internal 1.0V PMC bandgap voltage reference. The ADC module is clocked by 2.4 MHz ADC asynchronous clock source (ADLPC=1, ADHSC=0). The device enters into Very Low Power (VLPR) mode after main blocks such PMC, SIM and SMC modules are initialized. The ADC measures analogue voltage on the AD10 input channel - on the TWR-KM34Z75M board, the AD10 input channel is connected to a 5K potentiometer (R20).
The FreeMASTER communicates via UART2 that is configured for 38400/8-N-1 and serviced by the application software in a polling mode. When using TWR-KM34Z75M board, connect USB port of your PC to the on-board OpenSDA's USB to serial bridge (J27). The following FreeMASTER screenshot demonstrates time waveform of the ad10_value
variable, which reflects voltage changes on the AD10 input channel.
IAR EWARM 7.40.7 | KEIL uVision 5.15 | CrossWorks 3.6 | ATOLLIC TrueStudio 5.3.0 | Kinetis Design Studio 3.0.0 |
---|---|---|---|---|
♦ | ♦ | ♦ | ♦ | ♦ |