130-28029 Parallax Inc, 130-28029 Datasheet - Page 136

KIT PARTS SMART SENSORS

130-28029

Manufacturer Part Number
130-28029
Description
KIT PARTS SMART SENSORS
Manufacturer
Parallax Inc
Datasheet

Specifications of 130-28029

Accessory Type
Education Kit
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
For Use With/related Products
BASIC Stamp®
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Contains lead / RoHS non-compliant
Page 124 · Smart Sensors and Applications
Your Turn - Experiments with Magnetic Fields
There aren't all that many places where the earth's magnetic field is parallel to the ground.
It's either pointing into or up from the ground. The angle at which the Earth's magnetic
field points into or out of the ground is called inclination.
Declination is the measure of degrees between magnetic north and true north. For the
United States, you can find information on the difference at http://nationalatlas.gov. At
the time of this writing, an article with information about both inclination and a map of
declinations was at this page:
One of the maps on this page also shows the total magnetic field intensity in nanotesla
measurements. The tesla (T) is a measurement of magnetic field intensity, and nanoteslas
(nT) are billionths of teslas. The readings the compass module's x and y axes return are
in approximately millionths of teslas (µT). According to the HM55B's chip datasheet,
your compass module’s units could be anywhere from 1 to 1.6 µT.
http://nationalatlas.gov/articles/geology/a_geomag.html
LOOP UNTIL status = Ready
SHIFTIN
HIGH En
IF (y.BIT10 = 1) THEN y = y | NegMask
IF (x.BIT10 = 1) THEN x = x | NegMask
RETURN
SHIFTIN
Hold your board level, and align your compass module's x-axis with magnetic
north. When the x-axis is aligned with north, the Debug Terminal should display
the largest x value, and the angle should read 0 degrees.
Keep pointing your compass north, but try tilting it up and down. Chances are
you'll find an even larger measurement at a certain tilt than you do while holding
it level. That's because the magnetic field is either pointing into, or up from, the
ground in your locale.
Make a note of the very largest x-axis measurement you were able to achieve.
DinDout,clk,MSBPOST,[x\11,y\11]
DinDout,clk,MSBPOST,[Status\4]
' Get Status
' Exit loop when status is ready
' Get x & y axis values
' Disable module
' Store 11-bits as signed word
' Repeat for other axis

Related parts for 130-28029