serout lcd


Closed Thread
Results 1 to 6 of 6

Thread: serout lcd

Hybrid View

  1. #1
    Join Date
    Dec 2005
    Posts
    21

    Default serout lcd

    Hi all,
    this code not work:


    DEFINE OSC 20
    INCLUDE "modedefs.bas"
    PAUSE 1000
    start:
    SEROUT portb.1, 2, [254,1]
    PAUSE 40
    SEROUT portb.1, 2, ["Hello World"]
    PAUSE 400
    GOTO start
    END

    How to?

    I have a LCD devantec 03 serial , 9600 baud
    pic 16f84a 20i/p
    crystal 20 Mhz

    THX
    chip

  2. #2
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default

    Are you sending RS232 at the correct polarity ?

    you are using Mode 2 aka T9600 True polarity @ 9600

    try using N9600 (or mode 6) Inverted Polarity @ 9600

    Presumably the onboard processor on the LCD display takes care of initialisation. does the display accept all normal HD44780 commands or does it have a custom set of commands for serial control of display parameters.

    Can you drive the display from a PC using Hyperterminal or similar.

    If you connect your PIC to a PC, can you see anything in Hyperterminal ?

    Too many things could cause your problem and you havent provieded much info. Can you use a slower baud rate to start with eg 1200
    Keith

    www.diyha.co.uk
    www.kat5.tv

  3. #3
    Join Date
    Dec 2005
    Posts
    21


    Did you find this post helpful? Yes | No

    Default serial command on the LCD DEVANTEC 03

    0 null (ignored) Ignored as a no operation

    1 Cursor Home Sets the cursor to the home position (top left)

    2 Set cursor (1-80) Cursor to a position specified by the next byte, where 1 is the top left and 80 is the bottom right

    3 set cursor (line, column) Sets cursor using two bytes, where first byte is the line and the second byte is the column

    4 Hide cursor stops the position cursor from appearing on the display

    5 Show underline cursor Changes the cursor to the underline type

    6 Show blinking cursor Changes the cursor to the blinking type

    8 Backspace deletes the preceding character from the current position on the display

    9 Horizontal tab (by tab set) Moves the current position across by the tab space set by command 18 (default tab space 4)

    10 Smart line feed Moves the cursor down one line to the position beneath in the same column

    11 Vertical tab Moves the cursor up one line to the position above in the same column

    12 Clear screen Clears the screen and sets cursor to the home position

    13 Carriage Return Moves the cursor to the start of the next line

    17 Clear Column Clears the contents of the current column and moves cursor right by one column

    18 Tab set Sets the required tab size, the following byte can be a size of between 1 and 10

    19 Backlight on Turns the backlight of the LCD03 on

    20 Backlight off (default) Turns the backlight of the LCD03 off

    27 Custom char generator allows 8 custom chars to be built. See custom char generator below

    32-255 ASCII chars Writes ASCII chars straight to the display
    -------------------------

    to use DEBUG?
    THX
    chip

  4. #4
    Join Date
    Aug 2005
    Posts
    95


    Did you find this post helpful? Yes | No

    Default Try this

    Try this.

    DEFINE OSC 20
    INCLUDE "modedefs.bas"
    PAUSE 1000
    start:
    SEROUT portb.1,2,[1]
    PAUSE 40
    SEROUT portb.1,2,[72,101,108,108,111,8,87,111,114,108,100]
    PAUSE 400
    GOTO start
    END

    Assuming where talking about the same display, the above in theory should work. Make shure the jumper is attached on the lcd.

    Sphere...

  5. #5
    Join Date
    Jul 2007
    Posts
    10


    Did you find this post helpful? Yes | No

    Question I have the same problem

    I am having the same problem as the original poster.

    I am using a PIC16F84A with the RS-232 LCD display. I am using a 20MHz ceramic resonator as well. I can't get this simple program to work. I don't know what is wrong. Please help me figure this out...

    @ DEVICE HS_OSC
    DEFINE OSC 20
    INCLUDE "modedefs.bas"
    PAUSE 1000
    Start:
    Serout portb.1, 2, [254,1]
    PAUSE 40
    Serout portb.1, 2, ["Hello World"]
    Pause 400
    Goto Start
    End

  6. #6
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Config Fuses

    Hello,
    I see no mention of config fuse settiings: <br>http://www.picbasic.co.uk/forum/show...iguration+fuse
    <br> Ok, some mention
    If that display is true re232 - methinks you will have to use max232 in between. Most serial LCD
    units are not true RS232 and will work with serout. Search my threads to find code for a serial backpack
    that works really well without using "proprietary commands" It works with Scott Edwards' / Darrel's Bignums code as
    well.
    Last edited by Archangel; - 29th July 2007 at 20:19.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

Similar Threads

  1. A Serial GLCD 128x64 Simple Project
    By Oldspring in forum Off Topic
    Replies: 0
    Last Post: - 8th March 2010, 20:58
  2. Serout to serial servo
    By azmax100 in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 12th August 2009, 16:46
  3. Play with LCD on PICDEM
    By The IceMan in forum mel PIC BASIC
    Replies: 5
    Last Post: - 22nd August 2008, 16:56
  4. LCD will not start
    By btaylor in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 24th May 2007, 02:30
  5. LCD with serout command
    By azispn99 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 6th April 2006, 13:08

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