MPX4115A to 16F87X and LCD (Novice level)


Closed Thread
Results 1 to 3 of 3
  1. #1
    pt3rg's Avatar
    pt3rg Guest

    Default MPX4115A to 16F87X and LCD (Novice level)

    I'm trying to display the atmospheric pressure value on a 44780 LCD.

    The Motorola MPX4115A pressure sensor is connected to pin2 (RA0/AN0) to make use of the built-in ADC of the 16F87X.

    Is there anyone who can show me how to write the code to perform this operation?

    MPX4115A voltage output:
    Vout = Vs*(0.009*P - 0.095) P = Pressure in kPa
    Vs = 5V


    Thank you very much.

    pt3rg.

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


    Did you find this post helpful? Yes | No

    Default

    Vout = Vs*(0.009*P - 0.095)
    --------------------------------------

    Decimals can be easy to work with by just scaling up and then dividing down. For 3 decimal places, multiply times 1000.

    Now the formula looks like this.

    Vout = 5 * (9 * P - 95) ' result is * 1000


    So, for 1 atmosphere ~ 101 kPa

    5 * (9 * 101 - 95) = 4070

    4.070 Vdc


    HTH,
    Darrel Taylor

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


    Did you find this post helpful? Yes | No

    Default

    Thanks for the help.
    Regards,
    Ambrogio

Members who have read this thread : 1

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