Coding For PIC 18f4520

Status
Not open for further replies.

sudhag

Newbie level 6
Joined
Nov 30, 2012
Messages
11
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,353
im using voltage value of my sensor as input to microcontroller pic18f4520.max level-311V to min value-100V..voltage value varies according to the person.. im trying to convert the voltage value to percentage. this percentage is the oxygen level of the person. send me the coding
 

Your 100v has to be represented as 0v dc and your 311v should be represented as 5v dc. I asked is the sensor o/p linear? Scale down your voltage to 0vdc to 5v dc.

Let us say, you min value 50V is equal to 0v dc and max value is 350 = 5v dc. send me the raw adc value that your sensor gives for min and max values. I will write the code.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…