Closed rei-vilo closed 11 years ago
Do you have some details on cbi sbi and analogRead to set a fast reader too? In particular, about the prescaler setting, How I have to perform the settings for a specific value?
@cosmok82
This is an issue tracker, not a discussion forum.
The issue is solely about digitalWrite()
, not analogRead()
.
For discussion, please consider the thread http://forum.stellarisiti.com/topic/650-stellarpad-sbi-sbi-46x-faster-digitalwrite/ at the Stellarisiti forum.
Could you read the use of cbi sbi here bit.ly/10KmoiD ? If I'm not mistaken the use made of it is to read an analog signal and not to write one! But I'm not very expert in AVR code (in case of arduino's specifics... especially as written in the xoscillo code), I could be wrong.
See #256
sbi()
andsbi()
are 4.6x faster thandigitalWrite()
on the LaunchPad Stellaris.Is there a way to improve the implementation of
digitalWrite()
?Results are:
Stellaris on embedXcode
Stellaris on Energia
sbi()
andsbi()
require functions that are not implemented with the MSP430, namelyportBASERegister
andGPIOPinWrite
.The measures were provided by the following basic sketch, compiled with Energia or embedXcode: