Dummy needs LCD tutorial,


Closed Thread
Results 1 to 33 of 33

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    already posted a question about it, but did not get any answer
    Sorry about that!   I was purposely ignoring it.

    Some other guy came in here and said that "The Other compiler" did everything that PicBasic Pro didn't.   So, I didn't think you needed it.

    "I picked a bad day to stop sniffing glue" - Airplane.

    But seriously folks,  R2 is a PicBasic Pro system variable that holds the modulas remainder after a 31x15 divide with the DIV32 command.  I don't use "The Other compiler", so I really don't know how you would do that.
    <br>
    DT

  2. #2
    TK5EP's Avatar
    TK5EP Guest


    Did you find this post helpful? Yes | No

    Default Different way to store CGRAM ?

    Hi again !

    I found a small example of a bargraph that i can make working with the demo version. I can't include Darrel's include...

    It works OK, and i could modifiy it to my needs, i understood almost all the code except the method used to store in the CGRAM :
    Lcdout $FE,64,0,0,0,0,0,0,0,0 ' blank
    Lcdout $0,$10,$10,$10,$10,$10,$10,$0 ' |
    Lcdout $0,$14,$14,$14,$14,$14,$14,$0 ' ||
    Lcdout $0,$15,$15,$15,$15,$15,$15,$0 ' |||

    Following the different other codes i've found, i would have done it this way :
    lcdout $FE,$40,$00,$00,$00,$00,$00,$00,$00,$00
    lcdout $FE,$48,$10,$10,$10,$10,$10,$10,$10,$00
    lcdout $FE,$50,$14,$14,$14,$14,$14,$14,$14,$00
    lcdout $FE,$58,$15,$15,$15,$15,$15,$15,$15,$00

    or for last line lcdout $FE,$58,REP $15\7,$00

    How is the 1st method working ??

    BTW what does LCDOUT $FE,$CE make ?

    also LCDOUT $FE,$80+1 would move the cursor to first line second character ?

    FYI, i changed from the "other" compiler to MELabs one.... ;-)

    Greetings,

  3. #3
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    CGRAM is just a 64 byte contiguous block of RAM. Once you set the address to write to, you can just continue sending bytes untill your done, or you reach the end of RAM. So, your first group of LCDOUT's will set 4 custom chars, starting at location 0.

    The second group accomplishes the same thing, but also sends the address for the character each time. As long as your not going to be changing things, the first group uses less code and execution time, but the second group is easier to cut&paste into other programs, since the address goes with it. &nbsp; "6 of 1, half dozen of the other".

    $FE,$CE will move the cursor to the 15th character on the second line.

    and, correct on the $FE,$80+1
    <br>
    Last edited by Darrel Taylor; - 1st October 2005 at 05:59.
    DT

  4. #4
    Join Date
    Jun 2005
    Location
    Wisconsin
    Posts
    382


    Did you find this post helpful? Yes | No

    Default

    I'm working on a project right now that is displaying a similar LCD display. I have a bargraph for the bottom of the display and text values for the top.

    I used the following basic stamp project as a template to start from.

    http://www.parallax.com/html_pages/r...PM_display.asp

    With PBP you don't have to mess around with all the nibbles that are in this problem. Also you will need to alter some of the variables. In the end I stripped out all the subroutines that write to the display and just used LCDout. Works great! It took a little bit to understand some of the math but once you have that it makes compelete sense and works well.

  5. #5
    TK5EP's Avatar
    TK5EP Guest


    Did you find this post helpful? Yes | No

    Default All display problem solved, but ...

    Hi all,

    And thanks for all the infos. Now i've understood most problems and i can display almost all what i want and it will be enough for my project.
    I have to measure currents and voltages that are moving rapidly, they follow the voice shape.
    I used the code sent here in this post by Acetronics. I removed all what i did not need and it works perfectly.

    As the display is moving fast, it would be nice if i could display a "holding bar" for a few moments at the peak value.

    What is the best way to store the peak value in a variable ?
    Maybe somebody has already made a similar code ?

    For the moment i did not use an analog input, i randomly generate the values.

    Greetings,

Similar Threads

  1. Is this code not initialising the LCD properly?
    By Platypus in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 30th January 2010, 19:14
  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. LCD Problem
    By karenhornby in forum General
    Replies: 3
    Last Post: - 19th June 2008, 11:43
  4. LCD will not start
    By btaylor in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 24th May 2007, 02:30
  5. Dedicated LCD Controller question
    By chuckles in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 27th February 2006, 14:44

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