---------------------------------------------------------------------- Date: Mon, 19 May 1997 08:27:44 -0500 (CDT) From: Tom Brusehaver Subject: Re: Vector 2x compass A mistake has been found on the V2X schematic, the M/S pin on the compass needs to be grounded. I don't know what it is, everytime I publish something, I make a mistake. ---------------------------------------------------------------------- These are the files to connect the PNI Vector 2X compass to the Handy Board. The assumption is that you want to know your heading now! This will continuously update the heading. Unfortunatly, this will add to the already busy CPU, so it may cause trouble for some applications. There is a disable compass routine in the ICB file, and this could be called whenever there is lots to do, or the motors are stopped, or at the end of your program. The compass is put into master mode (really), that way the compass will continuously be updating the miniboard, so we can read the heading whenever we want, and know what our heading is to a reasonable certainty. I have found +/- 5 degrees is about all the perfection I can get, although I am open to hear other peoples experiences. I put a lot of comments in the ASM file, and not so much in the C file. Sorry, it seemed simple to me. I assume you will either manually load the compass.icb file, then the compass.c and run v2x from the IC> prompt, although, you can put the compass.icb in the you xxx.lis file, and use that. If you comment out the main() in the C file, you will have a really expensive compass :-). Suggestions: I mounted the v2x on a perfboard using a socket. The socket I made using a normal 28 pin socket, cutting it in half (long way), and mounting it on the perfboard. This allows you to double check your wiring before pluggin in the "$50 chip". I used rainbow ribbon cable to connect the v2x to the HB. I used hot glue to mount the perfboard to my robot. This allows me to pull it free anytime, but is secure enough that it won't fall off. -------------------------------------------------------------------------- Pin Connections V2X HC11 pin desc pin desc Notes 13 EOC invert! SS Sync bit counters between master and slave (see NOTE) 2 SDO MOSI Data coming in 3 SDI MISO Data going out 1 SCLK CLK Bit clock 5 P/C 2 of U11 enable compass (motor controller) NOTE: I had to invert the EOC pin. I used a NPN transistor, Base connected to EOC pin, Collector connected to SS(HC11), and pulled up with a 390 ohm resistor. Emitter connected to ground. pretty simple really.