Está en la página 1de 1

4- PROGRAMAS

1. Desplegar el siguiente patrn 10100101, por el portb


2. Encender y apagar los Leds conectados al PA.4 y PB.4 continuamente
3. Leer un dato del PORTA y mostrarlo por el PORTB

Los programas se realizaran en MikroC:

1) 2) 3)
void main() void main() void main()
{ { {
PORTB; PORTA; PORTA;
TRISB = 0; TRISA = 0; TRISA = 31;
{ PORTB; PORTB;
PORTB = 165; TRISB = 0; TRISB = 0;
} { {
} PORTA = 16; PORTA = PORTB
//Delay(500) }
PORTA = 0; }
}
{
PORTB = 16;
//Delay(500)
PORTB = 0;
}
}

También podría gustarte