بالاخره تونستم حلش کنم!!!
مشکل از این بود که من از پورت A برای EN و RS استفاده میکردم، پورت A آنالوگ است باید مقدار بیت های دو پین EN و RS را صفر در نظر میگرفتم تا پورت دیجیتال ست بشه!
وقتی که بیت ها دیجیتال ست نشده!
کد رو هم کمی تغییر دادم
lcd.h
[code=c]
#ifndef XC_HEADER_TEMPLATE_H
#define XC_HEADER_TEMPLATE_H
#include <xc.h> // include processor files - each processor file is guarded.
#define _XTAL_FREQ 4000000
#include <pic16f88.h>
// TODO Insert appropriate #include <>
// TODO Insert C++ class definitions if appropriate
// TODO Insert declarations
// Comment a function and leverage automatic documentation with slash star star
/**
*/
// TODO Insert declarations or function prototypes (right here) to leverage
// live documentation
// TODO If C++ is being used, regular C code needs function names to have C
// linkage so the functions can be used by the c code.
#define LCD_RS RA3
#define LCD_EN RA4
#define LCD_DATA4 RB0
#define LCD_DATA5 RB1
#define LCD_DATA6 RB2
#define LCD_DATA7 RB3
#define LCD_PORT PORTB
دیدگاه