130-28029 Parallax Inc, 130-28029 Datasheet - Page 149
130-28029
Manufacturer Part Number
130-28029
Description
KIT PARTS SMART SENSORS
Manufacturer
Parallax Inc
Datasheet
1.122-28029.pdf
(340 pages)
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
- Current page: 149 of 340
- Download datasheet (5Mb)
' -----[ Subroutine - Compass_Correct_Offsets ]-------------------------------
' This subroutine corrects cumulative magnetic field interference that can
' come from sources such as the PCB, jumper wires, a nearby battery, or a
' nearby current source.
' the EEPROM space that was reserved by the CompassOffsets DATA directive.
' These EEPROM values are written by this program during calibration.
Compass_Correct_Offsets:
Your Turn - Reviewing the Calibration Settings
In the main activity, you typed the letter C to store calibration values in the BASIC
Stamp's EEPROM. You can also review these calibration values by running the program
and typing R instead of C. This will show a comparison of the actual vs. ideal angle
measurements in binary radians. These errors are caused in part by the printed circuit
board that the sensor is mounted on. Some of the materials in the printed circuit board
are magnetic, and are not necessarily aligned with the Earth's magnetic field. Other
magnetic field sources that can cause measurement errors come from nearby electrical
currents, such as electrons flowing through the Vdd and Vss lines to power your board's
power LED.
LOOP UNTIL status = Ready
SHIFTIN
HIGH En
IF (y.BIT10 = 1) THEN y = y | NegMask
IF (x.BIT10 = 1) THEN x = x | NegMask
RETURN
READ CompassOffsets, Word axisOffset
x = x - axisOffset
READ CompassOffsets + 2, Word axisOffset
y = y - axisOffset
RETURN
√
√
√
√
SHIFTIN
Run CalibrateCompass.bs2 again.
Click the Debug Terminal's Transmit windowpane and press Enter.
Type R to review the calibration settings.
Examine the errors reported, which the example program in the next activity will
use to make corrections.
DinDout,clk,MSBPOST,[x\11,y\11]
DinDout,clk,MSBPOST,[Status\4]
This subroutine relies on values stored in
Chapter 4: Hitachi HM55B Compass Module · Page 137
' 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
' Get x-axis offset
' Correct x-axis
' Get y-axis offset
' Correct y-axis
Related parts for 130-28029
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
KIT PROPELLER EDU PROJECT PARTS
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
KIT PARTS PROCESS CONTROL
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
Microcontroller Modules & Accessories DISCONTINUED BY PARALLAX
Manufacturer:
Parallax Inc
Part Number:
Description:
BOOK UNDERSTANDING SIGNALS
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
COMPETITION RING FOR SUMOBOT
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
TEXT INFRARED REMOTE FOR BOE-BOT
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
Microcontroller Modules & Accessories DISCONTINUED BY PARALLAX
Manufacturer:
Parallax Inc
Part Number:
Description:
BOOK UNDERSTANDING SIGNALS
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
BOARD EXPERIMENT+LCD NX-1000
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
IC MCU 2K FLASH 50MHZ SO-18
Manufacturer:
Parallax Inc
Datasheet: