Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include "C8051F120.h"
- sbit Sw=P3^7;
- sbit LED=P1^6;
- int i=0;
- 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(){
- Reset_Sources_Init();
- Port_IO_Init();
- Init_Device();
- while(1){
- LED=~Sw;
- }
- }
Add Comment
Please, Sign In to add comment