Serial LCD syntax help


Closed Thread
Results 1 to 23 of 23

Hybrid View

  1. #1
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    938


    Did you find this post helpful? Yes | No

    Default Not yet...

    Well,

    I've still some trouble. Characters appears but nothing consitant or logical.

    I have attached both explanations I have about how to send commands to the display (in German "D" and English "E"). Don't be afraid, they're very short.

    The display is directly connected through a 1k resistor to the PIC.

    I've set the baudrate to 300 now; but still strange characters appear.

    I have also tried out all the 300bds and 2400bds modes described in the Compiler's manual without any success.

    Here's my code:
    Code:
    '-------------------------------------------------------------------------------
    ' Fuses
    @ DEVICE PIC16F88,INTRC_OSC_NOCLKOUT
    @ DEVICE PIC16F88,PROTECT_OFF
    @ DEVICE PIC16F88,WDT_OFF
    @ DEVICE PIC16F88,PWRT_ON
    @ DEVICE PIC16F88,MCLR_ON
    @ DEVICE PIC16F88,BOD_OFF
    @ DEVICE PIC16F88,LVP_OFF
    @ DEVICE PIC16F88,CPD_OFF
    @ DEVICE PIC16F88,DEBUG_OFF
    @ DEVICE PIC16F88,CCPMX_OFF
    
    '-------------------------------------------------------------------------------
    ' Registers
    PORTB       = %00000000  'Drive all ports B low
    TRISB       = %00000000  'Segments - Set Inputs/Outputs on PORTBs (direction)
    OSCCON      = %01100000  'Internal RC set to 4MHz
    ANSEL       = %00000000  'Disable Analogue Inputs
    ADCON0      = %00000000  'A/D converter is OFF
    
    '-------------------------------------------------------------------------------
    ' Circuitery
    'PORTB.0 = TX
    
    '-------------------------------------------------------------------------------
    ' Init
    DEFINE SER2_BITS 8 'Set number of data bits for Serin2 and Serout2 
    'DEFINE SER2_ODD 1 'Use odd parity instead of even parity 
    Data_Out VAR PORTB.0
    
    '-------------------------------------------------------------------------------
    ' Program
    pause 1000  'Stabilize the PIC (mybe not needed)
    serout2 data_out , 36081, [27,76,$0]
    end
    Any idea what I'm doing wrong?
    Attached Images Attached Images   
    Roger

  2. #2
    Join Date
    Sep 2004
    Location
    Mentor, Ohio
    Posts
    352


    Did you find this post helpful? Yes | No

    Smile

    Hi Flotul,

    What is the baud rate of the Serial Module on the LCD? Most of the ones I have seen are either 2400 or 9600. With the internal clock at 4mhz the best you can hope for is 2400 because of the not so stable clock freq. I use a Seetron Serial LCD @2400 and it works fine. I have some other Serial LCD's that I am trying that I got from Wulfden.org but he has a different command structure that uses ? in fron of the command letter. I get data displayed but it's all running together. Always the time factor.

    Try putting a crystal or resonator on your PIC and see if theat doesn't help.

    HTH,

    BobK

Similar Threads

  1. LCD serial backpacks
    By Archangel in forum Serial
    Replies: 67
    Last Post: - 30th December 2010, 04:51
  2. Please help with EDE702 - Serial to LCD interface
    By Tomexx in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 30th October 2008, 02:48
  3. Play with LCD on PICDEM
    By The IceMan in forum mel PIC BASIC
    Replies: 5
    Last Post: - 22nd August 2008, 16:56
  4. Serial LCD
    By Tobias in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 15th November 2007, 08:31
  5. Need help with LCD number display.
    By Steve Matson in forum mel PIC BASIC
    Replies: 8
    Last Post: - 26th June 2007, 23:07

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