digitalWriteFast does not appear to work on AVR4809
I included the library :
#include <digitalWriteFast.h>
The code snippet below toggles a Led:
void lightup()
{
for (int i = 0; i < 10; i++)
{
digitalWrite(ledpin, HIGH);
delay(500);
digitalWrite(ledpin, LOW);
delay(500);
}
But the code below does not
void lightup()
{
for (int i = 0; i < 10; i++)
{
digitalWriteFast(ledpin, HIGH);
delay(500);
digitalWriteFast(ledpin, LOW);
delay(500);
}
Perhaps I missed something?
Maybe different pin numbering scheme?
Ah yes, although i've included the Arduino library, the chip architecture is different. Thanks. :)
But looks still like AVR on Arduino it is
microchip.com/en-us/product/atmega4809
ATmega4809 is a microcontroller featuring the 8-bit AVR® processor with hardware multiplier - running at up to 20 MHz and with up to 48 KB Flash, 6 KB SRAM and 256 bytes of EEPROM in 48-pin packages. ...
How do you think is ledpin mapped to hardware?
looks like megacorex already has support for fast IO (digitalreadfast/ writefast) on this hardware family
https://github.com/MCUdude/MegaCoreX
Should be fixed now 😀