Problem runing my code


Results 1 to 34 of 34

Threaded View

  1. #2


    Did you find this post helpful? Yes | No

    Default Try this

    Hi Mus.me

    I think it would be helpful if you include a schematic showing how your LCD is connected so other will find it easier to help you :-)

    Is it a serial LCD HD44xxxx or a 7-segment LCD?
    Does it work standalone(not connected to the pic) ?
    Does the LCD work if it directly connected to the PIC
    Which ports is it connected to ?
    The define statements helped me ;-) but I am using a 2x16 LCD but I do realize you may be using a 7 segment LCD

    Code:
    'LCD defines begin here   
            DEFINE LCD_BITS 4 	'defines the number of data interface lines (4 or 8) 
            DEFINE LCD_DREG PORTD 	'defines the port where data lines are connected to
            DEFINE LCD_DBIT 4 	'defines the position of data lines for 4-bit interface (0 or 4)
            DEFINE LCD_RSREG PORTD 	'defines the port where RS line is connected to
            DEFINE LCD_RSBIT 2 	'defines the pin where RS line is connected to 
            DEFINE LCD_EREG PORTD 	'defines the port where E line is connected to 
            DEFINE LCD_EBIT 3 	'defines the pin where E line is connected 
            DEFINE LCD_COMMANDUS 2000 	'defines the delay after LCDOUT statement 
            DEFINE LCD_DATAUS 200 		'delay in micro seconds
    'END of LCD DEFINES
    And maybe connect it as included diagram shows
    in this post that I made (ignore the PIC model , just make sure that whatever port you use you have set if for input eg. TRIS PORTX=%11111111)
    http://www.picbasic.co.uk/forum/showthread.php?t=12179

    I apologize if I have read your post completely wrong :-(

    Hope this helps

    Kind regards
    Dennis
    Last edited by Dennis; - 22nd November 2009 at 21:48.

Similar Threads

  1. Reading in Manchester code
    By brid0030 in forum Code Examples
    Replies: 0
    Last Post: - 10th March 2009, 21:55
  2. 16F883 Code Verify Problem
    By munromh in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 19th February 2009, 11:47
  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. Code problem
    By chai98a in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 20th May 2006, 04:43

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