On 5/31/07, Brian Gregory <bgregory@...> wrote:
> I bet that it what happened, I think I loaded one on the prebuilt hex files
> a while back and never replaced it. My mistake. I'll try loading one built
> from source.
> BTW, I'm currently working on code to bit-bang the interface to the parallax
> HM55B compass. It turns out I'd have to anyway considering it uses 4-bit
> commands and a 2 11bit responses, from what I understand SPI requires 8-bit
> groups. When I get it working I'll post it on here or the wiki.
SPI actually doesn't specify how many bits are transferred. 8 is quite
common, but by no means the only one used. The hardware SPI on the
robostix will only do 8 bits, but if you bitbang you can do anytyhing
The sample code I gave you only transfers whole bytes, but it would be
pretty easy to modify such that you pass in uint16_t and also tell it
how many bits to read/write.
Traditional SPI is full duplex, but the HM55B is only half duplex, so
you can write a routine that sends 4 bits and reads 22 into 2 separate
Vancouver, BC, Canada