Hardware requirements
Mini/micro USB cable
FRDM-K32L2A4S board
Personal Computer
Board settings
Connect J4-11(PTE30/DAC_OUT) to J4-2 (PTB0/ADC0_SE8)
Prepare the Demo
Connect a USB cable between the host PC and the OpenSDA USB port on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
This following section shows how to run the demo:
DAC ADC Demo!
ADC Full Range: XXXX
Press any key to start demo.
Demo begin...
ADC16_DoAutoCalibration() Done.
Select DAC output level:
1. 1.0 V
2. 1.5 V
3. 2.0 V
4. 2.5 V
5. 3.0 V
-->3
ADC Value: 2481
ADC Voltage: 1.999
What next?:
1. Test another DAC output value.
2. Terminate demo.
-->
At this point, the user can test another DAC output value or terminate the demo.
This configuration exhibits up to 2% error when reading back voltage.