Going from 5V to 3.3V...is it possible that it only "works" sometimes? [problem
bulkhead
Posts: 405
EDIT: see 3rd post, I seem to have found the problem
I'm having trouble getting the H48C tri-axis accelerometer working with my propeller. It works fine with my BS2. I am using the code from the prop obex so I am assuming that it should work correctly.
Here is the H48C manual: parallax.com/Portals/0/Downloads/docs/prod/acc/HitachiH48C3AxisAccelerometer.pdf
Right now I have a 1Kohm resistor on the DIO line and 470 ohm resistors on the CS and CLK lines (although if I am correct, these 470 ohm resistors are not needed at all in this case since those two pins remain as outputs).
My problem is that I do get some readings from the H48C, but it appears that some bits are missing (there are gaps in the data of powers of two, like 64, or 32). It also doesn't scale properly in different directions (it gives +1g on the other side and perhaps -.6g on the other, when it should be +/- 1g). I know this module works on the BS2, but not on my propeller, so could this be a 5V to 3.3V issue? The strange thing is that it seems to half work... I've tried testing this on two propellers and they both do the same thing. Any ideas on what could be wrong?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I'm new to the propeller!
Post Edited (bulkhead) : 12/1/2007 12:48:44 AM GMT
I'm having trouble getting the H48C tri-axis accelerometer working with my propeller. It works fine with my BS2. I am using the code from the prop obex so I am assuming that it should work correctly.
Here is the H48C manual: parallax.com/Portals/0/Downloads/docs/prod/acc/HitachiH48C3AxisAccelerometer.pdf
Right now I have a 1Kohm resistor on the DIO line and 470 ohm resistors on the CS and CLK lines (although if I am correct, these 470 ohm resistors are not needed at all in this case since those two pins remain as outputs).
My problem is that I do get some readings from the H48C, but it appears that some bits are missing (there are gaps in the data of powers of two, like 64, or 32). It also doesn't scale properly in different directions (it gives +1g on the other side and perhaps -.6g on the other, when it should be +/- 1g). I know this module works on the BS2, but not on my propeller, so could this be a 5V to 3.3V issue? The strange thing is that it seems to half work... I've tried testing this on two propellers and they both do the same thing. Any ideas on what could be wrong?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I'm new to the propeller!
Post Edited (bulkhead) : 12/1/2007 12:48:44 AM GMT
Comments
I then tried changing the clockmode to pll 8x instead of 16x (so running @40MHz) and it works now! Works for pll 4x too. It is strange because the demo program for the H48C uses pll 16x.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I'm new to the propeller!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I'm new to the propeller!