Memsic 2125
bdoc
Posts: 5
In using the parallax sample code for basic memsic 2125 interpretation I'm getting g readings over 6g. I'm curious as to why this would be the case? Again, sample code straight from parallax used with a BSIIsx. Any ideas? Thanks
Comments
#SELECT $STAMP
· #CASE BS2, BS2E, BS2PE
··· Scale······ CON···· $200··················· ' 2.0 us per unit
· #CASE BS2SX, BS2P, BS2PX
··· Scale······ CON···· $0CC·················· ·' 0.8 us per unit
#ENDSELECT
And then we have to modify the subroutine that reads the Memsic pulses like this:
Read_G_Force:
· PULSIN Xin, HiPulse, pulse··················· ' read pulse output
· pulse = pulse */ Scale······················· ' convert to uSecs
· xmG = ((pulse / 10) - 500) * 8··············· ' calc 1/1000 g
· PULSIN Yin, HiPulse, pulse
· pulse = pulse */ Scale
· ymG = ((pulse / 10) - 500) * 8
· RETURN
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax