Hitachi Tri-Axis Accelerometer Help
Commander_Bob
Posts: 17
I need help with my Hitachi Tri-Axis Accelerometer. I have looked for info but I could only find the documentation. I understand most of the demo code but I don't get what the [noparse][[/noparse]%11\2, VRef\3] and [noparse][[/noparse]%11\2, axis\3] do. What do they mean? I know if you sub 0, 1 , or 2 for axis then it selects different axis to give the data on but that is the %11\2 and why is axis\3? Thanks.
Comments
The commands are sending out two ones (bits) for the command to read the register. The register number you want to read is also encoded into the data you’re sending (the next 3 bits). The SHIFTOUT command is being told to send out these 5 bits as specified. I hope this helps. Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
look in the Basis Stamp Programming Manual SHIFTOUT .. %11 means: binary number 11
and %11/2 within the SHIFTOUT command results in 2 bits will be transmitted to the output.
To fully understand the code, you must study the SHIFTOUT / SHIFTIN commands
good luck,
Ed