Código-fonte
Autor: GEDAI | Publicado: 2009-11-05T11:54:00-03:00

Eis o código-fonte, com comentários.
Tem muita coisa comentada em baixo, pois foram feitos vários testes. Para achar um tempo legal para a apresentação, que foi realizada com a bicicleta parada, foram feitos testes empíricos.



#include &lt;16F628A.h&gt;
#include 




#use delay(clock=4000000)
#fuses INTRC_IO &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//internal RC oscilator, sem CLKOUT
#fuses NOWDT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//no watchdog timer -&gt; reinicia quando da erro
#fuses NOBROWNOUT &nbsp; &nbsp; &nbsp; //sem brownout -&gt; reseta quando eh detectado brownout (?)
#fuses NOMCLR &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//pino MasterClear (reset externo) usado para I/O
#fuses PUT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //Power up timer


#define TEMPO 10


void main () {
&nbsp;&nbsp; int i, j, b;
&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp; while (1) {
&nbsp;&nbsp;
&nbsp;&nbsp; &nbsp; &nbsp;// PADRAO 01: somente verdes
&nbsp;&nbsp; &nbsp; &nbsp;output_b(0b10000000);
&nbsp;&nbsp; &nbsp; &nbsp;delay_ms(500);
&nbsp;&nbsp; &nbsp; &nbsp;output_b(0b00000000);
&nbsp;&nbsp; &nbsp; &nbsp;delay_ms(10);
&nbsp;&nbsp; &nbsp; &nbsp;output_b(0b10100000);
&nbsp;&nbsp; &nbsp; &nbsp;delay_ms(300);
&nbsp;&nbsp; &nbsp; &nbsp;output_b(0b00000000);
&nbsp;&nbsp; &nbsp; &nbsp;delay_ms(10);
&nbsp;&nbsp; &nbsp; &nbsp;output_b(0b10101000);
&nbsp;&nbsp; &nbsp; &nbsp;delay_ms(300);
&nbsp;&nbsp; &nbsp; &nbsp;output_b(0b00000000);
&nbsp;&nbsp; &nbsp; &nbsp;delay_ms(10);
&nbsp;&nbsp; &nbsp; &nbsp;output_b(0b10101010);
&nbsp;&nbsp; &nbsp; &nbsp;delay_ms(300);
&nbsp;&nbsp; &nbsp; &nbsp;output_b(0b00000000);
&nbsp;&nbsp; &nbsp; &nbsp;delay_ms(10);
&nbsp;&nbsp; &nbsp; &nbsp;for (i=0; i&lt;100; i++) {
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b10101010);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(50);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b00000000);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(50);
&nbsp;&nbsp; &nbsp; &nbsp;}
&nbsp;&nbsp; &nbsp; &nbsp;
&nbsp;&nbsp; &nbsp; &nbsp;// PADRAO 01: somente vermelhos
&nbsp;&nbsp; &nbsp; &nbsp;output_b(0b01000000);
&nbsp;&nbsp; &nbsp; &nbsp;delay_ms(500);
&nbsp;&nbsp; &nbsp; &nbsp;output_b(0b00000000);
&nbsp;&nbsp; &nbsp; &nbsp;delay_ms(10);
&nbsp;&nbsp; &nbsp; &nbsp;output_b(0b01010000);
&nbsp;&nbsp; &nbsp; &nbsp;delay_ms(300);
&nbsp;&nbsp; &nbsp; &nbsp;output_b(0b00000000);
&nbsp;&nbsp; &nbsp; &nbsp;delay_ms(10);
&nbsp;&nbsp; &nbsp; &nbsp;output_b(0b01010100);
&nbsp;&nbsp; &nbsp; &nbsp;delay_ms(300);
&nbsp;&nbsp; &nbsp; &nbsp;output_b(0b00000000);
&nbsp;&nbsp; &nbsp; &nbsp;delay_ms(10);
&nbsp;&nbsp; &nbsp; &nbsp;output_b(0b01010101);
&nbsp;&nbsp; &nbsp; &nbsp;delay_ms(300);
&nbsp;&nbsp; &nbsp; &nbsp;output_b(0b00000000);
&nbsp;&nbsp; &nbsp; &nbsp;delay_ms(10);
&nbsp;&nbsp; &nbsp; &nbsp;for (i=0; i&lt;30; i++) {
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b01010101);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(50);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b00000000);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(50);
&nbsp;&nbsp; &nbsp; &nbsp;}
&nbsp;&nbsp; &nbsp; &nbsp;
&nbsp;&nbsp; &nbsp; &nbsp;// TUDO JUNTO
&nbsp;&nbsp; &nbsp; &nbsp;output_b(0b10000000);
&nbsp;&nbsp; &nbsp; &nbsp;delay_ms(30);
&nbsp;&nbsp; &nbsp; &nbsp;output_b(0b00000000);
&nbsp;&nbsp; &nbsp; &nbsp;delay_ms(10);
&nbsp;&nbsp; &nbsp; &nbsp;output_b(0b11000000);
&nbsp;&nbsp; &nbsp; &nbsp;delay_ms(30);
&nbsp;&nbsp; &nbsp; &nbsp;output_b(0b00000000);
&nbsp;&nbsp; &nbsp; &nbsp;delay_ms(10);
&nbsp;&nbsp; &nbsp; &nbsp;output_b(0b11100000);
&nbsp;&nbsp; &nbsp; &nbsp;delay_ms(30);
&nbsp;&nbsp; &nbsp; &nbsp;output_b(0b00000000);
&nbsp;&nbsp; &nbsp; &nbsp;delay_ms(10);
&nbsp;&nbsp; &nbsp; &nbsp;output_b(0b11110000);
&nbsp;&nbsp; &nbsp; &nbsp;delay_ms(30);
&nbsp;&nbsp; &nbsp; &nbsp;output_b(0b00000000);
&nbsp;&nbsp; &nbsp; &nbsp;delay_ms(10);
&nbsp;&nbsp; &nbsp; &nbsp;output_b(0b11111000);
&nbsp;&nbsp; &nbsp; &nbsp;delay_ms(30);
&nbsp;&nbsp; &nbsp; &nbsp;output_b(0b00000000);
&nbsp;&nbsp; &nbsp; &nbsp;delay_ms(10);
&nbsp;&nbsp; &nbsp; &nbsp;output_b(0b11111100);
&nbsp;&nbsp; &nbsp; &nbsp;delay_ms(30);
&nbsp;&nbsp; &nbsp; &nbsp;output_b(0b00000000);
&nbsp;&nbsp; &nbsp; &nbsp;delay_ms(10);
&nbsp;&nbsp; &nbsp; &nbsp;output_b(0b11111110);
&nbsp;&nbsp; &nbsp; &nbsp;delay_ms(30);
&nbsp;&nbsp; &nbsp; &nbsp;output_b(0b00000000);
&nbsp;&nbsp; &nbsp; &nbsp;delay_ms(10);
&nbsp;&nbsp; &nbsp; &nbsp;output_b(0b11111111);
&nbsp;&nbsp; &nbsp; &nbsp;delay_ms(30);
&nbsp;&nbsp; &nbsp; &nbsp;output_b(0b00000000);
&nbsp;&nbsp; &nbsp; &nbsp;delay_ms(10);
&nbsp;&nbsp; &nbsp; &nbsp;
&nbsp;&nbsp; &nbsp; &nbsp;for (j=0; j&lt;30; j++) {
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b11111111);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(50);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b00000000);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(50);
&nbsp;&nbsp; &nbsp; &nbsp;}
&nbsp;&nbsp; &nbsp; &nbsp;
&nbsp;&nbsp; &nbsp; &nbsp;output_b(0b00000000);
&nbsp;&nbsp; &nbsp; &nbsp;delay_ms(500);
&nbsp;&nbsp; &nbsp; &nbsp;// PADRAO 02: cima pra baixo, baixo pra cima
&nbsp;&nbsp; &nbsp; &nbsp;for (j=0; j&lt;100; j++) {
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b10000001);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(30);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b01000010);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(30);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b00100100);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(30);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b00011000);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(30);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b00100100);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(30);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b01000010);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(30);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b10000001);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(30);
&nbsp;&nbsp; &nbsp; &nbsp;}
&nbsp;&nbsp; &nbsp; &nbsp;
&nbsp;&nbsp; &nbsp; &nbsp;output_b(0b00000000);
&nbsp;&nbsp; &nbsp; &nbsp;delay_ms(500);
&nbsp;&nbsp; &nbsp; &nbsp;// PADRAO 03: acende tudo, apaga de onde parou
&nbsp;&nbsp; &nbsp; &nbsp;for (j=0; j&lt;30; j++) {
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b10000000);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(20);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b11000000);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(20);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b11100000);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(20);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b11110000);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(20);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b11111000);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(20);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b11111100);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(20);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b11111110);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(20);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b11111111);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(20);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b01111111);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(20);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b00111111);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(20);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b00011111);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(20);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b00001111);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(20);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b00000111);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(20);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b00000011);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(20);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b00000001);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(20);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b00000000);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(20);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b00000001);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(20);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b00000011);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(20);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b00000111);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(20);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b00001111);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(20);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b00011111);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(20);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b00111111);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(20);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b01111111);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(20);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b11111111);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(20);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b11111110);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(20);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b11111100);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(20);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b11111000);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(20);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b11110000);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(20);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b11100000);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(20);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b11000000);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(20);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b10000000);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(20);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b00000000);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(20);
&nbsp;&nbsp; &nbsp; &nbsp;}
&nbsp;&nbsp; &nbsp; &nbsp;
&nbsp;&nbsp; &nbsp; &nbsp;
&nbsp;&nbsp; &nbsp; &nbsp;output_b(0b00000000);
&nbsp;&nbsp; &nbsp; &nbsp;delay_ms(500);
&nbsp;&nbsp; &nbsp; &nbsp;
&nbsp;&nbsp; &nbsp; &nbsp;
&nbsp;&nbsp; &nbsp; &nbsp;
&nbsp;&nbsp; &nbsp; &nbsp;// PADRAO 04: calota
&nbsp;&nbsp; &nbsp; &nbsp;for (j=0; j&lt;150; j++) {
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b11111111);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(2);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b10000000);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(10);
&nbsp;&nbsp; &nbsp; &nbsp;}
&nbsp;&nbsp; &nbsp; &nbsp;// PADRAO 04: calota DOIS
&nbsp;&nbsp; &nbsp; &nbsp;for (j=0; j&lt;150; j++) {
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b11111111);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(2);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b00000001);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(10);
&nbsp;&nbsp; &nbsp; &nbsp;}
&nbsp;&nbsp; &nbsp; &nbsp;// OS DOIS
&nbsp;&nbsp; &nbsp; &nbsp;for (j=0; j&lt;150; j++) {
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b11111111);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(2);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b10000001);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(10);
&nbsp;&nbsp; &nbsp; &nbsp;}
&nbsp;&nbsp; &nbsp; &nbsp;
&nbsp;&nbsp; &nbsp; &nbsp;
&nbsp;&nbsp; &nbsp; &nbsp;/*
&nbsp;&nbsp; &nbsp; &nbsp;output_b(0b00000000);
&nbsp;&nbsp; &nbsp; &nbsp;delay_ms(500);
&nbsp;&nbsp; &nbsp; &nbsp;// PADRAO 05: raios
&nbsp;&nbsp; &nbsp; &nbsp;for(j=0; j&lt;200; j++) {
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b10000010);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(4);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b00000100);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(4);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b00100001);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(4);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b00001000);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(4);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b00100001);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(4);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b00000000);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(10);
&nbsp;&nbsp; &nbsp; &nbsp;}
&nbsp;&nbsp; &nbsp; &nbsp;
&nbsp;&nbsp; &nbsp; &nbsp;output_b(0b00000000);
&nbsp;&nbsp; &nbsp; &nbsp;delay_ms(500);
&nbsp;&nbsp; &nbsp; &nbsp;// PADRAO 05: raios &nbsp; &nbsp; &nbsp; &nbsp;DOIS
&nbsp;&nbsp; &nbsp; &nbsp;for(j=0; j&lt;200; j++) {
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b10000010);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(2);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b00000100);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(2);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b00100001);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(2);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b00001000);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(2);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b00100001);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(2);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b00000000);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(10);
&nbsp;&nbsp; &nbsp; &nbsp;}
&nbsp;&nbsp; &nbsp;*/
&nbsp;&nbsp; &nbsp;
&nbsp;&nbsp; &nbsp;/*
&nbsp;&nbsp; &nbsp;DOIS LIGADOS &nbsp;1 1
&nbsp;&nbsp; &nbsp;10
&nbsp;&nbsp; &nbsp;meio 0 (depois de 4 ms)
&nbsp;&nbsp; &nbsp;10
&nbsp;&nbsp; &nbsp;primeiro 1 meio 1
&nbsp;&nbsp; &nbsp;10
&nbsp;&nbsp; &nbsp;meio 0
&nbsp;&nbsp; &nbsp;10
&nbsp;&nbsp; &nbsp;primeiro 0 meio 1
&nbsp;&nbsp; &nbsp;10
&nbsp;&nbsp; &nbsp;meio 0
&nbsp;&nbsp; &nbsp;10
&nbsp;&nbsp; &nbsp;primeiro 1 meio 1
&nbsp;&nbsp; &nbsp;10
&nbsp;&nbsp; &nbsp;meio 0
&nbsp;&nbsp; &nbsp;10
&nbsp;&nbsp; &nbsp;primeiro 0 meio 1
&nbsp;&nbsp; &nbsp;10
&nbsp;&nbsp; &nbsp;meio 0
&nbsp;&nbsp; &nbsp;10
&nbsp;&nbsp; &nbsp;primeiro 1 meio 1
&nbsp;&nbsp; &nbsp;
&nbsp;&nbsp; &nbsp;11
&nbsp;&nbsp; &nbsp;
&nbsp;&nbsp; &nbsp;10
&nbsp;&nbsp; &nbsp;11
&nbsp;&nbsp; &nbsp;10
&nbsp;&nbsp; &nbsp;01
&nbsp;&nbsp; &nbsp;
&nbsp;&nbsp; &nbsp;10
&nbsp;&nbsp; &nbsp;11
&nbsp;&nbsp; &nbsp;10
&nbsp;&nbsp; &nbsp;01
&nbsp;&nbsp; &nbsp;*/
&nbsp;&nbsp; &nbsp;
&nbsp;&nbsp; &nbsp; &nbsp;output_b(0b00000000);
&nbsp;&nbsp; &nbsp; &nbsp;delay_ms(500);
&nbsp;&nbsp; &nbsp; &nbsp;// PADRAO 06: carro de ré
&nbsp;&nbsp; &nbsp; &nbsp;output_b(0b10000100);
&nbsp;&nbsp; &nbsp; &nbsp;for (j=0; j&lt;200; j++) {
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b10000000);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(10);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b10000100);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(10);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b10000000);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(10);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b00000100);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(10);
&nbsp;&nbsp; &nbsp; &nbsp;}
&nbsp;&nbsp; &nbsp; &nbsp;
&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp; &nbsp; &nbsp;output_b(0b00000000);
&nbsp;&nbsp; &nbsp; &nbsp;delay_ms(500);
&nbsp;&nbsp; &nbsp; &nbsp;// PADRAO 07: PALITINHO NO POLICHINELOO!!!
&nbsp;&nbsp; &nbsp; &nbsp;for (j=0; j&lt;300; j++) {
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b01000000); // boneco parado
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(3);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b11101101);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(3);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b11111111);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(3);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b11101101);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(3);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b01000000);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(3);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b00000000);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(4);
&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b00100000); //boneco pulando
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(3);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b01010001);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(3);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b11100010);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(3);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b11111100);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(3);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b11100010);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(3);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b01010001);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(3);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b00100000);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b00000000);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(4);
&nbsp;&nbsp; &nbsp; &nbsp;}
&nbsp;&nbsp; &nbsp; &nbsp;/*
&nbsp;&nbsp; &nbsp; &nbsp;output_b(0b00000000);
&nbsp;&nbsp; &nbsp; &nbsp;delay_ms(500);
&nbsp;&nbsp; &nbsp; &nbsp;// PADRAO 07: PALITINHO NO POLICHINELOO!!! &nbsp; &nbsp; &nbsp;DOIS
&nbsp;&nbsp; &nbsp; &nbsp;for (j=0; j&lt;200; j++) {
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b01000000); // boneco parado
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(1);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b11101101);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(1);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b11111111);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(1);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b11101101);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(1);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b01000000);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(1);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b00000000);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(4);
&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b00100000); //boneco pulando
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(1);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b01010001);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(1);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b11100010);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(1);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b11111100);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(1);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b11100010);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(1);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b01010001);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(1);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b00100000);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b00000000);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(4);
&nbsp;&nbsp; &nbsp; &nbsp;}
&nbsp;&nbsp; &nbsp; &nbsp;
&nbsp;&nbsp; &nbsp; &nbsp;output_b(0b00000000);
&nbsp;&nbsp; &nbsp; &nbsp;delay_ms(500);
&nbsp;&nbsp; &nbsp; &nbsp;// PADRAO 07: PALITINHO NO POLICHINELOO!!! &nbsp; &nbsp; &nbsp;DOIS
&nbsp;&nbsp; &nbsp; &nbsp;for (j=0; j&lt;200; j++) {
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b01000000); // boneco parado
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(2);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b11101101);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(2);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b11111111);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(2);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b11101101);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(2);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b01000000);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(2);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b00000000);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(8);
&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b00100000); //boneco pulando
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(2);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b01010001);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(2);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b11100010);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(2);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b11111100);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(2);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b11100010);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(2);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b01010001);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(2);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b00100000);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b00000000);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(8);
&nbsp;&nbsp; &nbsp; &nbsp;}
&nbsp;&nbsp; */
&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp; &nbsp; &nbsp;output_b(0b00000000);
&nbsp;&nbsp; &nbsp; &nbsp;delay_ms(500);
&nbsp;&nbsp; }
}


/*
void main() {
&nbsp;&nbsp; int i;
&nbsp;&nbsp; while (1) {


&nbsp;&nbsp; &nbsp; &nbsp;for (i=0; i&lt;5; i++) {
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(tab_U[i]);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; delay_ms(TEMPO);
&nbsp;&nbsp; &nbsp; &nbsp;}
&nbsp;&nbsp; &nbsp; &nbsp;output_b(0b00000000);
&nbsp;&nbsp; &nbsp; &nbsp;delay_ms(TEMPO);




&nbsp;&nbsp; &nbsp; &nbsp;output_high(PIN_B0);
&nbsp;&nbsp; &nbsp; &nbsp;delay_ms(250);
&nbsp;&nbsp; &nbsp; &nbsp;
&nbsp;&nbsp; &nbsp; &nbsp;output_high(PIN_B1);
&nbsp;&nbsp; &nbsp; &nbsp;delay_ms(250);
&nbsp;&nbsp; &nbsp; &nbsp;
&nbsp;&nbsp; &nbsp; &nbsp;output_high(PIN_B2);
&nbsp;&nbsp; &nbsp; &nbsp;delay_ms(250);
&nbsp;&nbsp; &nbsp; &nbsp;
&nbsp;&nbsp; &nbsp; &nbsp;output_high(PIN_B3);
&nbsp;&nbsp; &nbsp; &nbsp;delay_ms(250);
&nbsp;&nbsp; &nbsp; &nbsp;
&nbsp;&nbsp; &nbsp; &nbsp;output_high(PIN_B4);
&nbsp;&nbsp; &nbsp; &nbsp;delay_ms(250);
&nbsp;&nbsp; &nbsp; &nbsp;
&nbsp;&nbsp; &nbsp; &nbsp;output_high(PIN_B5);
&nbsp;&nbsp; &nbsp; &nbsp;delay_ms(250);
&nbsp;&nbsp; &nbsp; &nbsp;
&nbsp;&nbsp; &nbsp; &nbsp;output_high(PIN_B6);
&nbsp;&nbsp; &nbsp; &nbsp;delay_ms(250);
&nbsp;&nbsp; &nbsp; &nbsp;
&nbsp;&nbsp; &nbsp; &nbsp;output_high(PIN_B7);
&nbsp;&nbsp; &nbsp; &nbsp;delay_ms(250);
&nbsp;&nbsp; &nbsp; &nbsp;output_B(0);
&nbsp;&nbsp; &nbsp; &nbsp;delay_ms(250);
&nbsp;&nbsp; }
}
*/




/*
void main() {
&nbsp;&nbsp; while (1) {
&nbsp;&nbsp; &nbsp; &nbsp;output_high(PIN_B0);
&nbsp;&nbsp; &nbsp; &nbsp;output_low(PIN_B1);
&nbsp;&nbsp; &nbsp; &nbsp;output_high(PIN_B2);
&nbsp;&nbsp; &nbsp; &nbsp;output_low(PIN_B3);
&nbsp;&nbsp; &nbsp; &nbsp;output_high(PIN_B4);
&nbsp;&nbsp; &nbsp; &nbsp;output_low(PIN_B5);
&nbsp;&nbsp; &nbsp; &nbsp;output_high(PIN_B6);
&nbsp;&nbsp; &nbsp; &nbsp;output_low(PIN_B7);
&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp; &nbsp; &nbsp;delay_ms(300);
&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp; &nbsp; &nbsp;output_low(PIN_B0);
&nbsp;&nbsp; &nbsp; &nbsp;output_high(PIN_B1);
&nbsp;&nbsp; &nbsp; &nbsp;output_low(PIN_B2);
&nbsp;&nbsp; &nbsp; &nbsp;output_high(PIN_B3);
&nbsp;&nbsp; &nbsp; &nbsp;output_low(PIN_B4);
&nbsp;&nbsp; &nbsp; &nbsp;output_high(PIN_B5);
&nbsp;&nbsp; &nbsp; &nbsp;output_low(PIN_B6);
&nbsp;&nbsp; &nbsp; &nbsp;output_high(PIN_B7);


&nbsp;&nbsp; &nbsp; &nbsp;delay_ms(300);
&nbsp;&nbsp; }
}
*/
/*


void main() {
&nbsp;&nbsp; output_a(0);
&nbsp;&nbsp; output_b(0);
&nbsp;&nbsp; output_high(PIN_A2);
}


*/
/*
#define TEMPO 10


void main() {
&nbsp;&nbsp; int i, j;
&nbsp;&nbsp; char frase[] = "UNIFACS";


&nbsp;&nbsp; for (j=0; j


&nbsp;&nbsp; &nbsp; &nbsp;if (frase[j] =='A')
&nbsp;&nbsp; &nbsp; &nbsp;{
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; for (i=0; i&lt;5; i++)
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; {
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;output_b (tab_A[i]);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;delay_ms(TEMPO);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp;&nbsp; &nbsp; &nbsp;}


&nbsp;&nbsp; &nbsp; &nbsp;if (frase[j]=='B')
&nbsp;&nbsp; &nbsp; &nbsp;{
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; for (i=0; i&lt;5; i++)
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; {
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;output_b (tab_B[i]);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;delay_ms(TEMPO);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp;&nbsp; &nbsp; &nbsp;break;
&nbsp;&nbsp; &nbsp; &nbsp;}


&nbsp;&nbsp; &nbsp; &nbsp;if (frase[j]=='C')
&nbsp;&nbsp; &nbsp; &nbsp;{
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; for (i=0; i&lt;5; i++)
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; {
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;output_b (tab_C[i]);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;delay_ms(TEMPO);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp;&nbsp; &nbsp; &nbsp;break;
&nbsp;&nbsp; &nbsp; &nbsp;}


&nbsp;&nbsp; &nbsp; &nbsp;if (frase[j]=='D')
&nbsp;&nbsp; &nbsp; &nbsp;{
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; for (i=0; i&lt;5; i++)
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; {
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;output_b (tab_D[i]);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;delay_ms(TEMPO);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp;&nbsp; &nbsp; &nbsp;break;
&nbsp;&nbsp; &nbsp; &nbsp;}


&nbsp;&nbsp; &nbsp; &nbsp;if (frase[j]=='E')
&nbsp;&nbsp; &nbsp; &nbsp;{
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; for (i=0; i&lt;5; i++)
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; {
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;output_b (tab_E[i]);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;delay_ms(TEMPO);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp;&nbsp; &nbsp; &nbsp;break;
&nbsp;&nbsp; &nbsp; &nbsp;}


&nbsp;&nbsp; &nbsp; &nbsp;if (frase[j]=='F')
&nbsp;&nbsp; &nbsp; &nbsp;{
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; for (i=0; i&lt;5; i++)
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; {
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;output_b (tab_F[i]);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;delay_ms(TEMPO);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp;&nbsp; &nbsp; &nbsp;break;
&nbsp;&nbsp; &nbsp; &nbsp;}


&nbsp;&nbsp; &nbsp; &nbsp;if (frase[j]=='G')
&nbsp;&nbsp; &nbsp; &nbsp;{
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; for (i=0; i&lt;5; i++)
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; {
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;output_b (tab_G[i]);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;delay_ms(TEMPO);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp;&nbsp; &nbsp; &nbsp;break;
&nbsp;&nbsp; &nbsp; &nbsp;}


&nbsp;&nbsp; &nbsp; &nbsp;if (frase[j]=='H')
&nbsp;&nbsp; &nbsp; &nbsp;{
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; for (i=0; i&lt;5; i++)
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; {
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;output_b (tab_H[i]);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;delay_ms(TEMPO);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp;&nbsp; &nbsp; &nbsp;break;
&nbsp;&nbsp; &nbsp; &nbsp;}


&nbsp;&nbsp; &nbsp; &nbsp;if (frase[j]=='I')
&nbsp;&nbsp; &nbsp; &nbsp;{
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; for (i=0; i&lt;5; i++)
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; {
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;output_b (tab_I[i]);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;delay_ms(TEMPO);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp;&nbsp; &nbsp; &nbsp;break;
&nbsp;&nbsp; &nbsp; &nbsp;}


&nbsp;&nbsp; &nbsp; &nbsp;if (frase[j]=='J')
&nbsp;&nbsp; &nbsp; &nbsp;{
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; for (i=0; i&lt;5; i++)
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; {
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;output_b (tab_J[i]);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;delay_ms(TEMPO);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp;&nbsp; &nbsp; &nbsp;break;
&nbsp;&nbsp; &nbsp; &nbsp;}


&nbsp;&nbsp; &nbsp; &nbsp;if (frase[j]=='K')
&nbsp;&nbsp; &nbsp; &nbsp;{
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; for (i=0; i&lt;5; i++)
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; {
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;output_b (tab_K[i]);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;delay_ms(TEMPO);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp;&nbsp; &nbsp; &nbsp;break;
&nbsp;&nbsp; &nbsp; &nbsp;}


&nbsp;&nbsp; &nbsp; &nbsp;if (frase[j]=='L')
&nbsp;&nbsp; &nbsp; &nbsp;{
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; for (i=0; i&lt;5; i++)
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; {
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;output_b (tab_L[i]);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;delay_ms(TEMPO);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp;&nbsp; &nbsp; &nbsp;break;
&nbsp;&nbsp; &nbsp; &nbsp;}


&nbsp;&nbsp; &nbsp; &nbsp;if (frase[j]=='M')
&nbsp;&nbsp; &nbsp; &nbsp;{
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; for (i=0; i&lt;5; i++)
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; {
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;output_b (tab_M[i]);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;delay_ms(TEMPO);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp;&nbsp; &nbsp; &nbsp;break;
&nbsp;&nbsp; &nbsp; &nbsp;}


&nbsp;&nbsp; &nbsp; &nbsp;if (frase[j]=='N')
&nbsp;&nbsp; &nbsp; &nbsp;{
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; for (i=0; i&lt;5; i++)
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; {
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;output_b (tab_N[i]);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;delay_ms(TEMPO);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp;&nbsp; &nbsp; &nbsp;break;
&nbsp;&nbsp; &nbsp; &nbsp;}


&nbsp;&nbsp; &nbsp; &nbsp;if (frase[j]=='O')
&nbsp;&nbsp; &nbsp; &nbsp;{
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; for (i=0; i&lt;5; i++)
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; {
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;output_b (tab_O[i]);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;delay_ms(TEMPO);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp;&nbsp; &nbsp; &nbsp;break;
&nbsp;&nbsp; &nbsp; &nbsp;}


&nbsp;&nbsp; &nbsp; &nbsp;if (frase[j]=='P')
&nbsp;&nbsp; &nbsp; &nbsp;{
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; for (i=0; i&lt;5; i++)
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; {
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;output_b (tab_P[i]);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;delay_ms(TEMPO);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp;&nbsp; &nbsp; &nbsp;break;
&nbsp;&nbsp; &nbsp; &nbsp;}


&nbsp;&nbsp; &nbsp; &nbsp;if (frase[j]=='Q')
&nbsp;&nbsp; &nbsp; &nbsp;{
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; for (i=0; i&lt;5; i++)
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; {
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;output_b (tab_Q[i]);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;delay_ms(TEMPO);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp;&nbsp; &nbsp; &nbsp;break;
&nbsp;&nbsp; &nbsp; &nbsp;}


&nbsp;&nbsp; &nbsp; &nbsp;if (frase[j]=='R')
&nbsp;&nbsp; &nbsp; &nbsp;{
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; for (i=0; i&lt;5; i++)
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; {
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;output_b (tab_R[i]);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;delay_ms(TEMPO);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp;&nbsp; &nbsp; &nbsp;break;
&nbsp;&nbsp; &nbsp; &nbsp;}


&nbsp;&nbsp; &nbsp; &nbsp;if (frase[j]=='S')
&nbsp;&nbsp; &nbsp; &nbsp;{
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; for (i=0; i&lt;5; i++)
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; {
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;output_b (tab_S[i]);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;delay_ms(TEMPO);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp;&nbsp; &nbsp; &nbsp;break;
&nbsp;&nbsp; &nbsp; &nbsp;}


&nbsp;&nbsp; &nbsp; &nbsp;if (frase[j]=='T')
&nbsp;&nbsp; &nbsp; &nbsp;{
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; for (i=0; i&lt;5; i++)
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; {
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;output_b (tab_T[i]);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;delay_ms(TEMPO);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp;&nbsp; &nbsp; &nbsp;break;
&nbsp;&nbsp; &nbsp; &nbsp;}


&nbsp;&nbsp; &nbsp; &nbsp;if (frase[j]=='U')
&nbsp;&nbsp; &nbsp; &nbsp;{
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; for (i=0; i&lt;5; i++)
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; {
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;output_b (tab_U[i]);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;delay_ms(TEMPO);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp;&nbsp; &nbsp; &nbsp;break;
&nbsp;&nbsp; &nbsp; &nbsp;}


&nbsp;&nbsp; &nbsp; &nbsp;if (frase[j]=='V')
&nbsp;&nbsp; &nbsp; &nbsp;{
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; for (i=0; i&lt;5; i++)
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; {
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;output_b (tab_V[i]);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;delay_ms(TEMPO);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp;&nbsp; &nbsp; &nbsp;break;
&nbsp;&nbsp; &nbsp; &nbsp;}


&nbsp;&nbsp; &nbsp; &nbsp;if (TEMPO=='W')
&nbsp;&nbsp; &nbsp; &nbsp;{
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; for (i=0; i&lt;5; i++)
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; {
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;output_b(tab_W[i]);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;delay_ms(TEMPO);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp;&nbsp; &nbsp; &nbsp;}


&nbsp;&nbsp; &nbsp; &nbsp;if (frase[j]=='X')
&nbsp;&nbsp; &nbsp; &nbsp;{
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; for (i=0; i&lt;5; i++)
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; {
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;output_b (tab_X[i]);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;delay_ms(TEMPO);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp;&nbsp; &nbsp; &nbsp;break;
&nbsp;&nbsp; &nbsp; &nbsp;}


&nbsp;&nbsp; &nbsp; &nbsp;if (frase[j]=='Y')
&nbsp;&nbsp; &nbsp; &nbsp;{
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; for (i=0; i&lt;5; i++)
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; {
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;output_b (tab_Y[i]);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;delay_ms(TEMPO);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp;&nbsp; &nbsp; &nbsp;break;
&nbsp;&nbsp; &nbsp; &nbsp;}


&nbsp;&nbsp; &nbsp; &nbsp;if (frase[j]=='Z')
&nbsp;&nbsp; &nbsp; &nbsp;{
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; for (i=0; i&lt;5; i++)
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; {
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;output_b (tab_Z[i]);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;delay_ms(TEMPO);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp;&nbsp; &nbsp; &nbsp;break;
&nbsp;&nbsp; &nbsp; &nbsp;}


&nbsp;&nbsp; &nbsp; &nbsp;if (frase[j]==' ')
&nbsp;&nbsp; &nbsp; &nbsp;{
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; for (i=0; i&lt;5; i++)
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; {
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;output_b (tab_esp[i]);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;delay_ms(TEMPO);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp;&nbsp; &nbsp; &nbsp;break;
&nbsp;&nbsp; &nbsp; &nbsp;}
&nbsp;&nbsp; &nbsp; &nbsp;output_b(0);
&nbsp;&nbsp; &nbsp; &nbsp;delay_ms(TEMPO);
&nbsp;&nbsp; }
}
*/
/*
#define TEMPO 4 &nbsp; &nbsp; &nbsp;// tempo entre uma coluna e outra
#define LIGADO 1 &nbsp; // para facilitar leitura de codigo
//#define FRASE "'Unifacs - Arhte'" PQ ????
*/
/*
void main() {
&nbsp;&nbsp; int i, j;
&nbsp;&nbsp; char frase[30] = "UNIFACS - ARHTE";


&nbsp;&nbsp; while (LIGADO) {
&nbsp;&nbsp; &nbsp; &nbsp;for (i=0; frase[i] != '\0'; i++) {
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; if ((frase[i] &lt;= 'Z') &amp;&amp; (frase[i] &gt;= 'A')) { // APENAS MAIUSCULAS
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;for (j=0; j&lt;5; j++) {
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; output_b(tab_Letras[frase[i] - 'A'][j]);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; delay_ms(TEMPO);
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp;&nbsp; &nbsp; &nbsp;}
&nbsp;&nbsp; &nbsp; &nbsp;for (i=0; i&lt;5; i++) {
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; output_b(0b00000000);
&nbsp;&nbsp; &nbsp; &nbsp;}
&nbsp;&nbsp; }


}
*/
/*
&nbsp;&nbsp; A - 130
&nbsp;&nbsp; B - 131
&nbsp;&nbsp; C - 13TEMPO
&nbsp;&nbsp; Z - 155


&nbsp;&nbsp; A - A = 0
&nbsp;&nbsp; A - C = 2
*/




/*
&nbsp;&nbsp; RB4
&nbsp;&nbsp; RB5
&nbsp;&nbsp; RB6
&nbsp;&nbsp; RB7
&nbsp;&nbsp; RA6
&nbsp;&nbsp; RA7
&nbsp;&nbsp; RA0
&nbsp;&nbsp; RA1 F
&nbsp;&nbsp; RB3
&nbsp;&nbsp; RB2
&nbsp;&nbsp; RB1
&nbsp;&nbsp; RB0
&nbsp;&nbsp; RA5 F
&nbsp;&nbsp; RA4 F
&nbsp;&nbsp; RA3
&nbsp;&nbsp; RA2 &nbsp; F
*/