Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
Hi all,
It's great to see the mbed libraries are improving all of the time and the DigitalIn I/O libraries benefitted from a speed up a little while ago (http://mbed.org/blog/entry/135/). My project is moving on slowly and I have run into a problem because Digital I/O is too fast so I have to add a couple of wait_us(1) lines to slow things down. Here's my code with the extra wait_us(1) lines in bold text:
I have my mbed connected to BDM connections in my car's ECU which is 16.78 MHz, the BDM connection can work at up to half that speed so the ideally my loop should repeat at about 8 MHz. Everything works fine with the wait lines though then the speed is just 0.5 MHz (?). If I take the wait_us(1); lines out then it's too fast and doesn't work properly. I'd like to be able to select inbetween speeds if possible. Is there a way of waiting with smaller steps than 1us?
Thanks in advance,
Sophie x