PIC18F4525 & LCD simple code problem


Results 1 to 8 of 8

Threaded View

  1. #1
    Join Date
    Nov 2007
    Posts
    13

    Default PIC18F4525 & LCD simple code problem

    Hi,

    I am new to any kind of programming and I am using PicBasic Pro to program PIC18F4525. I am hooking up the PIC to a parallel LCD screen which has HD44780 controller (16X2). I am just trying to test the connection and the working of the LCD by writing a code which displays a one line test statement. I am using Micro Code Studio.

    The LCD screen is not displaying the message I want it to and remains blank. I know this is a very minor issue, but I am doing this stuff for the first time !!!

    The LCD is connected to 4 pins of the PIC, since it is in 4 bit mode.

    Please help me out with this....I would really appreciate it !!!


    Here is the code -


    DEFINE OSC 20

    '******Setting up the LCD display******

    DEFINE LCD_DREG PORTB
    DEFINE LCD_DBIT 4
    DEFINE LCD_RSREG PORTB
    DEFINE LCD_RSBIT 7
    DEFINE LCD_EREG PORTB
    DEFINE LCD_EBIT 6
    DEFINE LCD_BITS 4
    DEFINE LCD_LINES 2
    'DEFINE LCD_COMMANDUS 2000
    'DEFINE LCD_DATAUS 50

    TRISB=0

    LCDOUT $FE, 1
    LCDOUT "PIC - LCD Test "
    LCDOUT $FE, $C0

    STOP

    END
    Last edited by aggie007; - 2nd November 2007 at 00:56.

Similar Threads

  1. Problem with PIC18F458 ADC code
    By minmin in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 1st June 2011, 08:13
  2. Strange LCD problem with PIC16F876A
    By Glenn in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 15th October 2009, 08:56
  3. Making Program Code Space your playground...
    By Melanie in forum Code Examples
    Replies: 15
    Last Post: - 19th July 2008, 08:26
  4. problem with my code
    By civicgundam in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 3rd February 2008, 01:52
  5. Apparent code size problem
    By eetech in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 30th July 2007, 15:51

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