The compass is a Vector 2XG made by Precision Navigation inc (www.precisionnavigation.com) and sold by Jameco ($49.95). They have two models, the Vector 2X and the Vector 2XG. The only difference is that the 2XG's magnetometers are gimbaled so the unit can be tilted and still give the proper heading. The compass can transmit it's heading in degrees (0-359) in either binary (16 bits with only the last 9 bits being used), BCD (16bits with only the last 10 bits being used) or RAW (2 x 16bits, 16bits for X + 16bits for Y). They claim a 2 degree accuracy with a 1 degree resolution which is quite exact by my own experience with the gizmo. It is VERY sensitive to surrounding magnetic fields and hard-iron elements. The unit does have a hard-iron calibration mode where you can "teach" it to ignore close by metalic objects but this doesn't work with dynamic magnetic fields (AC motors and such). Pretty cool for the price, all other equivalents I found cost severall hundred dollars more. Tobie Horswill ----- Original Message ----- From: "Roman Black" To: Sent: Thursday, September 21, 2000 10:43 AM Subject: Re: [PIC] : SPI doing a right-shift ? > Tobie Horswill wrote: > > > > Hey! got it working everytime now! > > > > All I did was delay the initialisation of the SPI. It seems that the compass > > was throwing some BS at the SPI when it was being reset. Since the SPI was > > being initialized fairly early in the PIC's init sequence it took the crap > > the compass was sending as clock pulses offsetting the following data. > > > > By simple curiosity, I tried lowering the PIC's clock to see when it would > > start missing the second contiguous byte and it never did... The slowest > > crystal I had was 2MHz but I feel that it would still work even well below > > 1MHz. Given the clock rate of the compass is only 4kHz ... > > > > Thank you all! > > > > Tobie Horswill > > Tobie, may I ask where you got the digital compass? And > what resolution is it?? > > Thanks, > -Roman > > -- > http://www.piclist.com hint: The PICList is archived three different > ways. See http://www.piclist.com/#archives for details. > > -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.