Advertisement
artones

Untitled

Mar 23rd, 2021
1,638
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $NOMOD51
  2. $include (C8051F120.h)
  3. LED BIT P1.6;
  4. CSEG AT 0;
  5. LJMP MAIN;
  6. Reset_Sources_Init:
  7. mov WDTCN, #0DEh ;
  8. mov WDTCN, #0ADh
  9. ret
  10. Port_IO_Init:
  11. mov SFRPAGE, #CONFIG_PAGE ;
  12. mov P1MDOUT, #040h
  13. mov XBR2, #040h
  14. ret
  15. ; Initialization function for device,
  16. ; Call Init_Device from your main program
  17. Init_Device:
  18.     lcall Reset_Sources_Init
  19.     lcall Port_IO_Init
  20.     ret
  21. MAIN:
  22.     lcall Init_Device;
  23.     CLR LED;
  24.     mov R5, #00h;
  25.     LOOP:
  26.     mov R7, #03h;
  27.     DELAY:
  28.     mov R6, #00h;
  29.     LOOP1:
  30.     djnz R5,$;
  31.     djnz R6, LOOP1;
  32.     djnz R7, DELAY;
  33.     cpl LED;
  34.     sjmp LOOP;
  35.     End
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement