130-28029 Parallax Inc, 130-28029 Datasheet - Page 144
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: 144 of 340
- Download datasheet (5Mb)
Page 132 · Smart Sensors and Applications
Example Program - CalibrateCompass.bs2
' -----[ Title ]--------------------------------------------------------------
' Smart Sensors and Applications - CalibrateCompass.bs2
' This program collects and stores Hitachi HM55B Compass Module measurements
' in EEPROM for axis offset and linear interpolation corrections that will be
' performed by TestCalibratedCompass.bs2.
'
' {$STAMP BS2}
' {$PBASIC 2.5}
'
' IMPORTANT: Follow the instructions in Chapter #4, Activity #2 of
'
'
'
' -----[ EEPROM Data ]--------------------------------------------------------
CompassOffsets DATA @ 0, (4)
CompassLowVal
CompassCal
' -----[ Pin Definitions ]---------------------------------------------------
DinDout
Clk
En
' -----[ Constants ]----------------------------------------------------------
Reset
Measure
Report
Ready
NegMask
Current
Previous
' -----[ Variables ]----------------------------------------------------------
x
y
status
angle
counter
index
character
Free Download! This program is available as a free .bs2 file download from the Smart
Sensors and Applications Product Page at www.parallax.com. If you would like to know how
this program works, read through the comments here.
Smart Sensors and Applications.
download from the Smart Sensors and Applications page at
www.parallax.com.
DATA
DATA
PIN
PIN
PIN
CON
CON
CON
CON
CON
CON
CON
VAR
VAR
VAR
VAR
VAR
VAR
VAR
2
0
1
%0000
%1000
%1100
%1100
%1111100000000000
0
1
Word
Word
Nib
Word
Byte
Nib
Byte
(1)
(16)
' Stores x and y axis offsets
' Stores index of lowest angle
' 16 reference compass angles
' P2 transceives to/from Din/Dout
' P0 sends pulses to HM55B's Clk
' P1 controls HM55B's /EN(ABLE)
' Reset command for HM55B
' Start measurement command
' Get status/axis values command
' 11 -> Done, 00 -> no errors
' For 11-bit negative to 16-bits
' Index for table array
' Index for table array
' x-axis data
' y-axis data
' Status flags
' Angle measurement
' Loop counter
' EEPROM index
' Stores a DEBUGIN character
It's available for
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: