First post here and I've looked through a lot of forum stuff and not found this one (yet).
I have an Uno and I've been doing some high speed bit bashing with some code off Adafruit. For performance reasons the code disables interrupts using cli()/sei() to wrap some digitalWrite() and delayMicroseconds() calls.
All has so far been well. I have been writing out to a pin using a table of on/off (write/delay) values. But this table has been stored in RAM and I have lots of them.
So I moved the tables to flash using the PROGMEM macro. I select a table from those stored and copy it to RAM using pg._read_word() calls. I checked the values and they look ok.
However, after this I then call my bit bashing function which seems to run much slower now. I'm not sure why. I'm done with the flash by this point. Indeed there after Serial.print seems very slow.
Any thoughts? All the data does indeed appear to be copied into RAM but still things seem slow. If I comment out the flash=>RAM copy function the code is fast as before.
Any help appreciated