122-28029 Parallax Inc, 122-28029 Datasheet - Page 154
122-28029
Manufacturer Part Number
122-28029
Description
GUIDE STUDENT SMART SENSORS
Manufacturer
Parallax Inc
Datasheet
1.122-28029.pdf
(340 pages)
Specifications of 122-28029
Accessory Type
Manual
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
For Use With/related Products
Smart Sensors
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Contains lead / RoHS non-compliant
- Current page: 154 of 340
- Download datasheet (5Mb)
Page 142 · Smart Sensors and Applications
' These EEPROM values were written by CalibrateCompass.bs2.
Compass_Correct_Offsets:
' -----[ Subroutine - Compass_Interpolate ]-----------------------------------
' This subroutine applies linear interpolation to the refine the compass
' measurement.
' Compass_Correct_Offsets subroutine, and it can correct axis skew and other
' factors inherent to the HM55B chip.
'
' The subroutine relies on 16 actual compass measurements that were stored
' in the sixteen EEPROM locations reserved by the CompassCal DATA directive.
' These measurements were stored by CalibrateCompass.bs2, and they
' represent the actual compass measurements for 0, 22.5, 45, 90,..., 337.5
' degrees.
' angle measurement falls between.
' based on where the angle measurement falls between the two known table
' values.
Compass_Interpolate:
READ CompassOffsets, Word axisOffset
x = x - axisOffset
READ CompassOffsets + 2, Word axisOffset
y = y - axisOffset
RETURN
' Start with the lowest value in the CompassCal table.
READ CompassLowVal, index
' Load current and previous table values.
READ CompassCal + index, table(current)
READ (CompassCal + (index - 1 & $F)), table(previous)
' The IF...ELSEIF...ELSE...ENDIF code block finds the two EEPROM CompassCal
' table values that the current angle measurement falls between and
' calculates the difference between the current angle measurement and the
' lower of the two table values.
' that are greater than the highest or less than the lowest table values.
' The ELSE block handles everything in between the highest and lowest table
' values.
IF (angle >= table(previous)) THEN
ELSEIF (angle <= table(current)) THEN
span = (255 - table(previous)) + table(current)
angleOffset = angle - table(previous)
The subroutine finds the two EEPROM measurements that the current
This second level of refinement can be performed after the
It then updates the angle measurement
The IF and ELSEIF blocks deal with values
' Get x-axis offset
' Correct x-axis
' Get y-axis offset
' Correct y-axis
Related parts for 122-28029
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
MANUAL FOR SUMOBOT
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
GUIDE STUDENT PROCESS CONTROL
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
MANUAL PROPELLER
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
LEAD WIRES FLYING CABLE III/IV
Manufacturer:
Xilinx Inc
Datasheet:
Part Number:
Description:
BOARD ADAPTER AND FLY LEADS
Manufacturer:
Xilinx Inc
Datasheet:
Part Number:
Description:
PLATFORM CABLE USB II
Manufacturer:
Xilinx Inc
Datasheet:
Part Number:
Description:
KIT STARTER COOLRUNNER-II BUNDLE
Manufacturer:
Xilinx Inc
Datasheet:
Part Number:
Description:
Microcontroller Modules & Accessories DISCONTINUED BY PARALLAX
Manufacturer:
Parallax Inc
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: