MPXA4115A picbasic code


Closed Thread
Results 1 to 40 of 104

Hybrid View

  1. #1
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default

    Darrel has the basic formula here: http://www.picbasic.co.uk/forum/showthread.php?t=182
    http://www.scalerobotics.com

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


    Did you find this post helpful? Yes | No

    Default

    It's been a few years since that thread. Don't even remember doing it.

    However, I think pt3rg asked the wrong question back then.
    I'm sure he also wanted to convert the A/D reading from the sensor to a pressure value.
    May be why he never came back.

    With the formula for Vout ...
    Vout = Vs*(0.009*P - 0.095)

    For 10-bit A/D and 1 decimal, the reverse would be
    P = ADC * 0.1086 + 10.6

    -- OR --
    Code:
    ADCIN 0, ADval
    P = ADval * 1086
    P = DIV32 1000
    P = P + 106
    
    LCDOUT "P=",DEC P/10,".",DEC P//10,"kPa"
    hth,
    DT

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


    Did you find this post helpful? Yes | No

    Default MPX4115A Calculator

    In case you didn't want 10-bit A/D with 1 decimal place in kPa ...

    This should cover the other possibilities.
    http://www.pbpgroup.com/Calculators/...A/MPX4115A.htm
    <br>
    DT

  4. #4
    Join Date
    Jun 2008
    Location
    Varese , Italy
    Posts
    326


    Did you find this post helpful? Yes | No

    Default

    Thanks Darrel for your very professional reply on the matter.
    I saw your last post just now.
    I think your assistance is great for all people in the forum.
    Regards,
    Ambrogio
    IW2FVO
    North Italy

Similar Threads

  1. sample code for AT45DB642D in Picbasic Pro
    By itsssyam in forum General
    Replies: 0
    Last Post: - 10th March 2010, 06:01
  2. 16f887 44 pin demo board code problem?
    By jessey in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 7th December 2008, 14:17
  3. How to configure SPI in PICBASIC PRO?
    By moogle in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 15th April 2007, 18:31
  4. PicBasic code problems with a 16F84A
    By Lauren Barta in forum mel PIC BASIC
    Replies: 3
    Last Post: - 30th May 2006, 22:50
  5. PicBasic Fundamentals
    By Billyc in forum General
    Replies: 9
    Last Post: - 4th May 2004, 10:04

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