1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

Graphic LCD 96x64 w/ SED1565 Controller

Discussion in 'Microcontrollers' started by AtomSoft, May 23, 2009.

  1. AtomSoft

    AtomSoft Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    5,670
    Likes:
    41
    Location:
    Brooklyn, NY US
    Lmao lol i read that like 4 times and rewatched the video lol i see what you mean . No hidden lines there i dont know why it looks like it fades in. For some reason it looks like its writing from bottom to top . I think its the controllers issue lol

    This is the code for showing that screen:
    Code (text):

            CLS();
            LCDCube(30,30, 35,35, 15,15);
            SendBuff();

            Delay10KTCYx(70);
            LCDCube(15,30, 20,35, 15,15);
            SendBuff();

            Delay10KTCYx(70);
            LCDCube( 0,30,   5,35, 15,15);
            SendBuff();

            ClearBuff();
     
    Just to show no hidden lines lol... ill post entire library soon its just that i dont want errors in it and i want to comment it more so i can share it without to many poeple saying bad things on it lol
     
    Last edited: Jul 6, 2009
  2. 3v0

    3v0 Coop Build Coordinator Forum Supporter

    Joined:
    Jul 14, 2006
    Messages:
    9,404
    Likes:
    227
    Location:
    OKLAHOMA USA
    You are doing an excellent job.

    Do not worry about anything I said as I was jesting.

    Z-buffering - Wikipedia, the free encyclopedia

    I am not suggesting you do it as there may not be enough memory and it would be slow. But it may make for interesting reading.
     
  3. AtomSoft

    AtomSoft Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    5,670
    Likes:
    41
    Location:
    Brooklyn, NY US
    lol supprised someone knew what jesting is besides me :D

    Ill take a look at that in a min just got my internet back on :D
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. Pavius

    Pavius New Member

    Joined:
    Jan 10, 2009
    Messages:
    104
    Likes:
    1

    Lots of good info in this thread.

    A few years back (circa 2004) i wrote an LCD simulator and published it packaged with a then-freeware application called FontGen on microchipc.com. I used FontGen to convert windows fonts into C arrays (with added support of any bitmap to C array). At some point the author told me to take down my copy of FontGen because he started making it available commercially.

    I scanned the web and i don't see a freeware alternative to FontGen. Do you guys know of any free app that converts fonts to C arrays w/BMP support?
     
    Last edited: Jul 9, 2009
  6. csaba911

    csaba911 Member

    Joined:
    Jul 2, 2003
    Messages:
    242
    Likes:
    2
    Location:
    Canada
  7. AtomSoft

    AtomSoft Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    5,670
    Likes:
    41
    Location:
    Brooklyn, NY US
    Anyone here dabble in VB6 (Visual Basic 6) ? I noticed my vb6 program seems to be stretching out the bmps from top to bottom slightly. You cant tell really from text but when i convert a image of a circle and some other items to hex code and display it on my lcd its stretched. While i did create the code for both i seem to be stuck on why my vb6 program stretches the image. Ill post the complete source below and can someone please help me.

    This code is for non commercial use. DO NOT! sell this. (even tho its simple but heh come on i took alot of time to make this.
     

    Attached Files:

  8. AtomSoft

    AtomSoft Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    5,670
    Likes:
    41
    Location:
    Brooklyn, NY US
    heh i dont think its my program. I tried these 2 other programs from someone else and same issue. But i doubt its my LCd code. But here is my code to display a image. Ill post a sample image:
    (Code is on a ARM but the same code from my PIC version. )
    Code (text):

    void LCDImage(const char *image,char top, char left){

        unsigned char widthLoop, heightLoop;
        unsigned char leftH, leftL;
        unsigned char width, height;
            unsigned char temp;

        width = *image++;
        height = *image++;

        height /= 8;

        top += 0xB0;
        //LCD_Send(top,0);

        left += 18;

        leftH = (left >> 4) | 0x10 ;
        leftL = left & 0x0F ;

            for(heightLoop=0;heightLoop<height;heightLoop++){
                LCD_Send(top,0);
                LCD_Send(leftH,0);
                LCD_Send(leftL,0);
                for(widthLoop=0;widthLoop<width;widthLoop++){
                                    temp = *image++;
                    LCD_Send(temp,1);
                }
                top++;
            }
    }
     
    My Image:
    Code (text):

    const char Radio[] =
    {
    96,64,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x80,0x80,0xC0,0xC0,0xE0,0xE0,0xE0,0xE0,0x60,0x60,0x60,0x60,0x60,0xE0,0xE0,0xE0,0xE0,
    0xC0,0xC0,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0xE0,0xF8,0x7C,
    0x1E,0x0F,0x07,0x07,0x03,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x01,0x01,0x03,0x03,0x07,0x0F,0x1E,0x3C,0xF8,0xF0,0xC0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0xFF,0x3F,0x07,0x00,
    0x03,0x03,0x03,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x07,0x07,0x07,0x07,0xFF,0xFF,0xFF,0xFE,0xFE,0xFC,
    0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x1F,0xFF,0xFC,0xE0,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFF,0xF8,0xC0,
    0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x0E,0x0E,0x1E,0xFE,0xFF,0xFF,0xFF,0xFB,0xF3,
    0xE1,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xE0,0xFF,0x7F,0x0F,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x07,
    0x1F,0x3E,0x7C,0xF8,0xF8,0xFF,0xFF,0xBF,0x3F,0x3F,0x3F,0x38,0x38,0x00,0x00,0x07,0x1F,0x3F,0x3F,
    0x3F,0x3F,0x3E,0x38,0x38,0x30,0x80,0x80,0xC0,0xE0,0xF0,0x78,0x3E,0x1F,0x07,0x03,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x03,0x07,0x07,0x07,0x0E,0x0E,0x0E,0x0C,0x1C,0x1C,0x1C,0x1C,
    0x1C,0x0C,0x0E,0x0E,0x0E,0x07,0x07,0x03,0x03,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0xFC,0xCC,0xCC,0xCC,0xFC,0x78,0x00,0x00,0x80,0xC0,
    0xE0,0x60,0x60,0xC0,0xE0,0xE0,0x00,0x00,0x80,0xC0,0xE0,0x60,0x60,0xC0,0xFC,0xFC,0x00,0x00,0xEC,
    0xEC,0x00,0x00,0x80,0xC0,0xE0,0x60,0x60,0xE0,0xC0,0x80,0x00,0x00,0x78,0xFC,0xCC,0x8C,0x9C,0x08,
    0x00,0x00,0xFC,0xFC,0xC0,0x60,0x60,0xE0,0xC0,0x00,0x00,0x80,0xC0,0xE0,0x60,0x60,0xC0,0xE0,0xE0,
    0x00,0x00,0x80,0xC0,0xE0,0x60,0x60,0x60,0xE0,0x40,0x00,0x00,0xFC,0xFC,0x00,0x80,0xC0,0x60,0x20,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x1F,0x00,0x01,0x07,0x1E,0x18,0x00,0x00,0x07,
    0x0F,0x1C,0x18,0x18,0x0C,0x1F,0x1F,0x00,0x00,0x07,0x0F,0x1C,0x18,0x18,0x0C,0x1F,0x1F,0x00,0x00,
    0x1F,0x1F,0x00,0x00,0x07,0x0F,0x1C,0x18,0x18,0x1C,0x0F,0x07,0x00,0x08,0x0C,0x18,0x18,0x19,0x1F,
    0x0F,0x00,0x00,0x1F,0x1F,0x00,0x00,0x00,0x1F,0x1F,0x00,0x00,0x07,0x0F,0x1C,0x18,0x18,0x0C,0x1F,
    0x1F,0x00,0x00,0x07,0x0F,0x1C,0x18,0x18,0x18,0x1C,0x08,0x00,0x00,0x1F,0x1F,0x03,0x07,0x0C,0x18,
    0x10,0x00,0x00,0x18,0x18,0x00,0x00,0x00
    };
     
     
  9. kchriste

    kchriste New Member Forum Supporter

    Joined:
    Jul 23, 2006
    Messages:
    3,677
    Likes:
    47
    Location:
    Victoria BC, Canada
    Don't know for sure, but are the pixels on the LCD actually square? ie: Do the physical display dimensions have the same aspect ratio as 96 x 64?

     
  10. AtomSoft

    AtomSoft Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    5,670
    Likes:
    41
    Location:
    Brooklyn, NY US
    heh never thought of that. Gotta go read the data sheet now .
     
  11. AtomSoft

    AtomSoft Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    5,670
    Likes:
    41
    Location:
    Brooklyn, NY US
    hey guys my newest creation:

    [embed]http://www.youtube.com/v/9aNid3VmXUg[/embed]
     
  12. Mr RB

    Mr RB Well-Known Member

    Joined:
    Jul 22, 2008
    Messages:
    4,716
    Likes:
    194
    Location:
    Out there
    Do you have a non-flash animation that we can download? ie .WMV .AVI etc. Flash is invasive and automated (hence rude forcing people to pay download costs for downloading the flash when they click on the page whether they want to look at it or not), and many people have it disabled.
     
  13. AtomSoft

    AtomSoft Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    5,670
    Likes:
    41
    Location:
    Brooklyn, NY US
    Flash is free and way smaller in size than a AVI so bandwidth shouldnt be a issue. i dont see why not have it just swf? But ill upload a avi to my site 1 minute....
     
    Last edited: Aug 2, 2009
  14. AtomSoft

    AtomSoft Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    5,670
    Likes:
    41
    Location:
    Brooklyn, NY US
  15. gaspode42

    gaspode42 Member

    Joined:
    Feb 7, 2009
    Messages:
    218
    Likes:
    3
    Location:
    UK
    Jason,

    Just so you are aware if you click on the above links, you get a page not found error (or at least I do!)

    Rupert
     
  16. AtomSoft

    AtomSoft Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    5,670
    Likes:
    41
    Location:
    Brooklyn, NY US
    Last edited: Aug 2, 2009
  17. tariq7868

    tariq7868 New Member

    Joined:
    Mar 19, 2009
    Messages:
    116
    Likes:
    3
  18. AtomSoft

    AtomSoft Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    5,670
    Likes:
    41
    Location:
    Brooklyn, NY US
    here is my complete code but its for the LPC2148 and im using the Olimex board. Code is written using Crossworks for ARM.

    This code will show a start screen with my info then after 2 seconds show another screen for collecting SONY (SIRC) infrared data and displaying it to user. Also makes a special tone for each code recieved from 0-9 and POWER. For power it will tone a going up hill type tone and when pressed again it will sound like somethings falling lol

    I was bored :D it sounds real nice tho. My cam wont pick it up well tho. Too noisy i guess.

    Ill have to post a C file or another post cuz it wont fit in this one :D

    Here is the file then.... its originally a CPP file but had to rename to C so i can upload without ZIPping it. :)
     

    Attached Files:

    • main.c
      File size:
      28.5 KB
      Views:
      229
    Last edited: Aug 2, 2009
  19. AtomSoft

    AtomSoft Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    5,670
    Likes:
    41
    Location:
    Brooklyn, NY US
    Now with a UART1 interface at 115200 8-n-1 :

    Called it Olimex.c now since its for that board...
     

    Attached Files:

    • olimex.c
      File size:
      29.5 KB
      Views:
      134
  20. Mr RB

    Mr RB Well-Known Member

    Joined:
    Jul 22, 2008
    Messages:
    4,716
    Likes:
    194
    Location:
    Out there
    Thank you for making the video available Jason. :)
     
  21. AtomSoft

    AtomSoft Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    5,670
    Likes:
    41
    Location:
    Brooklyn, NY US
    hey np at all
     

Share This Page