after all ... PBP is not so bad ...


Closed Thread
Results 1 to 24 of 24

Hybrid View

  1. #1
    Join Date
    Sep 2007
    Location
    USA, CA
    Posts
    271


    Did you find this post helpful? Yes | No

    Default

    That is quite good. PDS only gets it down to 457, with 25 variables used.
    (PBP uses 32 variable bytes.) Where PDS really shines, however, is when the file gets very large, when you use interrupts (it's built in; Darrel's utility is not needed), and with great implementation of mixing words and longs.

  2. #2
    Join Date
    May 2007
    Posts
    604


    Did you find this post helpful? Yes | No

    Default

    Might be interesting if you would post your findings over at the mikroE forums.

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by rmteo View Post
    Might be interesting if you would post your findings over at the mikroE forums.
    I do think it would be a very bad idea ...

    totally unfair, overall ...

    much too wide a gap !!! , don't you think ???

    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 " !!!
    *****************************************

  4. #4
    Join Date
    May 2007
    Posts
    604


    Did you find this post helpful? Yes | No

    Default

    It could be an incentive for them to improve their products to be as good as PBP.

  5. #5
    Join Date
    Aug 2005
    Location
    Michigan, USA
    Posts
    224


    Did you find this post helpful? Yes | No

    Default

    Hi Alain,

    Thank you for posting the examples. May I impose to ask about the analog signal you're measuring and how it relates to degrees port and starboard? It seems you're sensing the port and starboard switch over at 4.020 volts (adc value 823). I'm just wondering if you couldn't use a different formula to produce the same results and eliminate the step of converting adc values of 0..1023 to voltage 0..4995-mvolts).

    Kind regards, Mike

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


    Did you find this post helpful? Yes | No

    Default

    How about using in PBP 2.60 Long variables as in the MkB examples?

    Also the LongintTostr(angle,valeur) function if replaced with a lines of commands like in PBP to do the job, would make any difference? Can you commend this line and see how many bytes is the code from MikroBasic?

    I have a feeling that the comparisson is not exactly 'fair'.

    Ioannis

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Ioannis View Post
    How about using in PBP 2.60 Long variables as in the MkB examples?

    Also the LongintTostr(angle,valeur) function if replaced with a lines of commands like in PBP to do the job, would make any difference? Can you commend this line and see how many bytes is the code from MikroBasic?

    I have a feeling that the comparisson is not exactly 'fair'.

    Ioannis
    Hi, Ioannis

    Longs with a 16F819 ??? ... you're serious ???

    use of strings to print to lcd is a quasi MUST with MkE compilers ... longint to str is only 221 bytes ... surely less than parsing number and converting into characters.

    ... and we're still far fom the PBP count ...

    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 " !!!
    *****************************************

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


    Did you find this post helpful? Yes | No

    Cool

    Quote Originally Posted by Mike, K8LH View Post
    Hi Alain,

    May I impose to ask about the analog signal you're measuring and how it relates to degrees port and starboard? ).

    Kind regards, Mike
    Hi, Mike,

    I'd also had liked a way to find some easier calculations ...

    but the guy who gave me the formulas ( a final project for student ...) gave it in the " ax+b " form ... with a and b being ... floating point numbers with 2 or 3 decimals !!!

    I already have extracted integer ratios to avoid any floating point calculations ... ...

    I wonder it is a voltage given by a pot ( position of a helm ) that is the input value...

    do not bash ... I perfectly know :

    1) the pot has 5% garanteed linearity ...

    2) as the input swings from 3.02v to 5.02 v ... the output value is ... 26 starboard to 26 port ...

    So, I know there's overkilling math here, but it can't be modified or re-studied because of the final projects rush ...

    The HEX just fits into the PIC Flash memory... so, it will be enough here ...


    being serious ... that doesn't rub the 4+ x ratio between compilers ... for same little job !!!

    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 " !!!
    *****************************************

  9. #9
    Join Date
    Aug 2005
    Location
    Michigan, USA
    Posts
    224


    Did you find this post helpful? Yes | No

    Default

    Thank you Alain,

    Would this work?

    Regards, Mike

    Code:
    while 1=1
        adcin 0, result                      '
        
        if result < 823 then                 ' if < 4.020 volts then
            LCDOUT $FE,2," Tribord "         '
        else                                 ' else
            LCDOUT $FE,2,"  Babord "         '
        endif                                '
    
        angle = 13 * abs(result - 823) / 100 '
    
        LCDOUT $FE, $C0, dec3 angle          '
    
        PAUSE 100                            '
    wend
    Last edited by Mike, K8LH; - 1st May 2010 at 21: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