hi all i m using a 240*128 pix lcd with t6963c controller wanna see the graphics in it lcd is interfaced with atmega 128 microcontroller
for graphics i thougt of converting the gif file to binary data so did this i had 1st save the gif file in to the txt so to get ascii data before i aslo tried direct gif to binary i m getting binary data rite acording to the txt file but when i m seeing this data in the lcd i m not getting that image infact i had discarded the 22 bytes from the data
#include #include #include typedef unsigned char byte; #define SIZEBMP 3840 #define SIZELCD 42240 static int i; int ig,jg; unsigned char tg; int y; char kg[8]; void convert(void); //byte getvertByte(int ,int bit); unsigned char getbits(unsigned x, int p, int n); byte count, arrayLCD[SIZELCD], arrayBmp[SIZEBMP]; main() { clrscr(); FILE *fp;
/* open the bitmap for reading in binary mode */
if ( (fp = fopen("\\compass22.txt", "r")) == NULL) { fprintf(stderr, "Error opening file."); }
fp = fopen("\\compass22.txt", "r"); fread(arrayBmp, sizeof( byte), SIZEBMP, fp); for(ig=0;ig