STM8 delay implementation of delay_us and delay_ms in Cosmic-C inline assembly. All delay done using inline macro _delay. Register X used as cycle counter, number of cycles per microsecond calculated by US and MS macros (decrement/branch lasts 3 CPU... Electronics Projects, STM8-bit BCD Cycle Delay and 1 Wire Library "arm project, microcontroller projects, " Date 2019/08/02