Posted: Tue May 31, 2005 7:55 pm Post subject: using SPI on mega8..couldn't comprehend
I am trying to use SPI of mega8 (as master and SPI of sensor as slave)..but my sensor needs a byte as input and returns 16 bit value as output. It takes 100 ms after recieving an input to send output..
I couldn't comprehend the SPI functions to realize this situation..
Joined: 11 Aug 2004 Posts: 948 Location: the Netherlands
Posted: Wed Jun 01, 2005 9:22 am Post subject:
Hi,
It is not so difficult to do the SPI yourself.
Toggle a pin (clock) 8 times while on an other pin (data) you put bit the 8 bits.
Wait 100 ms
Toggle the clock pin another 16 times while reading back the bits received.
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 You cannot attach files in this forum You cannot download files in this forum