Пн ноя 14, 2022 12:46:22
movlw 0.173
movwf Reg1
movlw 0.19
movwf Reg2
movlw 0.6
movwf Reg3
decfsz Reg1,1
goto $-1
decfsz Reg2,1
goto $-3
decfsz Reg3,1
goto $-5
Пн ноя 14, 2022 13:34:22
decfsz Reg1,1
goto $-1
Пн ноя 14, 2022 14:02:41
Пн ноя 14, 2022 15:45:32
Пн ноя 14, 2022 15:54:33
If Program Counter (PC) is modified or a conditional test is true, the instruction requires two cycles. The second cycle is
executed as a NOP.
Пн ноя 14, 2022 16:22:09
Пн ноя 14, 2022 16:51:23
Пн ноя 14, 2022 17:12:14
Пн ноя 14, 2022 17:27:58
Ср ноя 23, 2022 18:17:22
Ср ноя 23, 2022 18:59:22
Чт ноя 24, 2022 04:20:13
Чт ноя 24, 2022 09:10:27
#if XTAL_FREQ >= 12MHZ
// x <= 750 for 4mHz
#define DelayUs(x) { unsigned char _dcnt; \
_dcnt = (x) * ((XTAL_FREQ) / (12MHZ)); \
while(--_dcnt != 0) \
continue; }
#else
#define DelayUs(x) { unsigned char _dcnt; \
_dcnt = (x) / ((12MHZ) / (XTAL_FREQ)) | 1; \
while(--_dcnt != 0) \
continue; }
#endif
#include "delay.h"
void DelayMs(unsigned char cnt)
{
#if XTAL_FREQ <= 2MHZ
do {
DelayUs(996);
} while(--cnt);
#endif
#if XTAL_FREQ > 2MHZ
unsigned char i;
do {
i = 4;
do {
DelayUs(250);
} while(--i);
} while(--cnt);
#endif
}
Чт ноя 24, 2022 10:07:16