help on 2 wire SPI

arubli

New Member
Dear fellows


not an expert... have the next question.

I want a picaxe (28x1) to decode a simple SPI signal, comming from a digital audio volume controller, so I might display this byte on a "smart" display (which code I have already working)

this device sends only a clock and a data signal.

I guess the way to go is the hspiin command, but this signal involves several pins, and I only have two signals to use.

any hint will be appreciated

the circuit I am working with is
http://nervenet.info/uploads/sure_vol_controlAA-AA11117.pdf

regards

alexander
 

hippy

Ex-Staff (retired)
PICAXE can only be an SPI master device so SPIIN and HSPIIN cannot be used to read the SPI from the audio control which is also a master device; the audio control provides its own clock, is not commanded by the clock which would be sent from the PICAXE.

It may be possible to bit-bang the signal in or use external hardware to convert the SPI serial to 10-bit parallel data. The on-chip hardware for SPI only handles 8-bit data and this is 10-bit so it doesn't seem that could be used even via access to SFR.

One issue will be how fast and how often the device sends out its SPI. I couldn't see that specified in the datasheet.
 

arubli

New Member
It may be possible to bit-bang the signal in
thanx for the info. I have been searching for a simple bit banging code, but I always find more complex protocols.

sorry if that has been discussed before...

best regards
 
Top