LCD BARgraphs


Closed Thread
Results 1 to 40 of 233

Thread: LCD BARgraphs

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    I am trying to make it as fast as possible in response. The program is doing other things too so cannot affort delays in tables to choose one of 60.
    Ouch.

    I think tying to calculate it is going to take a lot longer than a Table Lookup. (I do mean A LOT)

    Maybe Alain's way might be better.

    Up to you, if you want to try.
    <br>
    DT

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Default

    Hi, Ioannis

    Nothing Quicker than a lookup table ... ( PbP lookup not slower than ASM ... cause it's written quite the same !!! )

    That's the way used for automobile ignitions ... where we count the µs ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  3. #3
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,170


    Did you find this post helpful? Yes | No

    Default

    Thanks. I will see which way I am going to choose. After all precision is not important when displaying audio levels, isn't it? So a table might be better.

    Ioannis

    Edit: That post was meant as an answer to Darrel, but it came 1 min after yours Alain. But it fit both! Mysterious ways this forum works!
    Last edited by Ioannis; - 21st June 2007 at 12:07.

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


    Did you find this post helpful? Yes | No

    Default

    Sorry, just another Shameless Plug.

    Here's a way you might be able to implement the Lookup Table.
    http://www.picbasic.co.uk/forum/show...php?t=3891#LAB

    Quietly blushing,
    DT

  5. #5
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,170


    Did you find this post helpful? Yes | No

    Default

    Hmm, thats very clever. I think is faster too!

    Hands on experiment!

    Thanks Darrel.

    Ioannis

  6. #6
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Talking quick and acceptable ...

    Hi, Ioannis

    this will be smaller ... but not faster. ( operations are still the same ...)

    Smaller ??? not sure ... still need 14 bits per value ...

    BUT ...

    as only 6 bits used per value, could try Value.Highbyte and Value.lowbyte to place 2 values in 1 location ...


    just an idea ... but really fun a table loading !!!

    mmmm, stupid idea: if you have 60 ( ? ) free locations in the RAM ( You did not tell us about the processor ...), you could download from the EEPROM to the RAM at each power-up ... and use a "simple" 60 values Array.

    no faster way !!!

    If you want to get a bit more precision ... you can linearize between two points ( "ax+b" line ) doesn't use much CPU ...

    that will be "less false" ... LOL

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  7. #7
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    mmm, kinda mix with embedded strings in your code space and lookup table...
    So the Excel sheet would have to pack it in 14Bit and later you use DA.

    How's that sound? pretty bad to me as the unpacking method will certainely be slightly longer to execute than reading a single Byte for a DT, DW table ...
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  8. #8
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Unhappy some more reflexions ...

    Hi, Steve

    Yess ... the packing method could work great if we had a 1 value to 1 Value "translation"

    I think the problem is a bit more complicated than we think at first ...

    we have to convert a 256 values log scale ( I do not want to think to 10 bits !!! ) to a 60 values lin scale ...

    so, many input values have the same output result ...
    Much,much room left !!!

    What's the ADC resolution needed if we want a 1 dB precision output, even @ - 40 dB ???
    Much,much,much,much,much,much room left !!! ... 255 values limit fully exploded !!!


    Could we think to a BIG Select Case statement with 59 times " Case is < $xx or $xxxx" ... I do not know about the CPU time used ...

    but it seems a lot easier to write and calculate.

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

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, 20:14
  2. 16f688 LCD what have I done wrong
    By spitfiredriver in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 8th August 2009, 20:54
  3. Play with LCD on PICDEM
    By The IceMan in forum mel PIC BASIC
    Replies: 5
    Last Post: - 22nd August 2008, 17:56
  4. Need help with LCD number display.
    By Steve Matson in forum mel PIC BASIC
    Replies: 8
    Last Post: - 27th June 2007, 00:07
  5. LCD will not start
    By btaylor in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 24th May 2007, 03:30

Members who have read this thread : 2

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