Programacionencmasmasmic

Solo disponible en BuenasTareas
  • Páginas : 3 (614 palabras )
  • Descarga(s) : 0
  • Publicado : 12 de noviembre de 2011
Leer documento completo
Vista previa del texto
#include
#include
__PIC16f84;
__PIC_CLK=4000000;
#define _XTAL_FREQ 4000000
main(){
TRISA=0;
TRISB=0;
PORTA=0;
PORTB=0;
__delay_ms(1000); // delay for 1000 instruction cyclesCLRWDT();
PORTB=1;
__delay_ms(1000); // delay for 1000 instruction cycles
CLRWDT();
PORTB=2;
__delay_ms(1000); // delay for 1000 instruction cycles
CLRWDT();
PORTB=3;__delay_ms(1000); // delay for 1000 instruction cycles
CLRWDT();
PORTB=4;
__delay_ms(1000); // delay for 1000 instruction cycles
CLRWDT();
PORTB=5;
__delay_ms(1000); // delayfor 1000 instruction cycles
CLRWDT();
PORTB=6;
__delay_ms(1000); // delay for 1000 instruction cycles
CLRWDT();
PORTB=7;
__delay_ms(1000); // delay for 1000 instruction cyclesCLRWDT();
PORTB=8;
__delay_ms(1000); // delay for 1000 instruction cycles
CLRWDT();
PORTB=9;

__delay_ms(1000); // delay for 1000 instruction cycles


PORTB=0;PORTA=1;

__delay_ms(1000); // delay for 1000 instruction cycles
CLRWDT();
PORTB=1;
__delay_ms(1000); // delay for 1000 instruction cycles
CLRWDT();
PORTB=2;__delay_ms(1000); // delay for 1000 instruction cycles
CLRWDT();
PORTB=3;
__delay_ms(1000); // delay for 1000 instruction cycles
CLRWDT();
PORTB=4;
__delay_ms(1000); // delay for 1000instruction cycles
CLRWDT();
PORTB=5;
__delay_ms(1000); // delay for 1000 instruction cycles
CLRWDT();
PORTB=6;
__delay_ms(1000); // delay for 1000 instruction cyclesCLRWDT();
PORTB=7;
__delay_ms(1000); // delay for 1000 instruction cycles
CLRWDT();
PORTB=8;
__delay_ms(1000); // delay for 1000 instruction cycles
CLRWDT();
PORTB=9;__delay_ms(1000); // delay for 1000 instruction cycles


PORTB=0;
PORTA=2;

__delay_ms(1000); // delay for 1000 instruction cycles
CLRWDT();
PORTB=1;
__delay_ms(1000); //...
tracking img