Sugestions with code


Results 1 to 8 of 8

Threaded View

  1. #5


    Did you find this post helpful? Yes | No

    Default

    jblackann ,

    thanks for the link.

    But i'm getting a hard time understanding the logic.

    AD_AN3_Volt = (AD_AN3_VALUE */ 500) >> 2

    Using 10Bit resolution:

    5V = 1023 so 2.5V = 511

    ( final reading on LCD should be 2.50V )

    If i have 2.5V the AD_AN3_VALUE = 511

    */ -> get the middle 16bits from the 32 ( divided aftermath )

    511 / 500 = 1,022

    1,022 - the 16 middle bits ???

    Then >>2 means shift 2 positions to the right ( binary ) ??


    And final the DEC2 - this is not included in the PBP manual...
    EDIT: But this last line i understand the logic.

    .
    Last edited by ruijc; - 4th December 2007 at 18:34.

Similar Threads

  1. Reading in Manchester code
    By brid0030 in forum Code Examples
    Replies: 0
    Last Post: - 10th March 2009, 22:55
  2. How much code space do PBP statements use.
    By Darrel Taylor in forum Code Examples
    Replies: 5
    Last Post: - 13th February 2009, 22:31
  3. Loop with two motor and 2 sensors
    By MrRoboto in forum mel PIC BASIC
    Replies: 4
    Last Post: - 9th December 2008, 00:40
  4. Making Program Code Space your playground...
    By Melanie in forum Code Examples
    Replies: 15
    Last Post: - 19th July 2008, 09:26
  5. Re-Writing IF-THEN-AND-ENDIF code?
    By jessey in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 18th August 2006, 18:23

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