Vídeos de Rodrigo Paiva (Laboratorio de Garagem (arduino, eletrônica, robotica, hacking)) - Laboratorio de Garagem (arduino, eletrônica, robotica, hacking) 2024-05-04T22:24:53Z https://labdegaragem.com/video/video/listForContributor?screenName=05ipy6ipojisw&rss=yes&xn_auth=no pic18f teclado led rb0 tag:labdegaragem.com,2014-05-22:6223006:Video:355285 2014-05-22T21:32:51.735Z Rodrigo Paiva https://labdegaragem.com/profile/RodrigoSilvadePaiva <a href="https://labdegaragem.com/video/pic18f-teclado-led-rb0"><br /> <img alt="Miniatura" height="180" src="https://storage.ning.com/topology/rest/1.0/file/get/1946419357?profile=original&amp;width=240&amp;height=180" width="240"></img><br /> </a> <br></br>void main(){<br></br> <br></br> trisb = 0; //portb config como saida<br></br> portb = 0; //leds do portb apagados<br></br> trisd = 0; //portd config como saida<br></br> portd = 0; //leds do portd apagados<br></br> trisb.rb0 = 1; //tecla rb0 entrada<br></br> <br></br> while(1){<br></br> if(portb.rb0 == 0){<br></br> portd = ~portd;<br></br> delay_ms(200);<br></br> }<br></br> }… <a href="https://labdegaragem.com/video/pic18f-teclado-led-rb0"><br /> <img src="https://storage.ning.com/topology/rest/1.0/file/get/1946419357?profile=original&amp;width=240&amp;height=180" width="240" height="180" alt="Miniatura" /><br /> </a><br />void main(){<br /> <br /> trisb = 0; //portb config como saida<br /> portb = 0; //leds do portb apagados<br /> trisd = 0; //portd config como saida<br /> portd = 0; //leds do portd apagados<br /> trisb.rb0 = 1; //tecla rb0 entrada<br /> <br /> while(1){<br /> if(portb.rb0 == 0){<br /> portd = ~portd;<br /> delay_ms(200);<br /> }<br /> }<br /> } pic18f teclado led tag:labdegaragem.com,2014-05-22:6223006:Video:355532 2014-05-22T21:32:40.749Z Rodrigo Paiva https://labdegaragem.com/profile/RodrigoSilvadePaiva <a href="https://labdegaragem.com/video/pic18f-teclado-led"><br /> <img alt="Miniatura" height="180" src="https://storage.ning.com/topology/rest/1.0/file/get/1946418750?profile=original&amp;width=240&amp;height=180" width="240"></img><br /> </a> <br></br>void main(){<br></br> <br></br> trisb.rb0 = 1; // tecla rb0 conf entrada<br></br> trisb.rb1 = 1; // tecla rb1 conf entrada<br></br> trisb.rb2 = 1;<br></br> trisb.rb3 = 1;<br></br> trisb.rb4 = 1;<br></br> trisb.rb5 = 1;<br></br> <br></br> portc.rc0 = 0; // relé desligado... pino de acionamento do relé do nosso kit<br></br> trisc.rc0 = 0; // relé pino config como saída<br></br> <br></br> do{<br></br> if(portb.rb0 == 0){… <a href="https://labdegaragem.com/video/pic18f-teclado-led"><br /> <img src="https://storage.ning.com/topology/rest/1.0/file/get/1946418750?profile=original&amp;width=240&amp;height=180" width="240" height="180" alt="Miniatura" /><br /> </a><br />void main(){<br /> <br /> trisb.rb0 = 1; // tecla rb0 conf entrada<br /> trisb.rb1 = 1; // tecla rb1 conf entrada<br /> trisb.rb2 = 1;<br /> trisb.rb3 = 1;<br /> trisb.rb4 = 1;<br /> trisb.rb5 = 1;<br /> <br /> portc.rc0 = 0; // relé desligado... pino de acionamento do relé do nosso kit<br /> trisc.rc0 = 0; // relé pino config como saída<br /> <br /> do{<br /> if(portb.rb0 == 0){<br /> portc.rc0 = 1; // liga relé<br /> }<br /> if(portb.rb1 == 0){<br /> portc.rc0 = 0; //desliga relé<br /> }<br /> if(portb.rb2 == 0){<br /> portc.rc0 = 1; // liga relé<br /> }<br /> if(portb.rb3 == 0){<br /> portc.rc0 = 0; //desliga relé<br /> }<br /> if(portb.rb4 == 0){<br /> portc.rc0 = 1; // liga relé<br /> }<br /> if(portb.rb5 == 0){<br /> portc.rc0 = 0; //desliga relé<br /> }<br /> }<br /> while(1);<br /> } PIC 18f display tag:labdegaragem.com,2014-05-22:6223006:Video:355282 2014-05-22T21:32:15.157Z Rodrigo Paiva https://labdegaragem.com/profile/RodrigoSilvadePaiva <a href="https://labdegaragem.com/video/pic-18f-display"><br /> <img alt="Miniatura" height="180" src="https://storage.ning.com/topology/rest/1.0/file/get/1946419309?profile=original&amp;width=240&amp;height=180" width="240"></img><br /> </a> <br></br>int leitura_AD;<br></br> char texto[10];<br></br> void main(){<br></br> <br></br> ADCON1 = 0B00000100;<br></br> TRISA.RA0 = 1;<br></br> TRISA.RA1 = 1;<br></br> <br></br> TRISE = 0;<br></br> TRISD = 0;<br></br> Lcd_custom_config(&amp;PORTD,7,6,5,4,&amp;PORTE,2,0,1);<br></br> Lcd_custom_cmd(Lcd_CLEAR);<br></br> Lcd_custom_cmd(Lcd_CURSOR_OFF);<br></br> lcd_custom_out(1,1,"AN0: ");<br></br> lcd_custom_out(2,1,"AN1: ");…<br></br> <a href="https://labdegaragem.com/video/pic-18f-display"><br /> <img src="https://storage.ning.com/topology/rest/1.0/file/get/1946419309?profile=original&amp;width=240&amp;height=180" width="240" height="180" alt="Miniatura" /><br /> </a><br />int leitura_AD;<br /> char texto[10];<br /> void main(){<br /> <br /> ADCON1 = 0B00000100;<br /> TRISA.RA0 = 1;<br /> TRISA.RA1 = 1;<br /> <br /> TRISE = 0;<br /> TRISD = 0;<br /> Lcd_custom_config(&amp;PORTD,7,6,5,4,&amp;PORTE,2,0,1);<br /> Lcd_custom_cmd(Lcd_CLEAR);<br /> Lcd_custom_cmd(Lcd_CURSOR_OFF);<br /> lcd_custom_out(1,1,"AN0: ");<br /> lcd_custom_out(2,1,"AN1: ");<br /> <br /> while(1){<br /> <br /> leitura_AD = ADC_READ(0);<br /> wordtostr(leitura_AD, texto);<br /> lcd_custom_out(1,5, texto);<br /> <br /> leitura_AD = ADC_READ(1);<br /> wordtostr(leitura_AD, texto);<br /> lcd_custom_out(2,5, texto);<br /> }<br /> }