Sync work
This commit is contained in:
parent
efa5673e71
commit
cfff99eb68
7 changed files with 60 additions and 152 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue