PIC18F4550 Lcd Ekranda Yazı cıkmıyor.

Başlatan furkan41, 05 Ocak 2018, 02:27:28

furkan41

arkadaşlar pottan okuduğum adc değeri LCD ekrana yazdıran basit bir program yapmaya calıştım fakat LCD ekranda hiç bir karakter belirmiyor gercek hayatta denemedim sadece ISI'te denedim fakat ne yaptıysam olmadı büyük ihtimal bir yeri kacırıyorum ama anlamadım YARDIMCI OLABİLİRMİSİNİZ ?.

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;

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;
unsigned adc_sinyal;
char yaz[4];

void main() {
  Lcd_Init();
     Lcd_Cmd(_LCD_CURSOR_OFF);
     LCD_Cmd(_LCD_CLEAR);
     Delay_ms(100);
     Lcd_Out(1,1,"FURKAN KELESOGLU");
     Lcd_Out(2,2," ADC OKUMA ");
     delay_ms(2000);
     LCD_Cmd(_LCD_CLEAR);
ADCON0 = 0X0C;
ADCON1 &= 0XF0;
CMCON |=7;

TRISD=0;
PORTD=0;

TRISC=0;
PORTC=0;

TRISB=0;
PORTB=0;

TRISA = 0xFF;

while(1)
{
adc_sinyal = ADC_Read(2);
floattoStr(adc_sinyal,yaz);
Lcd_Out(1,1,"FURKAN KELESOGLU");
Lcd_Out(2,1,"ADC DEG:");
Lcd_Out(2,9,yaz);
}

}




Kurduğum devrede resim'de şimdiden yardımcı olacaklara teşekkür ediyorum.

mehmet

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;

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;
unsigned adc_sinyal;
char yaz[4];

void main() {

ADCON0 = 0X0C;
ADCON1 &= 0XF0;
CMCON |=7;

TRISD=0;
PORTD=0;

TRISC=0;
PORTC=0;

TRISB=0;
PORTB=0;

TRISA = 0xFF;



  Lcd_Init();
     Lcd_Cmd(_LCD_CURSOR_OFF);
     LCD_Cmd(_LCD_CLEAR);
     Delay_ms(100);
     Lcd_Out(1,1,"FURKAN KELESOGLU");
     Lcd_Out(2,2," ADC OKUMA ");
     delay_ms(2000);
     LCD_Cmd(_LCD_CLEAR);

while(1)
{
adc_sinyal = ADC_Read(2);
floattoStr(adc_sinyal,yaz);
Lcd_Out(1,1,"FURKAN KELESOGLU");
Lcd_Out(2,1,"ADC DEG:");
Lcd_Out(2,9,yaz);
}

}
Olan olmuştur,
olacak olan da olmuştur.
Olacak bir şey yoktur.
---------------------------------------------
http://www.mehmetbilgi.net.tr

furkan41

Alıntı yapılan: mehmet - 05 Ocak 2018, 13:16:17
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;

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;
unsigned adc_sinyal;
char yaz[4];

void main() {

ADCON0 = 0X0C;
ADCON1 &= 0XF0;
CMCON |=7;

TRISD=0;
PORTD=0;

TRISC=0;
PORTC=0;

TRISB=0;
PORTB=0;

TRISA = 0xFF;



  Lcd_Init();
     Lcd_Cmd(_LCD_CURSOR_OFF);
     LCD_Cmd(_LCD_CLEAR);
     Delay_ms(100);
     Lcd_Out(1,1,"FURKAN KELESOGLU");
     Lcd_Out(2,2," ADC OKUMA ");
     delay_ms(2000);
     LCD_Cmd(_LCD_CLEAR);

while(1)
{
adc_sinyal = ADC_Read(2);
floattoStr(adc_sinyal,yaz);
Lcd_Out(1,1,"FURKAN KELESOGLU");
Lcd_Out(2,1,"ADC DEG:");
Lcd_Out(2,9,yaz);
}

}


Mehmet bey kod zaten calışmıyor

mehmet

Aynısı değil, dikkat etmemişsiniz.
Olan olmuştur,
olacak olan da olmuştur.
Olacak bir şey yoktur.
---------------------------------------------
http://www.mehmetbilgi.net.tr

furkan41



Mehmet Bey Kodu denediğimde floattoStr komutunu hata olarak kırmızıyla ciziyor anlayamadım defalarca kontrol ettim birde bir diğer hatada lcd ayarlamalar yapıldıktan sonra mı işletmek gerekiyor'du ?

furkan41

Mehmet Bey Yardım Menüsünden inceledim de yazım yanlışı yapmışım büyük küçük harf yanlışı floattoStr Değil'de FloatToStr olacakmış ilgi ve alakanız için teşekkür ederim.

furkan41

Hay Allahım yarabbim yahu bu yine LCD ekranda birşey göstermiyor fırlatıcam şimdi

mehmet

#7
Konfigurasyon ayarları biraz uyuz.

 
Olan olmuştur,
olacak olan da olmuştur.
Olacak bir şey yoktur.
---------------------------------------------
http://www.mehmetbilgi.net.tr

burç tankal

Bu pic'te portB standart olarak analog olarak geliyor ve edit project sayfasından PORTB A/D sigortasının Disable yapılması gerekiyor. Burayı düzenlediniz mi?