Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

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
 

Joined
Jul 25, 2012
Messages
1,192
Helped
170
Reputation
340
Reaction score
161
Trophy points
1,343
Activity points
0
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.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top