Shop OBEX P1 Docs P2 Docs Learn Events
Compass AppMod and BS2p — Parallax Forums

Compass AppMod and BS2p

ArchiverArchiver Posts: 46,084
edited 2002-06-08 18:52 in General Discussion
I searched and see that there are very few posts that discuss the
Parallax Compass AppMod.

I am having some simple issues trying to use this and would love to
hear about anybody else's experiences.

Since I am not using the stackable development boards, I have wired
the Compass AppMod to a BS2p Demo Board. Once I noticed that the
diagram of the header was reversed in the manual that came with the
Compass (I traced the leads from the LM2940CT power regulator to find
Vin's pin and worked from there), I began to doubt the manual. An
e-mail to Support got a response that told me the wrong thing, exactly
what the manual said. I went on my own at this point.

By connecting +7.5vdc to Vin and grounding Vss, the Compass began
working fine in Standalone Mode. The LEDs made sense and I went on to
add the serial line. I connected P12 from the BS2p to the 'P5' line on
the Compass header and pulled it up to Vdd with a 4.7k resistor. I
used inverted modes in SERIN and SEROUT and the Compass seems to be
responding.

The problem I am having is that I cannot get the Compass to accept
'low power mode'. The manual says to send the following command (They
use P5, in my code I use P12 as mentioned above). I've tried this and
various mutations of it. Can anyone else get the Compass to work on a
BS2p, but only with the Compass LEDs turned off?

Also, this solution only seems to work at 4800 baud. If anyone sees
what I've done that prevents this from working in 9600 baud, do tell
me; I'm weak on the electrical half of STAMP life.

Here's the manual's test code for clearing the Compass and moving it
to low-power mode:

SEROUT 5, 188+$8000, [noparse][[/noparse]"!CM0C", %01]

(* I know the baud bits are different for the BS2 and the BS2p, and I
know they are using 5 and I am using 12. I'm seeing correct responses
from the Compass. I am just nto seeing it shut off the LEDs. Any help
out there?)

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2002-06-08 05:48
    Hi,

    Look at page 7 of the AppMod sheets and read the paragraphs from there to
    the end. It says that the AppMod is
    hard wired to P5 not P12, change the wiring you have to follow what the AppMod
    says and everything should work
    fine. I noticed that the AppMod is backwards for the Board of Education, which
    is used for the BOE-BOT and is
    correct for the other boards. I have also read somewhere that the header for
    the Board of Education is backwards
    from all the rest, but I am not sure where I read this.

    Have Fun !!
    Dale Fleischmann

    hoofit42km wrote:

    > I searched and see that there are very few posts that discuss the
    > Parallax Compass AppMod.
    >
    > I am having some simple issues trying to use this and would love to
    > hear about anybody else's experiences.
    >
    > Since I am not using the stackable development boards, I have wired
    > the Compass AppMod to a BS2p Demo Board. Once I noticed that the
    > diagram of the header was reversed in the manual that came with the
    > Compass (I traced the leads from the LM2940CT power regulator to find
    > Vin's pin and worked from there), I began to doubt the manual. An
    > e-mail to Support got a response that told me the wrong thing, exactly
    > what the manual said. I went on my own at this point.
    >
    > By connecting +7.5vdc to Vin and grounding Vss, the Compass began
    > working fine in Standalone Mode. The LEDs made sense and I went on to
    > add the serial line. I connected P12 from the BS2p to the 'P5' line on
    > the Compass header and pulled it up to Vdd with a 4.7k resistor. I
    > used inverted modes in SERIN and SEROUT and the Compass seems to be
    > responding.
    >
    > The problem I am having is that I cannot get the Compass to accept
    > 'low power mode'. The manual says to send the following command (They
    > use P5, in my code I use P12 as mentioned above). I've tried this and
    > various mutations of it. Can anyone else get the Compass to work on a
    > BS2p, but only with the Compass LEDs turned off?
    >
    > Also, this solution only seems to work at 4800 baud. If anyone sees
    > what I've done that prevents this from working in 9600 baud, do tell
    > me; I'm weak on the electrical half of STAMP life.
    >
    > Here's the manual's test code for clearing the Compass and moving it
    > to low-power mode:
    >
    > SEROUT 5, 188+$8000, [noparse][[/noparse]"!CM0C", %01]
    >
    > (* I know the baud bits are different for the BS2 and the BS2p, and I
    > know they are using 5 and I am using 12. I'm seeing correct responses
    > from the Compass. I am just nto seeing it shut off the LEDs. Any help
    > out there?)
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject and Body
    of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
  • ArchiverArchiver Posts: 46,084
    edited 2002-06-08 18:52
    --- In basicstamps@y..., Dale Fleischmann <fleidale@c...> wrote:
    > Hi,
    >
    > Look at page 7 of the AppMod sheets and read the paragraphs from
    there to the end. It says that the AppMod is
    > hard wired to P5 not P12, change the wiring you have to follow what
    the AppMod says and everything should work
    > fine.

    Yes. As I said, IO is working to the Compass at 4800 baud.

    The problem, I repeat, is that low-power mode does not seem to be
    working. The PIC state machine seems to have real timing demands.

    Since yesterday I have found that if I send the !CMOC command after
    *every* read of the Compass, the LEDs stay off except during and after
    the CMO? exchange. Sometimes this fails and the LEDs remain on until
    the next sampling. So now the LEDs blink now and then, and power
    consumption is reduced but not optimal.

    I'm wasting lots of time trying "PAUSE n" everywhere, further slowing
    down my demo.

    Again, can anyone can explain why this works only at one baud rate, or
    how to make low-power mode 'stick'?
    I'd say right now, a better buy for the money is to buy the Compass
    sensor by itself and put it behind a PCF8574. The PIC on the AppMod
    seems to have some issues and by driving it yourself, you may find
    simpler/faster workarounds.

    http://www.imagesco.com/catalog/DigitalCompass/DigitalCompass.html
Sign In or Register to comment.