Advertisement
artones

Untitled

Mar 23rd, 2021
325
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.39 KB | None | 0 0
  1. #include <stdio.h>
  2. #include "C8051F120.h"
  3. sbit LED=P1^6;
  4. long i;
  5. void Reset_Sources_Init()
  6. {
  7. WDTCN = 0xDE;
  8. WDTCN = 0xAD;
  9. }
  10. void Port_IO_Init()
  11. {
  12. SFRPAGE = CONFIG_PAGE;
  13. P1MDOUT = 0x40;
  14. XBR2 = 0x40;
  15. }
  16. void Init_Device(void)
  17. {
  18. Reset_Sources_Init();
  19. Port_IO_Init();
  20. }
  21. void main (void)
  22.     {
  23.         Init_Device();
  24. while(1)
  25. {
  26.     LED =0;
  27. for (i =0; i<=196607;i++) {}
  28.     LED = ~LED;
  29.   }
  30.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement