I am writing a driver for SSD1289 240x320 TFT Screen.I have almost finished with the writing but i am facing problems with the converter BMP2GCB. Specificly as you can see on the picture below when i am using the tables from GLCD_Load_Mutliple_BMPs_16f1939_for_KS0108.gcb the pictures appear just fine. But when i am using the program BMP2GCB to convert the file Email.bmp in the directory \GCBasic\converters it doesn't appear as it supposed to be.
The version of GCBasic that i have is the last hot release march 2015 and my program is
Go to the converters directory and run BMP2GCB.exe with parameter of your BMP. This should produce a .GCB file containing the table of data - does this work?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes it works.
for examle
BMP2GCB Email.bmp
and produce the Email.gcb. Then copy and paste the table in image.h. I declare
#define Email @Email
and in my program
TFT_Image 130 , 80, Email, White.
But the result is not right.
When i am using your existing tables in file GLCD_Load_Mutliple_BMPs_16f1939_for_KS0108.gcb (for example Anobium) it works fine. Did you use an other version of BMP2GCB to produce your tables?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I wrote all this code, the GCB and the EXE - so, I am the person to help. :-)
The BMP objects must different and therefore the handling may need to be different.
Please compare the start of the two tables (1. the existing 2. the new table created by the exe) - what are the first three bytes?
I do have a newer BMP draw routine as I did find an issue in the code - but, lets start with these first three bytes. If they are different then that really helps.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In 1.txt is the Anobium table from the file GLCD_Load_Mutliple_BMPs_16f1939_for_KS0108.gcb and in 2.txt is the Anobium table as it is produced from BMP2GCB i use. The first three bytes is same 0x3C, 0x40 , 0x00
In the picture above the problem is pretty clear.As you can see on the uper right corner of the screen i am trying to display the Email.bmp and you can see that the result is not right.If you look at the bottom of the shape,the orders are executed just right,although the rest of it is not the outcome we wanted to see.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am writing a driver for SSD1289 240x320 TFT Screen.I have almost finished with the writing but i am facing problems with the converter BMP2GCB. Specificly as you can see on the picture below when i am using the tables from GLCD_Load_Mutliple_BMPs_16f1939_for_KS0108.gcb the pictures appear just fine. But when i am using the program BMP2GCB to convert the file Email.bmp in the directory \GCBasic\converters it doesn't appear as it supposed to be.
The version of GCBasic that i have is the last hot release march 2015 and my program is
'Chip Settings
#chip mega2560, 16
'Include
#include "SSD1289.h"
#include "Image.h"
Wait 1 s
Call TFT_Init
Wait 100 ms
Call TFT_Fill(Blue)
TFTDrawCharS 10 , 30 , 65, White
TFTDrawCharS 30, 30, 65, White, 2
TFTDrawCharS 50, 50, 65, White, 3
TFTDrawCharS 70, 70, 65, White, 4
TFTPrintS 5, 160, Yellow, "Κατσαούνης Δημήτρης", 2
TFTPrintS 5, 175, Yellow, "Katsaounis Dimitris", 2
TFT_Image 5 , 220, Anobium, Red
TFT_Image 105 , 220, GCB, Green
TFT_Image 130 , 80, Email, White
Start:
Goto Start
Picture
Hi,
Can you post as a zip attachment your code and the .h files(s)? I would be guessing to figure out what TFT_Image does and all the other functions.
Anobium
The .h files i use
Can you try the following?
Go to the converters directory and run BMP2GCB.exe with parameter of your BMP. This should produce a .GCB file containing the table of data - does this work?
Yes it works.
for examle
BMP2GCB Email.bmp
and produce the Email.gcb. Then copy and paste the table in image.h. I declare
#define Email @Email
and in my program
TFT_Image 130 , 80, Email, White.
But the result is not right.
When i am using your existing tables in file GLCD_Load_Mutliple_BMPs_16f1939_for_KS0108.gcb (for example Anobium) it works fine. Did you use an other version of BMP2GCB to produce your tables?
I wrote all this code, the GCB and the EXE - so, I am the person to help. :-)
The BMP objects must different and therefore the handling may need to be different.
Please compare the start of the two tables (1. the existing 2. the new table created by the exe) - what are the first three bytes?
I do have a newer BMP draw routine as I did find an issue in the code - but, lets start with these first three bytes. If they are different then that really helps.
In 1.txt is the Anobium table from the file GLCD_Load_Mutliple_BMPs_16f1939_for_KS0108.gcb and in 2.txt is the Anobium table as it is produced from BMP2GCB i use. The first three bytes is same 0x3C, 0x40 , 0x00
Last edit: Dimitris Katsaounis 2015-06-24
That was a surprise. I did expect them to be different.
I need time to look at all your code.
It the first part of the TFT_image ok? then, the second part not ok?
Can you post a video?
Your code looks ok.
In the picture above the problem is pretty clear.As you can see on the uper right corner of the screen i am trying to display the Email.bmp and you can see that the result is not right.If you look at the bottom of the shape,the orders are executed just right,although the rest of it is not the outcome we wanted to see.
I think we need to add some debug to your code as I cannot simulate the error here.
Can you add a serial terminal to capture the bytes being sent to the device? Do this for both case please.
i am trying to make a new subrutine based on GLCDtools please be patient and i will contact you very soon.
Problem solved!!! look at the Linux penguin (48x48 Pixels).
I am preparing a presentation in contributors section...be patient.
Oh... the example code is for Mono BMP (Black and White) and your case the BMP is color. The converter code only supports mono BMP.
Well done - we do need a color file support - well done!!