Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $NOMOD51
- $include (C8051F120.h)
- LED BIT P1.6;
- CSEG AT 0;
- LJMP MAIN;
- Reset_Sources_Init:
- mov WDTCN, #0DEh ;
- mov WDTCN, #0ADh
- ret
- Port_IO_Init:
- mov SFRPAGE, #CONFIG_PAGE ;
- mov P1MDOUT, #040h
- mov XBR2, #040h
- ret
- ; Initialization function for device,
- ; Call Init_Device from your main program
- Init_Device:
- lcall Reset_Sources_Init
- lcall Port_IO_Init
- ret
- MAIN:
- lcall Init_Device;
- CLR LED;
- mov R5, #00h;
- LOOP:
- mov R7, #03h;
- DELAY:
- mov R6, #00h;
- LOOP1:
- djnz R5,$;
- djnz R6, LOOP1;
- djnz R7, DELAY;
- cpl LED;
- sjmp LOOP;
- End
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement