Cannot write whole 16 characters using 16x1 lcd


Closed Thread
Results 1 to 7 of 7
  1. #1
    Join Date
    Sep 2007
    Posts
    19

    Unhappy Cannot write whole 16 characters using 16x1 lcd

    I have no problem with 16x2 LCD but when I swap to 16x1 unit, cannot do whole 16 character fill in and cuts off after 8th charactor on a single line.

    Any solution?

    Code: Default for 16x2,

    define lcd_dreg portc
    define lcd_dbit 0
    define lcd_rsreg portc
    define lcd_rsbit 4
    define lcd_ereg portc
    define lcd_ebit 5
    define lcd_bits 4
    define lcd_lines 2
    define lcd_commandus 2000
    define lcd_dataus 44

    Example
    LCDOUT $FE,1,"Hello World" ' works fine for 16x2

    for 16x1 unit, this is what occurs using 16x1 displayed as Hello Wo, where's the "rld", cuts off after 8th character.


    using Lumex LCM-S01601DSF.

  2. #2
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    966


    Did you find this post helpful? Yes | No

    Default

    The 16x1 LCD is organized as 8x2 lines display. So, you need to write the 2nd 8 characters as line 2. I am not sure of the addresses though right now.

    Jerson

  3. #3
    Join Date
    Dec 2005
    Location
    So Cal and loving it
    Posts
    40


    Did you find this post helpful? Yes | No

    Default

    Could be C0 or 88.
    If not you will have to make a small program to cycle through the different addresses until you find the 9 char address.

    Paul
    +-------------------------------------------------------------------+
    | PBP 2.47/2.50 | MCS+ 3.0.0.5 | U2 Prog | Vista x64 | NO SLEEP!!!!!!! |
    +-------------------------------------------------------------------+

  4. #4
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Talking Humour ...

    Vista 32 | NO SLEEP!!!!!!!

    LOL !!!

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  5. #5
    Join Date
    Dec 2005
    Location
    So Cal and loving it
    Posts
    40


    Did you find this post helpful? Yes | No

    Default

    LOL,

    There seem to be lots of people that do not get on with Vista, but my new laptop came with Vista and it has been very stable sytem so far.

    Just lucky I quess.....

    Paul
    +-------------------------------------------------------------------+
    | PBP 2.47/2.50 | MCS+ 3.0.0.5 | U2 Prog | Vista x64 | NO SLEEP!!!!!!! |
    +-------------------------------------------------------------------+

  6. #6
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    966


    Did you find this post helpful? Yes | No

    Default

    Ok, here it is - just so you can sleep

    Code:
    /* Write ASCIIZ String to LCD at specified row and column from *Buffer */
    void LCD_puts(byte code *Buffer){
    byte x;
    
    	LcdColumn = 0;
    	LCD_write(0x80,CMD);
      while (x = *Buffer++)	{
    		LCD_write(x,DATA);
    		if (LcdColumn++ == 7) LCD_write(0xc0,CMD);
    	}
    }
    CMD is the command register of the LCD, DATA is the data register. Addresses are 0x80 and 0xc0


    JF

  7. #7
    Join Date
    Sep 2007
    Posts
    19


    Did you find this post helpful? Yes | No

    Default Wish it as full 16x1 instead of running 8x2 program.

    I had it working before anyone posted my question. I using code what was used for 8x2 and 16x2, it filled out correctly but uses more codes to do this instead of regular 16x2.

Similar Threads

  1. Play with LCD on PICDEM
    By The IceMan in forum mel PIC BASIC
    Replies: 5
    Last Post: - 22nd August 2008, 16:56
  2. PIC16F684 + LCD to use the 256bytes of EEPROM - HELP
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 7th March 2008, 14:19
  3. Changing declared variables names on the fly
    By jessey in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 16th December 2006, 06:34
  4. LCD 16 characters inline: only first 8 work
    By Mugel in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 20th October 2006, 22:07
  5. 8 Characters only on 16x1 LCD
    By docwisdom in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 12th February 2006, 07:32

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts