OpenMarine

Full Version: Why are 16 _nop_() used for the 5us delay in the MCU control bmp180 sensor program?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Dear all,
The procedure for bmp180 control is as follows:
void Delay5us()
{
_nop_();_nop_();_nop_();_nop_();
_nop_();_nop_();_nop_();_nop_();
_nop_();_nop_();_nop_();_nop_();
_nop_();_nop_();_nop_();_nop_();
}
11.0592mhz crystal oscillator
 Shouldn't one _nop() shouldn't be a machine cycle, now it is 1.085us under the crystal oscillator?

Hope to explain why this 5us delay uses 16 nop
Note: the microcontroller I used is stc89c52rc and referred tobmp180 datasheet.
Thank you very much!
K