Menu

CONVERTER .BMP TO .GCB FOR GLCD

2020-06-25
2021-08-17
  • BASIL HATZILAIOS

    My name is Basil Hatzilaios, I'm an electronics engineer , and I would like to send some graphics to a GLCD ....I use GCB@Syn IDE for Great Cow Basic...I would like to convert .bmp files to .gcb using converterexampleprogram_for_a_single_bmp_to_glcd...conversion works with .bmp file up to 128 x 64....for bigger graphic I have errors...I use a GLCD 240 X 128 with T-6963 controller. I noticed that converter is for KS0108 , chip 16f877a....what modifications can I do to converter program to work for GLCD 128 x 64 ? Is there some version with chip with more memory ( pic16f1939), and controller that supports GLCD 240 X 128 ?...a version that I found at GCB site, works over to 128 X 64 , but not up to 240 X 128 , and gives me error about chip memory....it's about converter program only ? any info will be helpful to convert .bmp files up to 240 X 128 to .gcb...many thanks in advance.

     
  • BASIL HATZILAIOS

    after changing BMP2GCB.exe, and ini file in converters , not work , I get the same error ( max x, y 128 x 64 ), when I try to convert a bmp over 128 x 64.....there are 2 files "converters" in GCB file...1. GreatCowBasic--->converters, 2. GreatCowBasic--->Demos--->converter_solutions--->converters....In witch file must be change the .exe, ini files? is there a updated whole file GCB@Syn or GCB@Syn\GreatCowBasic ?

     
  • Anobium

    Anobium - 2020-06-29

    Post the BMP. I am confused. Totally.

    Evan

    Here is the email I send to you 1/8/2019

    All resolved from a converter point of view. I have removed the constraint of having a fixed dimension of 128x64.
    You picture now converters. Get the new application from here: <url removed=""> Replace the existing file in your converter folder. I had to put in OneDrive as I could not attach.
    I did change the include statement just to make it simple on my computer.
    But, do the maths you microcontroller has to hold the BMP with this approach. The maths:
    Resolution is 160 * 160 = 25600 pixels.
    A pixel equates to a bit, therefore 25600 / 8 = 3200 bytes.
    We need a table of 3200 bytes.
    We can create a table of 3200 bytes…. But, your 16f chip is memory limited.
    So. consider a chip like the 18f47K42.
    With the 16f1939 chip you will get the following error:
    Error: Subroutine PHOTO3 is 3214 words, the size limit on the current chip
    is 2048 words
    Error: Program is too large, cannot fit all subroutines into available
    program memory
    But, this works with the 18f but the 16f is page limited and you need to change the chip.
    Changing the chip is OK as GCB will just work for you.
    Evan
    </url>

     
  • BASIL HATZILAIOS

    15:41:33 G+Stool started with parameter 'asm' -> processing G:\FILESY~1\GCB@Syn\G+Stools\makeASM.bat
    Source-File = G:\File Sync\GCB@Syn\GreatCowBasic\Demos\converter_solutions\converterexampleprogram_for_a_single_bmp_to_glcd.gcb
    Target-File = G:\File Sync\GCB@Syn\GreatCowBasic\Demos\converter_solutions\converterexampleprogram_for_a_single_bmp_to_glcd.asm
    Compiler Version (YYYY-MM-DD): 0.98.05 2019-04-20 (Windows 32 bit) Program Memory: 819/16384 words (5,0%) RAM: 25/1024 bytes (2,44%) Chip: 16F1939
    Duration: 17.2 Seconds.
    above is the output of converterexampleprogram....works well even with PIC16F1939...I was checked with PIC18F47K42, there is no difference....the above converted bmp file is 300 x 140 ...after an examination of some bmp's, I noticed that the errors relates of some parameters of bmp , mainly if that is not monochrome....In addition, I made some modifications to code of converterexampleprogram according to delete some syntax errors that I have after updating ....the conversion now it's ok without limitations of bmp size...
    Something that I would like your opinion is, if there is a easier way to transfer the .gcb table to my code except of copy-paste...many thanks Evan for your help !

     
  • Anobium

    Anobium - 2020-06-29

    Can you attached the BMP? Let me have a look please.

     
  • BASIL HATZILAIOS

    In "test" file there are the converter program and 3 bmp . "photo" bmp gives me error with pic16f1939, but with pic18f47k42 not.

     
    • Anobium

      Anobium - 2020-06-30

      I tested test.zip here. Seems to compile OK.

       
  • Anobium

    Anobium - 2020-06-30

    I am not sure what you mean to "copy/paste". The converter will include the table data in your program, so, cut/paste should not be needed.

     
  • BASIL HATZILAIOS

    ok Evan...would you like to post (with 1drive ) the updated GCB@Syn that you use to make some tests ?

     
  • stan cartwright

    stan cartwright - 2021-08-17

    Thanks for the input. The image converter looks interesting.

     

Log in to post a comment.