10 years, 9 months ago.

How to use digitalout to generate a nonperiodic waveform as shown in the photo below?

/media/uploads/Freddy/20130720_230647.jpg Is there anyone who can show me the specific code? Thank you !

1 Answer

10 years, 9 months ago.

Looks like you are shifting out a simple countervalue (0,1, 2,...15, 0,) A freq of 48 Mhz is pretty high for mbed to use a simple DigitalOut pin since it has has a clock of only (!) 96 MHz. Maybe you could look into the I2S serial output and prepare a set of values that you then move from memory to I2S using DMA.

Hello, thanks for you answer. But can you tell me why it's pretty high to generate a 48MHz with digitalout? Yeah, I see you said it's because it has a clock of 96MHz. But could you tell me the principle?

posted by Shenghao Feng 06 Aug 2013