herkese merhabalar, ben pic 18f45k22 kullanıyorumve lm35 ile bir termometre yaptım fakat proteusta çalışan devre board üzerinde çalışmıyor alakasız rakamlar gösteriyor lcd de acaba sorun nedir şimdiden teşekkür ederim :)
micro c kodu
sbit LCD_RS at RB0_bit;
sbit LCD_EN at RB1_bit;
sbit LCD_D4 at RB2_bit;
sbit LCD_D5 at RB3_bit;
sbit LCD_D6 at RB4_bit;
sbit LCD_D7 at RB5_bit;
// Pin direction
sbit LCD_RS_Direction at TRISB0_bit;
sbit LCD_EN_Direction at TRISB1_bit;
sbit LCD_D4_Direction at TRISB2_bit;
sbit LCD_D5_Direction at TRISB3_bit;
sbit LCD_D6_Direction at TRISB4_bit;
sbit LCD_D7_Direction at TRISB5_bit;
int deger=0;
float value=0;
char txt[15];
void main() {
porta=0;
trisa=1;
ansela=1;
anselb=0;
ADC_Init();
LCD_Init();
Lcd_Cmd(_lcd_cursor_off);
Lcd_Cmd(_lcd_clear);
lcd_out(1,1,"merhaba");
delay_ms(1000);
lcd_cmd(_lcd_clear);
lcd_out(1,1,"temperature");
while(1){
deger = ADC_Read(2);
value = (deger*0.488);
FloatToStr(value,txt);
Lcd_Out(2,1,txt);
delay_ms(500);
}
}
Mesajınıza kod beklerken "kod"
bu tonunu kullanıp yeniden
düzenleme yapınız.