Sync work

This commit is contained in:
Jochen Friedrich 2025-01-13 08:50:18 +01:00
parent efa5673e71
commit cfff99eb68
7 changed files with 60 additions and 152 deletions

View file

@ -13,15 +13,12 @@
#include <nuvoton/functions.h>
#include <nuvoton/N76E003.h>
#include <nuvoton/Common.h>
#include <nuvoton/Delay.h>
#include <nuvoton/SFR_Macro.h>
// 16Mhz clock
#define CLOCK 16000000L
// Divide by 12
#define T0CLOCK ((CLOCK)/12L)
// Per milisecond
#define T0_1MS ((T0CLOCK)/1000L)
#define T0_1MS ((CLOCK)/1000L)
static void msdelay(unsigned long int count)
{
@ -62,14 +59,14 @@ void main() {
P01 = 0;
P13 = 0;
msdelay(500);
P01 = 0;
P01 = 1;
P13 = 0;
msdelay(500);
P01 = 0;
P13 = 0;
P13 = 1;
msdelay(500);
P01 = 0;
P13 = 0;
P01 = 1;
P13 = 1;
msdelay(500);
}
}

View file

@ -1 +1 @@
sdcc -mmcs51 -o blink_raw.ihx blink_raw.c -D FOSC_160000 -I../include
sdcc-sdcc -mmcs51 -o blink_raw.ihx blink_raw.c -D FOSC_160000 -I../include