Project:HM55B: Difference between revisions

From London Hackspace Wiki
(Created page with '=== Using the BusPirate === BusPirate settings: * M (mode) * 8 (3-wire raw) * 4 (400KHz) * 2 (3.3V high) * W (turn on 5V output) Reset: \[/_\/_\/_\/_\&:10] Take sample \[/-\…')
 
No edit summary
Line 1: Line 1:
=== Using the BusPirate ===
=== Module ===
 
$20-25 compass module for embedded systems.  SMD will be cheaper.
 
[http://www.parallax.com/dl/docs/prod/compshop/HM55BModDocs.pdf Datasheet]
 
 
=== Testing with the BusPirate ===


BusPirate settings:
BusPirate settings:
Line 11: Line 18:
  \[/_\/_\/_\/_\&:10]
  \[/_\/_\/_\/_\&:10]


Take sample
RAW3WIRE>\[/_\/_\/_\/_\&:10]
CLOCK, 0
CS ENABLED
CLOCK, 1
DATA OUTPUT, 0
CLOCK, 0
CLOCK, 1
DATA OUTPUT, 0
CLOCK, 0
CLOCK, 1
DATA OUTPUT, 0
CLOCK, 0
CLOCK, 1
DATA OUTPUT, 0
CLOCK, 0
DELAY 0b00001010uS
CS DISABLED
 
 
Take sample (1100 is the response for success, 00xx is for incomplete, xx11 is error, see p9 of datasheet)
 
  \[/-\/_\/_\/_\&&]&:10[&:10/-\/-\/_\/_\!!!!&!!!!!!!!!!!&!!!!!!!!!!!]
  \[/-\/_\/_\/_\&&]&:10[&:10/-\/-\/_\/_\!!!!&!!!!!!!!!!!&!!!!!!!!!!!]


READ BIT: 1
READ BIT: 1
READ BIT: 0
READ BIT: 0
DELAY 0b00000001uS
READ BIT: 0
READ BIT: 0
READ BIT: 0
READ BIT: 0
READ BIT: 0
READ BIT: 0
READ BIT: 1
READ BIT: 0
READ BIT: 0
READ BIT: 0
READ BIT: 0
DELAY 0b00000001uS
READ BIT: 1
READ BIT: 1
READ BIT: 1
READ BIT: 1
READ BIT: 1
READ BIT: 1
READ BIT: 1
READ BIT: 1
READ BIT: 1
READ BIT: 0
READ BIT: 0


Note that you need &&, because &:50000 doesn't seem to work, but the BusPirate parser obviously creates enough of a delay.
Note that you need &&, because &:50000 doesn't seem to work, but the BusPirate parser obviously creates enough of a delay.

Revision as of 23:06, 2 September 2010

Module

$20-25 compass module for embedded systems. SMD will be cheaper.

Datasheet


Testing with the BusPirate

BusPirate settings:

  • M (mode)
  • 8 (3-wire raw)
  • 4 (400KHz)
  • 2 (3.3V high)
  • W (turn on 5V output)

Reset:

\[/_\/_\/_\/_\&:10]
RAW3WIRE>\[/_\/_\/_\/_\&:10]
CLOCK, 0
CS ENABLED
CLOCK, 1
DATA OUTPUT, 0
CLOCK, 0
CLOCK, 1
DATA OUTPUT, 0
CLOCK, 0
CLOCK, 1
DATA OUTPUT, 0
CLOCK, 0
CLOCK, 1
DATA OUTPUT, 0
CLOCK, 0
DELAY 0b00001010uS
CS DISABLED


Take sample (1100 is the response for success, 00xx is for incomplete, xx11 is error, see p9 of datasheet)

\[/-\/_\/_\/_\&&]&:10[&:10/-\/-\/_\/_\!!!!&!!!!!!!!!!!&!!!!!!!!!!!]
READ BIT: 1
READ BIT: 1
READ BIT: 0
READ BIT: 0
DELAY 0b00000001uS
READ BIT: 0
READ BIT: 0
READ BIT: 0
READ BIT: 0
READ BIT: 0
READ BIT: 0
READ BIT: 1
READ BIT: 0
READ BIT: 0
READ BIT: 0
READ BIT: 0
DELAY 0b00000001uS
READ BIT: 1
READ BIT: 1
READ BIT: 1
READ BIT: 1
READ BIT: 1
READ BIT: 1
READ BIT: 1
READ BIT: 1
READ BIT: 1
READ BIT: 0
READ BIT: 0

Note that you need &&, because &:50000 doesn't seem to work, but the BusPirate parser obviously creates enough of a delay.

Sample values:

0,-6 -1,-11 -1,-19