Lcd pin out help


Closed Thread
Results 1 to 16 of 16

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,132


    Did you find this post helpful? Yes | No

    Default

    So, do you think that using an 7805 is an option? So even if you have a 100Volt/100 Amp Power supply, your PIC circuit will be a bit safer.

    Ioannis

  2. #2
    smeghead's Avatar
    smeghead Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Ioannis View Post
    So, do you think that using an 7805 is an option? So even if you have a 100Volt/100 Amp Power supply, your PIC circuit will be a bit safer.

    Ioannis
    i had one on the board but didnt connect it, simply a case of stupidity on my part :lol:

  3. #3
    smeghead's Avatar
    smeghead Guest


    Did you find this post helpful? Yes | No

    Default

    with the help from forum members and a lot of reading i managed to get the lcd working, again my stupidity came into play ,i defined the 16f628a to use the internal osc but it would not work ,so put an external xtal in the circuit and it worked. so thanks again

    a new question i want to use a 1 wire temp sensor as per the example code, now i know i can define the lcd to port b, but the bit i cant seem to get my head around is how to move the lcd pins db7 this shows as porta.3 in the sample code so i assume it will want portb.3 if i move the lcd to portb, also the e line shows as portb.3 in the sample code, so am i right in thinking i can move the e line by using the following and specifing an unused pin say portb.5 i.e

    Define LCD_EREG PORTb
    Define LCD_EBIT 5

    another thing i cant get to grips with is displaying 2 seperate pieces of info one a line ,

    say
    fan1 on fan2 off
    i plan on using 4 different gosubs with an lcdout to show the 4 states of the fan,

    is there any way to make the on and off words appear as say

    fan1 (a) fan2 (b)

    where (a) and (b) say off or on by using only 1 lcdout command

    can i use something like
    lcdout $fe, 1
    pause 500
    lcdout fan1 (a) fan2 (b)
    if temperature =21 then let (a)=on and (b)=off
    if temperature =23 then let (a)=off and (b)= on

    lastly how can i display a custom character more than once on a line ie if i make a smiley and want to use it 6 times (its say written to the lcd in the first memory slot)

    LCDOUT $fe,$c0,0,0,0,0,0 'write smiley six times
    when i tried it it just wrote it the once

    i hope this makes sence to someone
    many thanks in advance

  4. #4
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Code:
    LCDOUT $fe,$c0,0
    LCDOUT $fe,$c1,0
    LCDOUT $fe,$c2,0
    LCDOUT $fe,$c3,0
    LCDOUT $fe,$c4,0
    LCDOUT $fe,$c5,0
    LCDOUT $fe,$c6,0
    What does "smeghead" mean?
    Dave
    Always wear safety glasses while programming.

  5. #5
    smeghead's Avatar
    smeghead Guest


    Did you find this post helpful? Yes | No

    Default

    many thanks for the reply ,erm me username i'll pm you :lol:

  6. #6
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    The four data lines (4 bit mode) have to be on the same port going from 0-3 or 4-7.
    The othe two lines can be anywhere.
    Example:
    Code:
    DEFINE LCD_DREG     PORTC
    DEFINE LCD_DBIT     0
    DEFINE LCD_RSREG    PORTD
    DEFINE LCD_RSBIT    1
    DEFINE LCD_EREG     PORTD
    DEFINE LCD_EBIT     0
    DEFINE LCD_BITS     4
    DEFINE LCD_LINES    2
    DEFINE LCD_COMMANDUS    2000
    DEFINE LCD_DATAUS   50
    This is all standard.
    Darrel has a trick called LCD AnyPin that does as the name implies. Non standard

    can i use something like
    lcdout $fe, 1
    pause 500
    lcdout fan1 (a) fan2 (b)
    if temperature =21 then let (a)=on and (b)=off
    if temperature =23 then let (a)=off and (b)= on
    Try something like
    If temperature is whatever gotsub a subroutine.
    Dave
    Always wear safety glasses while programming.

  7. #7
    smeghead's Avatar
    smeghead Guest


    Did you find this post helpful? Yes | No

    Default

    cheers again have already wrote 4 subroutines for the various temperature fan states . just wondered if i could do it the other way will have a search for darrels ant pin routine

Similar Threads

  1. Is this a K Type sensor?
    By jessey in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 21st November 2009, 13:55
  2. 16f688 LCD what have I done wrong
    By spitfiredriver in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 8th August 2009, 19:54
  3. DS1820 with 16f688
    By jessey in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 23rd May 2009, 05:07
  4. Microcontroller with 2 way paging application problem
    By oneohthree in forum mel PIC BASIC Pro
    Replies: 30
    Last Post: - 20th April 2007, 17:27
  5. Another RTC, DS1287
    By DavidK in forum Code Examples
    Replies: 0
    Last Post: - 12th December 2006, 17: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