CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

prom ms5611 i2c reading
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
m4k



Joined: 27 Mar 2018
Posts: 29

View user's profile Send private message

PostPosted: Wed May 23, 2018 4:49 am     Reply with quote

Ttelmah wrote:
OK I see you are actually printing the output. Still a wrong value. Should be about 100000. Look at the maths. For instance:

Code:

itoa(p,10,ss);
 puts(ss);

//just use
   printf("%ld", p);



ok...tnx for reply

i try to printing p value with printf("%ld", p);
but the output value not change ...It remains the same as before...

for high accuracy output it seems to use kalman or complementary filter ..fusion barometric output with acc z axis...

because when i saw traditional quadrotor vertical stability without gps and only with barometr its great performance
temtronic



Joined: 01 Jul 2010
Posts: 9097
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Wed May 23, 2018 5:08 am     Reply with quote

While I don't have that PIC or peripheral I am following this 'thread' and have a couple commnets.
You should printout just the raw data and 'play computer'. By that I mean, get a piece of paper and pencil and do all the math, in the same steps as your program does. Now is the result close to what it should be?
If NO, then the peripheral may be at fault. Check power levels,EMI, wiring, I2C pullups, etc. Since the PIC program didn't do the 'math', this points to a hardware problem.
If YES, then your program 'math' will be in error. Perhaps a set of braces are wrong, maybe using an unsigned variable where a signed is supposed to be.
This is the 'divide and win' method. You need to locate the source of the problem THEN you can fix it!

Jay
Ttelmah



Joined: 11 Mar 2010
Posts: 19215

View user's profile Send private message

PostPosted: Wed May 23, 2018 6:59 am     Reply with quote

Yes. That's why I suggested outputting the earlier numbers so the maths can be checked 'off board'.
Ttelmah



Joined: 11 Mar 2010
Posts: 19215

View user's profile Send private message

PostPosted: Wed May 23, 2018 7:54 am     Reply with quote

As a comment (of course) the figure being seen could be totally right if he was at a very significant altitude (perhaps 5000'). So please tell us your altitude and where you are?.
m4k



Joined: 27 Mar 2018
Posts: 29

View user's profile Send private message

PostPosted: Thu May 24, 2018 7:00 am     Reply with quote

Ttelmah wrote:
As a comment (of course) the figure being seen could be totally right if he was at a very significant altitude (perhaps 5000'). So please tell us your altitude and where you are?.


tnx

my sea level altitude is 1530 meter or 5100 ft
m4k



Joined: 27 Mar 2018
Posts: 29

View user's profile Send private message

PostPosted: Thu May 24, 2018 7:03 am     Reply with quote

temtronic wrote:
While I don't have that PIC or peripheral I am following this 'thread' and have a couple commnets.
You should printout just the raw data and 'play computer'. By that I mean, get a piece of paper and pencil and do all the math, in the same steps as your program does. Now is the result close to what it should be?
If NO, then the peripheral may be at fault. Check power levels,EMI, wiring, I2C pullups, etc. Since the PIC program didn't do the 'math', this points to a hardware problem.
If YES, then your program 'math' will be in error. Perhaps a set of braces are wrong, maybe using an unsigned variable where a signed is supposed to be.
This is the 'divide and win' method. You need to locate the source of the problem THEN you can fix it!

Jay


yes...thats right

My calculations are correct on paper and correspond to the basic calculations....i using gy86 module
Ttelmah



Joined: 11 Mar 2010
Posts: 19215

View user's profile Send private message

PostPosted: Thu May 24, 2018 7:54 am     Reply with quote

Which is why you now need to go through step by step. Do dT TEMP, OFF & SENS all agree with values you calculate manually?.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group