Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <12f683.h>
- #fuses NOWDT
- #fuses MCLR
- #fuses NOBROWNOUT
- //#use delay(internal=8000000)
- #USE DELAY(INTERNAL=4000000)
- #define relay pin_A0
- #define boton pin_A1
- VOID MAIN()
- {
- output_low(relay);
- while(1){
- do{
- delay_ms(50);
- }while(input(pin_a1));
- output_high(relay);
- delay_ms(300);
- do{
- delay_ms(50);
- }while(input(pin_a1));
- output_low(relay);
- delay_ms(300);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement