The Godfather talking
You can run, but you can't hide.
Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 24, 2024, 01:44:18 01:44


Login with username, password and session length


Pages: [1]
Print
Author Topic: Picbasic pro source help  (Read 12780 times)
0 Members and 2 Guests are viewing this topic.
leemarrow
Newbie
*
Offline Offline

Posts: 32

Thank You
-Given: 328
-Receive: 52


« on: April 27, 2005, 01:07:17 13:07 »

i have write a code for 16f876 for reading a temperature from a lm35cz.
Now i must subtract a vref of 2,5 volt from ad conversion result:

ADCIN 0,AD_Raw       Place the conversion of channel0 into AD_RAW
AD_Result=(AD_Raw*10) */ Quanta      ' Quantasize the result

where Quanta is 1250 (source from EXPERIMENTING WITH THE PICBASIC PRO COMPILER).

Now i have try to subtract from AD_Raw the number 25000 (2,5 volt) but it not work correctly.
which number I must subtract from AD_Raw???
(2,5 volt is my ref voltage for negative mesure)
Logged
nimdonia
Newbie
*
Offline Offline

Posts: 19

Thank You
-Given: 3
-Receive: 1


« Reply #1 on: April 27, 2005, 02:39:02 14:39 »

is
25000 = 2.5 volt? check tht first

proly haf u make it the proper size? WORD? instead of byte
Logged
leemarrow
Newbie
*
Offline Offline

Posts: 32

Thank You
-Given: 328
-Receive: 52


« Reply #2 on: April 27, 2005, 06:32:50 18:32 »

Quote from: nimdonia
is
25000 = 2.5 volt? check tht first

yes, 2,5 volt is 25000

i have found my error  Cheesy
the formula to calculate temperature is wrong  :rolleyes:
Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC