Hi everyone,
I'm performing an analog-to-digital conversion using the FRDM-K64F board, and I need it to be as fast as possible. I found a line in the user guide (http://cache.freescale.com/files/32bit/doc/user_guide/FRDMK64FUG.pdf ) that says the onboard ADC is capable of up to 500ns conversion time (see clipping below), but I haven't found any example code or instructions for how to achieve this. The fastest I've gotten, by poking around in the settings, is around 900ns. Can anyone help?
Thank you for your time,
Solved! Go to Solution.
Hi,Kathryn,
I think the description is correct, there is a trick to achieve about 2MSPS(2M sampling per second) for one analog channel. As you know that the K64F has two ADC module ADC0 and ADC1 module, both of ADC0 and ADC1 can be triggered by the same PDB module. As you said that the conversion time of both ADC0 and ADC1 is 1uS, if we connect an external analog signal to both ADC0 and ACC1 module. The PDB can trigger ADC0 and ADC1, for example, we set the PDB cycle time is 1000ns by setting the PDB_MOD=60 if the BUS CLOCK which drives the PDB module is 60MHz, we use PDB_CH0 channel to trigger ADC0, use PDB_CH1 to trigger ADC1, if we set the PDB_CH0Dly0 as 10, set the PDB_CH1Dly0 as 40, the external analog channel will be sampled twice during 1us cycle time by ADC0 and ADC1, so we can achieve 500ns sampling cycle time.
This is the instant for sampling:
0ns 0.5us 1us 1.5us 2us 2.5us ......
ADC0_sampling ADC1_sampling ADC0_sampling ADC1_sampling ADC0_sampling ADC1_sampling .........
Hope it can help you
BR
XiangJun Rong
Hi,Kathryn,
I think the description is correct, there is a trick to achieve about 2MSPS(2M sampling per second) for one analog channel. As you know that the K64F has two ADC module ADC0 and ADC1 module, both of ADC0 and ADC1 can be triggered by the same PDB module. As you said that the conversion time of both ADC0 and ADC1 is 1uS, if we connect an external analog signal to both ADC0 and ACC1 module. The PDB can trigger ADC0 and ADC1, for example, we set the PDB cycle time is 1000ns by setting the PDB_MOD=60 if the BUS CLOCK which drives the PDB module is 60MHz, we use PDB_CH0 channel to trigger ADC0, use PDB_CH1 to trigger ADC1, if we set the PDB_CH0Dly0 as 10, set the PDB_CH1Dly0 as 40, the external analog channel will be sampled twice during 1us cycle time by ADC0 and ADC1, so we can achieve 500ns sampling cycle time.
This is the instant for sampling:
0ns 0.5us 1us 1.5us 2us 2.5us ......
ADC0_sampling ADC1_sampling ADC0_sampling ADC1_sampling ADC0_sampling ADC1_sampling .........
Hope it can help you
BR
XiangJun Rong
Thanks!