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
    Last edited: Aug 3, 2009
  2. 3v0

    3v0 Coop Build Coordinator Forum Supporter

    Joined:
    Jul 14, 2006
    Messages:
    9,404
    Likes:
    227
    Location:
    OKLAHOMA USA
    The thing that can bite you on this is that the web pages or IDE you use in the demo may change. Often sooner then you would image.

    3v0
     
  3. AtomSoft

    AtomSoft Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    5,670
    Likes:
    41
    Location:
    Brooklyn, NY US
    heh that makes sense i guess ill skip that or write a hand tutorial and then hopefully they wont change it much :D
     
  4. dave

    Dave New Member

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


     
  5. AtomSoft

    AtomSoft Well-Known Member

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

    Ok im no guru but im sure this will help alot of people....
    I have to show how the delay is counted for. This is a 12 mhz clock solution right now :D
    Code (text):

    /*-- [COLOR="Green"]
    Company:.... AtomSoft
    Author:..... Jason Lopez
     [/COLOR] --*/
    /*-- [COLOR="Green"] Please download --- UM10139: Volume 1: LPC214x User Manual [/COLOR] --*/
    /*-- [COLOR="Green"] As i will refer to it for more info here... [/COLOR] --*/

    #include <LPC214x.h>

    /*-- [COLOR="Green"] We use defines to make the code easy to see and change in the future [/COLOR] --*/
    /*-- [COLOR="Green"] Here i am defining 1 LED as a number. The number is the bit/pin that  [/COLOR] --*/
    /*-- [COLOR="Green"] the LED is connect to on the IC.  [/COLOR] --*/
    #define LED1  10      /*-- [COLOR="Green"] Replace LED1 with 10 [/COLOR] --*/

    /*-- [COLOR="Green"] This will Return (0/1) the value of the bit number specified in the variable [/COLOR] --*/
    /*-- [COLOR="Green"] This is done by getting the current value of the VAR and AND'ing it with [/COLOR] --*/
    /*-- [COLOR="Green"] the value of 1 shifted to the left by the bit number.

        EX: GETBIT(someVar,1)
        Where someVar is originally 0x03 aka 0b00000011

        Would Produce:  0x01  
    [/COLOR] --*/
    #define GETBIT(var,bit) (((var)>>(bit))&1)      

    /*-- [COLOR="Green"] This will SET (1) the value of the specified bit in the variable [/COLOR] --*/
    /*-- [COLOR="Green"] This is done by getting the current value of the VAR and OR'ing it with [/COLOR] --*/
    /*-- [COLOR="Green"] the value of 1 shifted to the left by the bit number.

        EX: SETBIT(someVar,2)
        Where someVar is originally 0x03 aka 0b00000011

        Would Produce:  0x07 aka 0b00000111
    [/COLOR] --*/
    #define SETBIT(var,bit) ((var)|=(1<<(bit)))    

    /*-- [COLOR="Green"] This will Clear (0) the value of the specified bit in the variable [/COLOR] --*/
    /*-- [COLOR="Green"] This is done by getting the current value of the VAR and AND'ing it with [/COLOR] --*/
    /*-- [COLOR="Green"] the "opposite" (~) value of 1 shifted to the left by the bit number.

        EX: CLRBIT(someVar,2)
        Where someVar is originally 0x07 aka 0b00000111

        Would Produce: 0x03 aka 0b00000011
    [/COLOR] --*/
    #define CLRBIT(var,bit) ((var)&=(~(1<<(bit))))     

    /*-- [COLOR="Green"] Prototypes [/COLOR] --*/
    void Initialize(void);
    int main(void);

    /*-- [COLOR="Green"] Initialize is used to set the speed of the CPU and any other init. settings[/COLOR] --*/
    /*-- [COLOR="Green"] This can be named anything but Initialize is a standard [/COLOR] --*/
    void Initialize(void)  {

        PLL0CON=0x0;      /*-- [COLOR="Green"] Disable the PLL [/COLOR] --*/
        PLL0FEED=0xAA;    /*-- [COLOR="Green"] These 2 lines are the feed lines [/COLOR] --*/
        PLL0FEED=0x55;    /*-- [COLOR="Green"] These are a REQUIRED part of the PLL SETUP [/COLOR] --*/
     
        VPBDIV=0x00;      /*-- [COLOR="Green"]  Setting peripheral Clock (pclk) to System Clock (cclk) [/COLOR] --*/
    }

    /*-- [COLOR="Green"] Main is the program start. This is where you start it all [/COLOR] --*/
    int main(void){
        int x;            /*-- [COLOR="Green"] Local Variable. Using this one for local loops [/COLOR] --*/

        Initialize();     /*-- [COLOR="Green"] Call our Initialize Function/Prototype [/COLOR] --*/

        /*-- [COLOR="Green"] PINSELx is used to setup the pins usage. [/COLOR] --*/
        /*-- [COLOR="Green"] In the manual starting on page: 76 [/COLOR] --*/
        /*-- [COLOR="Green"] You will see for each pin in the PINSELx register there are 2 bits to set its purpose [/COLOR] --*/
        /*-- [COLOR="Green"] For example on page 76 you will see that pin ( P0.1 ) can be used for 4 different things [/COLOR] --*/
        /*   [COLOR="Green"]
          00 = GPIO Port........ is general Input or Ouput Pin...On most if not all this is always 00
          01 = RxD (UART0)...... is UART0 Recieve Data Pin
          10 = PWM3............. is Pulse Width Modulation Pin #3
          11 = EINT0............ is External Interrupt Pin #0
        */    [/COLOR]
        /*-- [COLOR="Green"] Knowing this you can easily set the bits in the register [/COLOR] --*/
        /*-- [COLOR="Green"] Since all we need for this lesson is to blink a LED then GPIO for all [/COLOR] --*/

        PINSEL0=0x00000000;     /*-- [COLOR="Green"] Set all pins as GPIO pins [/COLOR] --*/

        /*-- [COLOR="Green"] IODIRx is used to setup the pins direction. Input/Output [/COLOR] --*/
        /*-- [COLOR="Green"] Page 83 refers to this as: [/COLOR] --*/
        /* [COLOR="Green"]
        8.4.1 GPIO port Direction register (IODIR, Port 0: IO0DIR - 0xE002 8008 and
              Port 1: IO1DIR - 0xE002 8018; FIODIR, Port 0: FIO0DIR - 0x3FFF C000
              and Port 1:FIO1DIR - 0x3FFF C020)
        */  [/COLOR]
        /*-- [COLOR="Green"] One of the cool things is that the header LPC214x.h lets you use IOxDIR or IODIRx  [/COLOR] --*/
        /*-- [COLOR="Green"] Where x is the port aka 0 or 1 [/COLOR] --*/
        /*-- [COLOR="Green"] You can see how confusing it would be to use IO0DIR instead of IODIR0 hence the below code [/COLOR] --*/
       
        /*-- [COLOR="Green"] Note that when you set a 1 to any bit in this variable it sets the coresponding pin to output [/COLOR] --*/
        /*-- [COLOR="Green"] and when you set it to a 0 you can guess what will happen... its a input. [/COLOR] --*/

        IODIR0=0xFFFFFFFF;    /*-- [COLOR="Green"] Set all pins as output pins [/COLOR] --*/

    /*-- [COLOR="Green"] Almost all programs have this while(1) loop. This is a endless loop. [/COLOR] --*/
        while(1){
          SETBIT(IOPIN0,LED1);    /*-- [COLOR="Green"] This will set the pin/bit LED1 (10) on IOPIN0 hence sending a 1 (HIGH)  [/COLOR] --*/
          for(x=0;x<100000;x++);  /*-- [COLOR="Green"] This is a loop for xxxx ticks. Its a rough count [/COLOR] --*/

          CLRBIT(IOPIN0,LED1);    /*-- [COLOR="Green"] This will clear the pin/bit LED1 (10) on IOPIN0 hence sending a 0 (LOW)  [/COLOR] --*/
          for(x=0;x<100000;x++);  /*-- [COLOR="Green"] This is a loop for xxxx ticks. Its a rough count [/COLOR] --*/
        }

    }
     
     

    Attached Files:

    Last edited: Aug 4, 2009
  6. DirtyLude

    DirtyLude Well-Known Member

    Joined:
    Aug 5, 2003
    Messages:
    1,904
    Likes:
    56
    Location:
    Toronto, Canada
    You're a major version behind in CrossWorks. Install 2.01. The package manager has been retooled.

    I can't say that installing the processor support was all that difficult to figure out myself. The video tutorial is a good idea, but I'm not sure the subject matter is needed.
     
  7. AtomSoft

    AtomSoft Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    5,670
    Likes:
    41
    Location:
    Brooklyn, NY US
    Ok cool. I wasnt sure about it at first. Its that when i first started i didnt know i had to install these packages and took me a day or so to figure out why i didnt have have anything in my New ProJect window :D

    Ill make a small PDF on it with the newer version.
     
  8. AtomSoft

    AtomSoft Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    5,670
    Likes:
    41
    Location:
    Brooklyn, NY US
    Here is the new code with my final understanding of loops...
    Code (text):

    [COLOR="Green"] /*--
    Company:.... AtomSoft
    Author:..... Jason Lopez
     --*/ [/COLOR]
    [COLOR="Green"] /*-- Please download --- UM10139: Volume 1: LPC214x User Manual --*/ [/COLOR]
    [COLOR="Green"] /*-- As i will refer to it for more info here... --*/ [/COLOR]

    #include <LPC214x.h>

    [COLOR="Green"] /*-- We use defines to make the code easy to see and change in the future --*/ [/COLOR]
    [COLOR="Green"] /*-- Here i am defining 1 LED as a number. The number is the bit/pin that  --*/ [/COLOR]
    [COLOR="Green"] /*-- the LED is connect to on the IC.  --*/ [/COLOR]
    #define LED1  10      [COLOR="Green"] /*-- Replace LED1 with 10 --*/ [/COLOR]

    [COLOR="Green"] /*-- This will Return (0/1) the value of the bit number specified in the variable --*/ [/COLOR]
    [COLOR="Green"] /*-- This is done by getting the current value of the VAR and AND'ing it with --*/ [/COLOR]
    [COLOR="Green"] /*-- the value of 1 shifted to the left by the bit number.

        EX: GETBIT(someVar,1)
        Where someVar is originally 0x03 aka 0b00000011

        Would Produce:  0x01  
    --*/ [/COLOR]
    #define GETBIT(var,bit) (((var)>>(bit))&1)      

    [COLOR="Green"] /*-- This will SET (1) the value of the specified bit in the variable --*/ [/COLOR]
    [COLOR="Green"] /*-- This is done by getting the current value of the VAR and OR'ing it with --*/ [/COLOR]
    [COLOR="Green"] /*-- the value of 1 shifted to the left by the bit number.

        EX: SETBIT(someVar,2)
        Where someVar is originally 0x03 aka 0b00000011

        Would Produce:  0x07 aka 0b00000111
    --*/ [/COLOR]
    #define SETBIT(var,bit) ((var)|=(1<<(bit)))    

    [COLOR="Green"] /*-- This will Clear (0) the value of the specified bit in the variable --*/ [/COLOR]
    [COLOR="Green"] /*-- This is done by getting the current value of the VAR and AND'ing it with --*/ [/COLOR]
    [COLOR="Green"] /*-- the "opposite" (~) value of 1 shifted to the left by the bit number.

        EX: CLRBIT(someVar,2)
        Where someVar is originally 0x07 aka 0b00000111

        Would Produce: 0x03 aka 0b00000011
    --*/ [/COLOR]
    #define CLRBIT(var,bit) ((var)&=(~(1<<(bit))))     

    [COLOR="Green"] /*-- Prototypes --*/ [/COLOR]
    void Initialize(void);
    int main(void);

    [COLOR="Green"] /*-- Initialize is used to set the speed of the CPU and any other init. settings--*/ [/COLOR]
    [COLOR="Green"] /*-- This can be named anything but Initialize is a standard --*/ [/COLOR]
    void Initialize(void)  {

        PLL0CON=0x0;      [COLOR="Green"] /*-- Disable the PLL --*/ [/COLOR]
        PLL0FEED=0xAA;    [COLOR="Green"] /*-- These 2 lines are the feed lines --*/ [/COLOR]
        PLL0FEED=0x55;    [COLOR="Green"] /*-- These are a REQUIRED part of the PLL SETUP --*/ [/COLOR]
     
        VPBDIV=0x00;      [COLOR="Green"] /*--  Setting peripheral Clock (pclk) to System Clock (cclk) --*/ [/COLOR]
    }

    [COLOR="Green"] /*-- Main is the program start. This is where you start it all --*/ [/COLOR]
    int main(void){
        int x;            [COLOR="Green"] /*-- Local Variable. Using this one for local loops --*/ [/COLOR]

        Initialize();     [COLOR="Green"] /*-- Call our Initialize Function/Prototype --*/ [/COLOR]

        [COLOR="Green"] /*-- PINSELx is used to setup the pins usage. --*/ [/COLOR]
        [COLOR="Green"] /*-- In the manual starting on page: 76 --*/ [/COLOR]
        [COLOR="Green"] /*-- You will see for each pin in the PINSELx register there are 2 bits to set its purpose --*/ [/COLOR]
        [COLOR="Green"] /*-- For example on page 76 you will see that pin ( P0.1 ) can be used for 4 different things --*/ [/COLOR]
        [COLOR="Green"] /*
          00 = GPIO Port........ is general Input or Ouput Pin...On most if not all this is always 00
          01 = RxD (UART0)...... is UART0 Recieve Data Pin
          10 = PWM3............. is Pulse Width Modulation Pin #3
          11 = EINT0............ is External Interrupt Pin #0
        */ [/COLOR]
        [COLOR="Green"] /*-- Knowing this you can easily set the bits in the register --*/ [/COLOR]
        [COLOR="Green"] /*-- Since all we need for this lesson is to blink a LED then GPIO for all --*/ [/COLOR]

        PINSEL0=0x00000000;     [COLOR="Green"] /*-- Set all pins as GPIO pins --*/ [/COLOR]

        [COLOR="Green"] /*-- IODIRx is used to setup the pins direction. Input/Output --*/ [/COLOR]
        [COLOR="Green"] /*-- Page 83 refers to this as: --*/ [/COLOR]
        [COLOR="Green"] /*
        8.4.1 GPIO port Direction register (IODIR, Port 0: IO0DIR - 0xE002 8008 and
              Port 1: IO1DIR - 0xE002 8018; FIODIR, Port 0: FIO0DIR - 0x3FFF C000
              and Port 1:FIO1DIR - 0x3FFF C020)
        */ [/COLOR]
        [COLOR="Green"] /*-- One of the cool things is that the header LPC214x.h lets you use IOxDIR or IODIRx  --*/ [/COLOR]
        [COLOR="Green"] /*-- Where x is the port aka 0 or 1 --*/ [/COLOR]
        [COLOR="Green"] /*-- You can see how confusing it would be to use IO0DIR instead of IODIR0 hence the below code --*/ [/COLOR]
       
        [COLOR="Green"] /*-- Note that when you set a 1 to any bit in this variable it sets the coresponding pin to output --*/ [/COLOR]
        [COLOR="Green"] /*-- and when you set it to a 0 you can guess what will happen... its a input. --*/ [/COLOR]

        IODIR0=0xFFFFFFFF;    [COLOR="Green"] /*-- Set all pins as output pins --*/ [/COLOR]

        [COLOR="Green"] /*-- Almost all programs have this while(1) loop. This is a endless loop. --*/ [/COLOR]
        while(1){
          SETBIT(IOPIN0,LED1);    [COLOR="Green"] /*-- This will set the pin/bit LED1 (10) on IOPIN0 hence sending a 1 (HIGH)  --*/ [/COLOR]

          [COLOR="Green"] /*-- A for loop like: for(x=0;x<1;x++); with 1 takes approx 12 cycles to complete.............. --*/ [/COLOR]
          [COLOR="Green"] /*-- A loop with 2 takes 25 Cycles know this we can calculate how long it will take for 500ms.. --*/ [/COLOR]
          [COLOR="Green"] /*-- Since we are at 12 MHz thats 12,000,000 Cycles for 1 second. So it would take............. --*/ [/COLOR]
          [COLOR="Green"] /*-- 6,000,000 cycles for 500mSaka 1/2 second delay and since the loop takes 12-13 cycles for 1 --*/ [/COLOR]
          [COLOR="Green"] /*-- 6,000,000 / 12 = 500000..... So we will use 500000 for our loop........................... --*/ [/COLOR]

          [COLOR="Green"] /*-- If you should need exact timing i suggest you create a delay function and make sure........--*/ [/COLOR]
          [COLOR="Green"] /*-- that it is delaying 6,000,000 cycles. This will do about 4,500,009 cycles due to the.......--*/ [/COLOR]
          [COLOR="Green"] /*-- compiler optimizing the code it will run the empty loop quicker                    ........--*/ [/COLOR]
          [COLOR="Green"] /*-- You have to manually ajust the number. I found that 666666 would gibe me 6,000,003 cycles..--*/ [/COLOR]

          for(x=0;x<666666;x++);  [COLOR="Green"] /*-- This is a loop for 666666 cycles aka instructions. 500mS --*/ [/COLOR]

          CLRBIT(IOPIN0,LED1);    [COLOR="Green"] /*-- This will clear the pin/bit LED1 (10) on IOPIN0 hence sending a 0 (LOW)  --*/ [/COLOR]
          for(x=0;x<666666;x++);  [COLOR="Green"] /*-- This is a loop for 666666 cycles aka instructions. 500mS --*/ [/COLOR]
        }

    }


     
    http://atomsofttech.info/index.php?...e&id=56:lpc2148-blinkc&catid=36:arm&Itemid=55
     
    Last edited: Aug 4, 2009
  9. AtomSoft

    AtomSoft Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    5,670
    Likes:
    41
    Location:
    Brooklyn, NY US
    Here is my full source for the PIC version includes a altered linker file for 18f2525 and complete project ...
     

    Attached Files:

    • 7110.zip
      File size:
      68.3 KB
      Views:
      169
  10. 3v0

    3v0 Coop Build Coordinator Forum Supporter

    Joined:
    Jul 14, 2006
    Messages:
    9,404
    Likes:
    227
    Location:
    OKLAHOMA USA
    I am in the process of working on getting Matt's connector setup working. I have the board and the clamp drilled. It looks like it will align and hold down as it should. To finish it I just need to align the toner mask and etch.

    It has been a while since we talked about this display. Any new developments. Has anyone had connection problems as the copper ages ? I wonder if one sprayed it with clear acrylic if the pins would poke through and make connection ? Has anyone put one in a case ?

    Matt's connection solution
    [​IMG]
     
  11. AtomSoft

    AtomSoft Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    5,670
    Likes:
    41
    Location:
    Brooklyn, NY US
    not yet :( on my side. Soon!! tho. Im making a order from dipMicro on friday for the toner paper and laminator. Ill make some PCBS and let them age :D and see how it goes.

    I have some blue acrylic ill test :)
     
  12. DirtyLude

    DirtyLude Well-Known Member

    Joined:
    Aug 5, 2003
    Messages:
    1,904
    Likes:
    56
    Location:
    Toronto, Canada
    Mark, not Matt.

    I have experimented with another mounting method, which I am using now. I drill a hole through the board, square it off with a file, and put the connector through the board, soldering the connectors to contacts. It means you have to pull the metal contacts down and they are really tough to deal with.

    It's hard to explain, but I'll take some pictures later tonight.
     
  13. DirtyLude

    DirtyLude Well-Known Member

    Joined:
    Aug 5, 2003
    Messages:
    1,904
    Likes:
    56
    Location:
    Toronto, Canada
    This is the board I'm currently using, but I'm making some more that are slightly updated. Same mounting method, though.

    Bending the pins to solder to the boards is pretty tricky as they are really springy. I have to use a needle nose pliers to pull them back first, then I use an exacto knife to hold them down as I solder them.

    The copper is pretty tarnished. I didn't coat the board as I wasn't sure if I would have to change anything.

    Here's the updated Eagle file with both the old and the new footprints.
    http://www.higginstribe.com/sam7/lcd7110/zz-lcd7110.2.zip

    I can't attach documents with the image server down, because the button isn't there. I'll edit and attach once it's fixed.

    [​IMG]
    [​IMG]
    [​IMG]
     

    Attached Files:

    Last edited: Sep 30, 2009
  14. 3v0

    3v0 Coop Build Coordinator Forum Supporter

    Joined:
    Jul 14, 2006
    Messages:
    9,404
    Likes:
    227
    Location:
    OKLAHOMA USA
    Mark. :)
    I like the way the board sits flat with the new design.
    It looks like I can use the drilled PCB with a new foil pattern.

    3v0
     
  15. DirtyLude

    DirtyLude Well-Known Member

    Joined:
    Aug 5, 2003
    Messages:
    1,904
    Likes:
    56
    Location:
    Toronto, Canada
    I've attached the images now.

    The LCD is so useful and easy to use, it's a big asset. I've ported the library to Stellaris and stripped down a version for the MSP430, that I might strip down even more to just using capital letters.

    I'm planning on using the LCD in a box with a touchscreen on top of it. The touchscreen is bigger than the LCD, but I can make static touch areas outside the LCD dimensions. I have one enclosure that is almost perfect, but just slightly too small for the touchscreen, which bumps into the mounting hardware for the screws. I'll take the touchscreen to my local electronics store next time I go. They have a pretty big selection of enclosures.
     
  16. 3v0

    3v0 Coop Build Coordinator Forum Supporter

    Joined:
    Jul 14, 2006
    Messages:
    9,404
    Likes:
    227
    Location:
    OKLAHOMA USA
    A PCB with a precision interior hole looks like a good reason to try (learn) isolation milling to make the PCB. I need to see if I can dig up a useable V milling bit.

    3v0
     
  17. ThermalRunaway

    ThermalRunaway New Member

    Joined:
    Apr 9, 2005
    Messages:
    895
    Likes:
    4
    Location:
    South Wales, UK
    Hi Jason,

    I've decided to play around with my old Nokia 7110 display. I did some google searching to see what all the other hobbyists get up to with them, and what do I find? You're already way ahead of me. Cool!

    So I've taken a look at your code and most of it seems sensible. I'm hoping to use the SSP module to do the talking though so we'll see how that goes.

    Anyway, having had a brief look at your code I came across your reset function:

    void LCD_Reset(void){
    CS = 1;
    Delay1KTCYx(17); //Delay 85mS
    RST = 1;
    Delay1KTCYx(17); //Delay 85mS


    Now, it is my understanding that the reset function is active-low. So, should your code not be something like:

    Code (text):

    void lcd_reset (void)
    {
           RST = 0 ;                            // I previously defined RST as the relevant pin on my PIC
           delay (14000) ;                   // Wait some time (this number is specific to my own delay function)
           RST = 1 ;                           // Return RST high
           delay (14000) ;
    }
     
    Is your reset function not incorrect? Please let me know!

    I like the progress you guys are making with a suitable home made connection adaptor. I'd be very interested to keep in touch with this thread and see how you get on with it, because I could use one myself.

    Cheers,

    Brian
     
  18. ThermalRunaway

    ThermalRunaway New Member

    Joined:
    Apr 9, 2005
    Messages:
    895
    Likes:
    4
    Location:
    South Wales, UK
    Also, I have this (very nit-picky) comment to make about the comments in your main () function:

    You wrote:

    LCDt = 0x00;
    LCD_Init();
    CLS();

    LCD_Send(0xB0,0); //Page 0 (0xBx (x = page))
    LCD_Send(0x11,0); //Column Upper Nybble (0x1x) (x = upper Nybble)
    LCD_Send(0x02,0); //Column Lower Nybble (0x0x) (x = upper Nybble)
    LCDString((rom unsigned char*)" AtomSoft",1);

    LCD_Send(0xB2,0); //Page 1 (0xBx (x = page))
    LCD_Send(0x11,0); //Column Upper Nybble (0x1x) (x = upper Nybble)
    LCD_Send(0x02,0); //Column Lower Nybble (0x0x) (x = upper Nybble)
    LCDString((rom unsigned char*)"New Tech.",1);

    LCD_Send(0xB3,0); //Page 0 (0xBx (x = page))
    LCD_Send(0x11,0); //Column Upper Nybble (0x1x) (x = upper Nybble)
    LCD_Send(0x02,0); //Column Lower Nybble (0x0x) (x = upper Nybble)
    LCDString((rom unsigned char*)" New World",1);

    LCD_Send(0xB4,0); //Page 1 (0xBx (x = page))
    LCD_Send(0x11,0); //Column Upper Nybble (0x1x) (x = upper Nybble)
    LCD_Send(0x02,0); //Column Lower Nybble (0x0x) (x = upper Nybble)
    LCDString((rom unsigned char*)" New You",1);

    LCD_Send(0xB6,0); //Page 1 (0xBx (x = page))
    LCD_Send(0x11,0); //Column Upper Nybble (0x1x) (x = upper Nybble)
    LCD_Send(0x02,0); //Column Lower Nybble (0x0x) (x = upper Nybble)
    LCDString((rom unsigned char*)" Thank You",1);
    while(1){
    }

    But, it appears the page numbers are incorrect in some places (only in your comments).

    Should it not read:

    LCDt = 0x00;
    LCD_Init();
    CLS();

    LCD_Send(0xB0,0); //Page 0 (0xBx (x = page))
    LCD_Send(0x11,0); //Column Upper Nybble (0x1x) (x = upper Nybble)
    LCD_Send(0x02,0); //Column Lower Nybble (0x0x) (x = upper Nybble)
    LCDString((rom unsigned char*)" AtomSoft",1);

    LCD_Send(0xB2,0); //Page 2 (0xBx (x = page))
    LCD_Send(0x11,0); //Column Upper Nybble (0x1x) (x = upper Nybble)
    LCD_Send(0x02,0); //Column Lower Nybble (0x0x) (x = upper Nybble)
    LCDString((rom unsigned char*)"New Tech.",1);

    LCD_Send(0xB3,0); //Page 3 (0xBx (x = page))
    LCD_Send(0x11,0); //Column Upper Nybble (0x1x) (x = upper Nybble)
    LCD_Send(0x02,0); //Column Lower Nybble (0x0x) (x = upper Nybble)
    LCDString((rom unsigned char*)" New World",1);

    LCD_Send(0xB4,0); //Page 4 (0xBx (x = page))
    LCD_Send(0x11,0); //Column Upper Nybble (0x1x) (x = upper Nybble)
    LCD_Send(0x02,0); //Column Lower Nybble (0x0x) (x = upper Nybble)
    LCDString((rom unsigned char*)" New You",1);

    LCD_Send(0xB6,0); //Page 6 (0xBx (x = page))
    LCD_Send(0x11,0); //Column Upper Nybble (0x1x) (x = upper Nybble)
    LCD_Send(0x02,0); //Column Lower Nybble (0x0x) (x = upper Nybble)
    LCDString((rom unsigned char*)" Thank You",1);
    while(1){
    }

    Keep up the real good work! You're way ahead of me that's for sure.

    Mine isn't working at the moment. I can't get my initialise function to work. I'm in one of those horrible situations where I'm not quite sure if my code is not working, or if the LCD is actually faulty. But it's such a big job to swap the LCD (I've hard wired it) that I'm persevering with the code for now.... :-/

    Bri
     
  19. AtomSoft

    AtomSoft Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    5,670
    Likes:
    41
    Location:
    Brooklyn, NY US
    those are the comments only... the code is ok. Thats just my demo code to show text in certain areas on screen. I just copied and pasted and got lazy on comments
     
  20. ThermalRunaway

    ThermalRunaway New Member

    Joined:
    Apr 9, 2005
    Messages:
    895
    Likes:
    4
    Location:
    South Wales, UK
    Yep I understand that they're your comments and that the code is okay, that's fine. I've often found myself making similar CTRL-C, CTRL-V errors. Just thought I'd point them out in case you wanted to change them :)

    Still no luck with my own code. I've found this website:

    sed1565 based displays (serdisplib)

    And I think I'm going to build the interface described and try his PC based software. That will at least confirm that the LCD is definitely working. At the moment, any time I work on the code my mind is clouded with doubts about the display so one way or another I think I need to clear that up.

    I checked out your You Tube page by the way. Very cool stuff.

    Cheers,

    Brian
     
  21. AtomSoft

    AtomSoft Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    5,670
    Likes:
    41
    Location:
    Brooklyn, NY US
    heh good luck and i hope your screen is fine

    oops...

    forgot to say thanks for the tip.
     
    Last edited: Nov 4, 2009

Share This Page