|
CLASS DOCUMENTS
REPORTS & ASSIGNMENTS
CLASS CONTENT
USING THIS SITE
registered authors login here You are: (logout) For more on PMWiki, see pmwiki.org |
HM 55 B CompassInitial report by John Schimmel, 25 October 2005 This Compass Module made exclusively by Parallax is a dual-axis magnetic field sensor built around the Hitachi HM55B IC. Parallax has made this compass IC accessible by providing Hitachi’s surface mount sensor chip with a 3 V onboard voltage regulator and resistor protection, all in a 0.3” wide 6-pin DIP module. Acquiring measurements from the module is made easy with a synchronous serial interface, and even easier with the commands SHIFTIN and SHIFTOUT. This paragraph is pulled from the parallax compass documentation ![]() Parallax Compass Module The compass module is ideally made for the Parallax's Basic Stamp but remember that the Stamp is just a glorified PIC! So anything you can do on a Basic Stamp you can do on a typical PIC with PICBasic - for example the SHIFTIN and SHIFTOUT commands are identical, along with many other commands. The documentation that Parallax provides is incredibly useful, read it completely - several times. The first problem you'll encounter is that the code written for the Basic Stamp uses the arctan (ATN) function, PICBasic Pro has no arctan() function, some alternative solutions will be provided below as they are found. So don't worry about the missing PICBasic arctan, you really only need it for applications that need precise direction/degree information. Applications
Electrical Characteristics
![]()
Pin Descriptions![]() The 6 pins include:
There are two ways to wire the compass, the first model uses 3 wires instead of 4 The data lines share a line into the PIC. ![]() But the 4 wire hookup works fine too. ![]() Microcontroller Connections![]() Code SamplePICBasic Pro compass code does not provide angles, it simply finds NORTH, SOUTH, EAST & WEST. Work Arounds for ArcTan in PICBasic Pro
Typical BehaviorSample data from the PICBasic Pro code:
Application Notes
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||