I am getting a problem while burning the code in LPC2148 interfacing with GLCD. Flash Magic is showing an error- failed to autobaud. I want to know if we can directly connect GPIO pins of LPC2148 to 8 pin data bus of 128*64 GLCD???? Please reply immediately or as soon as possible...... I have to summit my project within a week.
We can immediately (or almost as soon as possible) say that maybe it is possible.
How many weeks have you wasted of your project time, or how many lessons have you ignored? Don't you think you need to examine the datasheet of the specific (and to us unknown) GLCD, to figure out what it takes to interface it to a LPC2148 processor?
And what does the GLCD have with your programming of your processor using Flash Magic? What do you think affects the processors ability to communicate and to autobaud?
i am using JHD12864E GLCD to display a text. problem is whenever i tried to burn hex file in LPC2148 using flash magic, it shows an error- failed to autobaud. I couldn't find why it is happening?? And whenever i remove GLCD and then burn hex file in LPC2148 it works and shows no error..
So how do you expect anyone to be able to help you?
Would we know how you have connected the display to the processor? Would we know if you have verified if the supply voltages are ok? Would we know what you do with the external interrupt pin used to request that you want to enter programming mode? Would we know if the processor have a proper reset circuit? Would we know what voltages you supply the processor and the GLCD with? Would we know if your circuit keeps all processor pins within allowed spec? Would we know if you have selected to use any series resistors for signals between processor or GLCD? Would we know if you have spent some time with an oscilloscope to try to deduce what differences you can see on the different processor pins when it's in reset without and with the GLCD connected? Would we know ...
Did you feel that it would take too much of your valuable time to actually specify your problem, and what you have tried to figure out what is wrong? Is it better if we waste our time instead, trying to drag the required information out of you?
=> I want to know if we can directly connect GPIO pins of LPC2148 to 8 pin data bus of 128*64 GLCD????
To the OP:
Do you connect P0.14 to 8 pin data bus of 128*64 GLCD?
I have connected PO.0 - P0.7 of LPC2148 to 8 pin data bus of GLCD and RS, RW, EN, CS1, CS2 to P1.16 - P1.20 respectively of LPC2148.
The code we are using.... #include <LPC214X.H>
#include "font.h"
unsigned char c; unsigned char z=0;
void ctrloff() {
IOSET1=0x00000000; //rs=rw=en=cs1=cs2=0; }
//DELAY FUNCTION void delay(unsigned int j) { int k; for(k=0;k<=j;k++) { long i; for(i=0;i<90000;i++); } }
void displayon() { ctrloff(); IOSET0=0x0000003F; IOSET1=0x001C0000; delay(5); IOSET0=0x0000003F; IOSET1=0x000C0000; }
void displayoff() { ctrloff(); IOSET0=0x0000003E; IOSET1=0x001C0000; delay(5); IOSET0=0x0000003E; IOSET1=0x000C0000; }
void setcolumn(unsigned char y) { if(y<64) { ctrloff(); c=y; IOSET0=0x00000040 |(y&63); //0x40 represents Column 0 IOSET1=0x00140000; delay(5); IOSET0=0x00000040 |(y&63); IOSET1=0x00040000; } else { ctrloff(); c=y; IOSET0=0x00000040|((y-64)&63); //0x40 represents Column 0 IOSET1=0x00180000; delay(5); IOSET0=0x00000040|((y-64)&63); IOSET1=0X00080000; } }
void setpage(unsigned char x) { ctrloff(); IOSET0=0x000000B8|x; //0xb8 represents Page 0 IOSET0=0x001C0000; delay(5); IOSET0=0x000000B8|x; //0xb8 represents Page 0 IOSET1=0x000C0000; }
//Function to Scroll Strings void setstartline(unsigned char z) { ctrloff(); IOSET0=0x000000C0|z; //0xc0 represents Line 0 IOSET1=0x001C0000; delay(5); IOSET0=0x000000C0|z; //0xc0 represents Line 0 IOSET1=0x000C0000; }
void lcddata(unsigned char *value,unsigned int limit) { unsigned int i; for(i=0;i<limit;i++) { if(c<64) { IOSET0=value[i]; IOSET1=0x00150000; delay(5); IOSET0=value[i]; IOSET1=0x00050000; c++; } else { setcolumn(c); IOSET0=value[i]; IOSET1=0x00160000; delay(5); IOSET0=value[i]; IOSET1=0x00060000; c++; } if(c>127) return; } }
void lcdputs(unsigned char y,unsigned char x,unsigned char *str) { unsigned char i; unsigned int a; setcolumn(y); setpage(x); for(i=0;str[i]!=0;i++) { a=(*(str+i)-32); a*=5; lcddata(&font5x7[a],5); } }
void clrlcd() { unsigned char i,j; for (i=0;i < 8;i++) { setpage(i); setcolumn(0); for (j= 0 ;j < 128; j++) lcddata(&z,1); } }
unsigned char ar0[]="*************** "; unsigned char ar1[]="MINOR PROJECT"; unsigned char ar2[]="ELECTRONICS AND COMMUNICATION "; unsigned char ar3[]="************** ";
int main() { IODIR1=0xffffffff; IOCLR1=0xffffffff; IODIR0=0xffffffff; IOCLR0=0xffffffff; { unsigned char i; clrlcd(); displayon(); setcolumn(0); setpage(0); lcdputs(0,1,ar0); lcdputs(0,2,ar1); lcdputs(0,3,ar2); lcdputs(0,4,ar3); delay(65); delay(65);
for(i=0;i<5;i++) { displayoff(); delay(65); displayon(); delay(65); delay(65); } i=0; while(1) { setstartline(i++); //Function to Scroll Strings delay(40); } } }
View all questions in Keil forum