lilzz wrote:delay(100)
that means delaying 100ms.
where does it calibrated such each unit is equivalent to 1ms? not 1us . I can't find anywhere in code.
DOes this relate to crystal or system clock(for example, 16Mhz)? or instruction cycle period?
Assuming this is the wiringPi delay() function...
It's not calibrated as such, it's designed to delay in increments of 1mS. See:
http://wiringpi.com/reference/timing/
It uses standard Linux system calls to achieve the delay so the exact underlying mechanism is not always obvious. The only thing you can guarantee is that the delay will be at least the number of mS you give, it might be longer but will never be shorter.
If you want to delay by a number of microseconds, then use delayMicroseconds().
-Gordon