View previous topic :: View next topic |
Author |
Message |
Guest
|
Help with spi_write()... |
Posted: Tue Dec 05, 2006 9:31 pm |
|
|
I am trying to interface with a digital compass (HM55B), and am trying to send it the initializing signals via spi. However, the compass is expecting the signals to be four bits long. Is there any way to use spi_write(), and only send four bits???
Thanks in advance |
|
|
Ttelmah Guest
|
|
Posted: Wed Dec 06, 2006 3:52 am |
|
|
No.
The hardware only supports 8 bit operation.
It is very easy to 'bit bang' though. Look at the example file 'PNI11096.c', which bit bangs out, and 8 bit command, followed by a 16 bit reply read back. Instead of 'axis', send your command. Amend th number of bits to 4, and your are 95% of the way there.
Best Wishes |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|