Menu

Help on BMP2GCB

Help
2015-06-22
2015-06-28
  • Dimitris Katsaounis

    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

     
  • Dimitris Katsaounis

    Picture

     
  • Anobium

    Anobium - 2015-06-23

    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

     
  • Dimitris Katsaounis

    The .h files i use

     
  • Anobium

    Anobium - 2015-06-23

    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?

     
  • Dimitris Katsaounis

    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?

     
  • Anobium

    Anobium - 2015-06-24

    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.

     
  • Dimitris Katsaounis

    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
  • Anobium

    Anobium - 2015-06-24

    That was a surprise. I did expect them to be different.
    I need time to look at all your code.

     
  • Anobium

    Anobium - 2015-06-24

    It the first part of the TFT_image ok? then, the second part not ok?
    Can you post a video?

    Your code looks ok.

     
  • Dimitris Katsaounis

    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.

     
  • Anobium

    Anobium - 2015-06-25

    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.

     
  • Dimitris Katsaounis

    i am trying to make a new subrutine based on GLCDtools please be patient and i will contact you very soon.

     
  • Dimitris Katsaounis

    Problem solved!!! look at the Linux penguin (48x48 Pixels).
    I am preparing a presentation in contributors section...be patient.

     
  • Anobium

    Anobium - 2015-06-28

    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!!

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.