Author |
Message |
Topic: [solved] sensor broken, or i2c error? |
cenar
Replies: 5
Views: 9736
|
Forum: General CCS C Discussion Posted: Tue Jan 29, 2013 3:52 pm Subject: [solved] sensor broken, or i2c error? |
Thank you for your detailed info!
1. I am giving 3.0v to the magnetometer and level shifting with 2 bs108 mosfets. It works ok.
2. Yes! this newb mistake made me believe my i2c line works. I am ... |
Topic: [solved] sensor broken, or i2c error? |
cenar
Replies: 5
Views: 9736
|
Forum: General CCS C Discussion Posted: Tue Jan 29, 2013 11:06 am Subject: [solved] sensor broken, or i2c error? |
And this was my code. it is not well-written so i didn't want to put it here. but here it goes
i2c_start();
i2c_write(0x3C);
i2c_write(0x02);
i2c_start( ... |
Topic: [solved] sensor broken, or i2c error? |
cenar
Replies: 5
Views: 9736
|
Forum: General CCS C Discussion Posted: Tue Jan 29, 2013 11:02 am Subject: [solved] sensor broken, or i2c error? |
Thank you for your advice. I did know that i should read 6 bytes, but i didn't put full code because i work a little bit dirty.
Here is my code, as datasheet advises. all uart datas are 255 (0b111111 ... |
Topic: [solved] sensor broken, or i2c error? |
cenar
Replies: 5
Views: 9736
|
Forum: General CCS C Discussion Posted: Tue Jan 29, 2013 10:19 am Subject: [solved] sensor broken, or i2c error? |
Hello,
I am using HMC5883L magnetometer sensor as slave, 16F876a as master.
I can read device registers OK, which means no problem on hardware. but when i try to read sensor data, it is always 255 ( ... |
Topic: problem with dividing 2 float numbers |
cenar
Replies: 16
Views: 15491
|
Forum: General CCS C Discussion Posted: Tue Jan 31, 2012 4:59 pm Subject: problem with dividing 2 float numbers |
I used debug option of my simulator in order to check the values, and my code works just fine when I exclude the float variables. I think I should do a lot of reading about float numbers in ccs c. Tha ... |
Topic: problem with dividing 2 float numbers |
cenar
Replies: 16
Views: 15491
|
Forum: General CCS C Discussion Posted: Tue Jan 31, 2012 11:57 am Subject: problem with dividing 2 float numbers |
thank you for replying,
i dont know how to display the current values of the variables, but i run a simulation on isis and studied the pwm cycles with an oscilloscope, and noted these:
2 volts in an ... |
Topic: problem with dividing 2 float numbers |
cenar
Replies: 16
Views: 15491
|
Forum: General CCS C Discussion Posted: Tue Jan 31, 2012 11:12 am Subject: problem with dividing 2 float numbers |
hello everybody,
i have a similar issue and i didn't want to flood the forum with opening a new thread. i write a code to read the value from analog pin and calculate the pwm values for a differentia ... |
|