28029 Parallax Inc, 28029 Datasheet - Page 158
28029
Manufacturer Part Number
28029
Description
KIT PARTS SMART SENSORS W/TEXT
Manufacturer
Parallax Inc
Datasheet
1.122-28029.pdf
(340 pages)
Specifications of 28029
Accessory Type
Parts Kit
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
For Use With/related Products
BASIC Stamp® or Javelin Modules
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Contains lead / RoHS non-compliant
Other names
28029PAR
- Current page: 158 of 340
- Download datasheet (5Mb)
Page 146 · Smart Sensors and Applications
The procedure for converting a program to average its x and y-axis measurements was
applied to TestCompass.bs2, and then saved as TestCompassAveraged.bs2.
' -----[ Title ]--------------------------------------------------------------
' Smart Sensors and Applications - TestCompassAveraged.bs2
' Test to make sure Hitachi HM55B Compass Module is working.
' {$STAMP BS2}
' {$PBASIC 2.5}
' -----[ I/O Definitions ]----------------------------------------------------
DinDout
Clk
En
' -----[ Constants ]----------------------------------------------------------
Reset
Measure
Report
Ready
NegMask
Negative
Positive
' -----[ Variables ]----------------------------------------------------------
x
y
status
angle
mCount
xSum
ySum
sign
' -----[ Main Routine ]-------------------------------------------------------
√
√
√
√
Open and run TestCompass.bs2 from activity #1.
Watch the x and y-axis measurements at a few different headings. They will
likely be noisy, flickering between two or three different values.
Open and run TestCompassAveraged.bs2.
The measurements should be much more stable. They should only flicker when
you are very close to the transition between two different results.
PIN
PIN
PIN
CON
CON
CON
CON
CON
CON
CON
VAR
VAR
VAR
VAR
VAR
VAR
VAR
VAR
2
0
1
%0000
%1000
%1100
%1100
%1111100000000000
1
0
Word
Word
Nib
Word
Nib
Word
Word
Bit
' P2 transceives to/from Din/Dout
' P0 sends pulses to HM55B's Clk
' P2 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
' Word.bit15 = 1 -> negative
' Word.bit15 = 0 -> positive
' x-axis data
' y-axis data
' Status flags
' Store angle measurement
' Measurement count
' x-axis measurement accumulator
' y-axis measurement accumulator
' Sign bit
Related parts for 28029
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
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:
BOARD EXPERIMENT+LCD NX-1000
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
CONTROLLER 16SERVO MOTOR CONTROL
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
BASIC STAMP LOGIC ANALYZER
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
IC MCU 2K FLASH 50MHZ SO-18
Manufacturer:
Parallax Inc
Datasheet: