Link Micro Contro
Link Micro Contro
Link Micro Contro
v=x7l_OyI3fog
https://www.youtube.com/watch?v=zzPGxGvEOBw
https://www.youtube.com/watch?v=QD7jy7ZA9pc
https://www.youtube.com/watch?v=vNB_c55QJrs
https://www.youtube.com/watch?v=x7l_OyI3fog
https://www.youtube.com/watch?v=pm8ikGqN79U
https://www.youtube.com/watch?v=9ugbhuGXBo4
https://www.youtube.com/watch?v=TBHzBwDG9OY
sbit LCD_RS at RB2_bit; //conexion LCD
//Declaracion de variables
int valor,lux;
float voltaje;
char valor1[10];
void main() {
ADCON1= 0b00001110;
TRISA = 0X01;
TRISB = 0X00;
PORTB = 0X00;
lcd_init();
Lcd_Cmd(_LCD_CURSOR_OFF);
Lcd_Cmd(_LCD_CLEAR);
Lcd_out(1,1,"por(%):");
Lcd_out(2,1,"bombillo:");
Lcd_out(2,12,"off");
while(1){
valor = Adc_read(0);
delay_ms(10);
voltaje = (valor*5)/1024;
lux = (100*voltaje)/5;
intToStr(lux,valor1);
Lcd_out(1,7,valor1);
RB0_bit = 1;
delay_ms(10);
Lcd_out(2,12,"ON");
RB0_bit = 0;
delay_ms(10);
Lcd_out(2,12,"off");
}
https://docplayer.es/10724599-Laura-gonzalo-abril-03-curso-modulaciones-digitales.html