Good news so far, the direct port access will increase the pulse to 1,1MHz. So it is possible to speed up the arduino with the SDK and the usage of machine code. You cannot use the commands of the arduino SDK but you can use the native C language in the same way.
The code on the first page of this thread can be speed up if you change this parts.
The loop code does some delay, so the port IO speed can get up to 4MHz with inline code.
The warnings are clear: if you use direct port access and you switch the RS232 pin to an output the arduino is not usable anymore because the serial uploader is out of business

You need a external programer to clear the chip and you need the arduino uno bootloader as file to program it into the chip again. I do not have the bootloader for now but I think it is somewhere on the arduino page ...
An example for 4MHz on Pin13 speedup with own loop code:
- Code: Select all
void loop()
{
while(1==1)
{
PORTB =32;
PORTB = 0;
}
}
1,1MHz with direct port manipulation:
- Code: Select all
void loop()
{
PORTB =32;
PORTB = 0;
}
117kHz with the original arduino style:
- Code: Select all
void loop()
{
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
}
The goal is to stay with the arduino SDK because it can be easy used by anyone and it is well described.
If a answer is correct or did help you for a solution, please use the solve button.