Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include "C8051F120.h"
- sbit LED=P1^6;
- long i;
- void Reset_Sources_Init()
- {
- WDTCN = 0xDE;
- WDTCN = 0xAD;
- }
- void Port_IO_Init()
- {
- SFRPAGE = CONFIG_PAGE;
- P1MDOUT = 0x40;
- XBR2 = 0x40;
- }
- void Init_Device(void)
- {
- Reset_Sources_Init();
- Port_IO_Init();
- }
- void main (void)
- {
- Init_Device();
- while(1)
- {
- LED =0;
- for (i =0; i<=196607;i++) {}
- LED = ~LED;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement