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.
9 years, 9 months ago.
Can FastIO be used with the BusIn/Out structures
Hello, is it possible to use the FastIO technique with the BusOut pin structure?
I tried this
FastOut<D8> d8; FastOut<D9> d9; FastOut<D10> d10; BusOut BusFast(d8,d9,d10);
and got this error from the compiler
"Error: No instance of constructor "mbed::BusOut::BusOut" matches the argument list in "main.cpp".
I thought I was pushing my luck with this anyway but thought I'ld give it a try to speed up the refresh rate of Todor's TFTLCD library easily before I head down the path of direct port manipulation. I did look at the include file for my board but didn't see a way to alter it to use an array of pins, but I'll readily admit to not understanding direct pin/port manipulation on the ARM chips at anything above the concept level.
I tried variations on:
FastOut <BusFast>={d8,d9,d10}; but these wouldn't compile either.
Cheers
Mike
Question relating to:
1 Answer
9 years, 9 months ago.
BusOut and FastIO don't work together. It would be fairly straightforward to make a FastBus version of BusOut, I might do it, however two points: First of all you would still need to modify that library, since that would require that the BusOut part is modified to FastBus. Second point is that BusOut is by definition alot slower than PortOut, since PortOut writes the complete port value at once, while BusOut writes one pin at a time in a loop. Advantage of that is that you can make any pin combination into a BusOut, while PortOut is much more restricted.
Hello Eric,
yes afterwards I did consider using the busXXX library functions to create my own library by changing the digital pin definitions to fastpin definitions. I would like to use the portout library but there aren't enough pins of any one port for the 16 I need for the TFTLCD display so I'm making it up using most of the pins from the CN10 header. Although now thinking about it if I can find 8 pins from 2 ports I could use those to make up the 16 I need as the writes to the LCD are usually 8 bits of command and 8 bits of data, I'll have to look today.
Cheers
Mike
It would be nice to have a FastBusInOut :)
posted by Radu Radoveneanu 31 Mar 2015