Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <18F4550.h>
- #fuses XTPLL,PLL1,CPUDIV1,PUT,NOBROWNOUT,NOVREGEN,NOWDT,NOPBADEN,MCLR,NOLVP,NODEBUG,NOPROTECT,NOCPD,USBDIV
- #use delay(clock=48000000)
- #byte porta=0xF80 // Dirección de los puertos A, B, C, D y E.
- #byte portb=0xF81
- #byte portc=0xF82
- #byte portd=0xF83
- #byte porte=0xF84
- void main() //Programa principal.
- {
- set_tris_d(0b00000000); // RD on LEDs.
- while(true); // Bucle infinito.
- {
- portd=0XFF; // Acende todos LEDs portD
- delay_ms(2000); // delay 2 secs
- portd=0; // Apaga todos LEDs portD
- delay_ms(2000); // delay 2 secs
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement