اخوان هذه المربعات تظهر فقط عندما اخزن النص في الروم وانسخه الى الرام
اما اذا خزنتها على الرام مباشرة فلاتظهر .. لماذا ؟؟؟؟
طبعاً هذه المربعات والخربطة لاتظهر في البروتيس فقط في الواقع
|
السلام عليكم
عندك حلين
1- أستخدم مكتبه جديده فهي تطبع مباشره من روم
2- او تستخدم نفس هذا الكود لانه يوجد خطأ بالكود
كود:
// Lcd pinout settings
sbit LCD_RS at RB4_bit;
sbit LCD_EN at RB5_bit;
sbit LCD_D7 at RB3_bit;
sbit LCD_D6 at RB2_bit;
sbit LCD_D5 at RB1_bit;
sbit LCD_D4 at RB0_bit;
// Pin direction
sbit LCD_RS_Direction at TRISB4_bit;
sbit LCD_EN_Direction at TRISB5_bit;
sbit LCD_D7_Direction at TRISB3_bit;
sbit LCD_D6_Direction at TRISB2_bit;
sbit LCD_D5_Direction at TRISB1_bit;
sbit LCD_D4_Direction at TRISB0_bit;
unsigned char x,y, kk , count;
char text_lcd[17];
const char txt[]=" Hello ....How is my friend .. my name is Hasan Iam from iraq ";
void main()
{
cmcon=7;
Lcd_Init();
lcd_cmd(_LCD_CURSOR_OFF);
lcd_cmd(1);
while(1)
{
kk=sizeof(txt);// calcaulate size of txt
for(x=0;x<17;x++)
{
if(x==16){text_lcd[x]=0;break;}// reset text_lcd[x] this verry nessary for avoid overwrited
text_lcd[x]=txt[x+y]; // 15+42
}
lcd_out(1,1,text_lcd);
count++;
delay_ms(10);
if(count==10)// to reducing time
{
y++;
if(y==kk-15)y=0;
count=0;
}
}
}