9 years, 7 months ago.

What range of the ticker

Hi guys, thank you for taking care of my problem, my mbed board is LPC1768.

I am trying to create a digital filter so first of all I create a code followed by the PPT. /media/uploads/Oneoftherulingparty/360----20150413113933.jpg

But it cannot work. On the other hand, when I change the value of (s1kkhz_task,1) to 5, which means the sampling rate is from 1MHZ to 200kHZ, it works properly.

Could you pls tell me what has happened on?

Thanks a lot.

1 Answer

9 years, 7 months ago.

It may not be possible to read an analog input, convert it to a float, convert that float back to an integer and set the analog output to that value all in under 1us.

If you need something to run that fast you'll probably have to access the hardware directly and read and write CPU registers rather than going through the mbed wrapper.

http://developer.mbed.org/users/Sissors/code/FastAnalogIn/ may help a bit.

Accepted Answer

For reference, from teh board errata : FRDM - K64F Board Errata , Rev. 2.0 , 0 6 /2014 4 Freescale Semiconductor, Inc. 2 Errata Title : PTA0 is routed to Pin2 of J2 Description: Some Arduino shields are using Pin2 of J2 (connected to PTA0) as general purpose signal. The feature associated with Pin2 of J2 cannot be used while debugging.

posted by Martin Kojtal 13 Apr 2015