nerdralph / picoCore

size-optimized Arduino/Wiring core for tiny AVR MCUs
MIT License
28 stars 4 forks source link

Support micros() #3

Open Kaspi314 opened 3 years ago

Kaspi314 commented 3 years ago

It seems like delayMicrosecond would go hand in hand with supporting the micros() function. (like millis())

I'm not sure how to do this but I'll try to look into the datasheet about timers.

nerdralph commented 3 years ago

While microsecond delays are often needed for implementing protocols, the need for a microsecond-accurate timer is quite rare. Therefore this would be a low priority.

Kaspi314 commented 3 years ago

Nothing comes to mind beyond laser range finding or something fast with a PID loop. I don't guess that the attiny is a great platform for it though and stm32 is more the norm for that. I guess milliseconds work well for most things especially with accuracy of 0.01 - 0.1ms.