Analog Devices ADuC831 - SPI Question

Does anyone know if on the ADuC831, if it is possible to write to the SPIDAT (SPI I/O Register) when the chip is in slave mode?

I am only asking this because I am trying to debug some software and the Keil compiler is not taking my slave writes to SPIDAT, but it would when I had specified the chip as a Master. This could just be a limitation/flaw in the software though. I wanted to check to make sure though.

RonB

-------------------------------------------------- "It is human nature to take shortcuts in thinking"

--------------------------------------------------

Reply to
Ron Blancarte
Loading thread data ...

I figured out the answer to my own question. With some creative debugger use, it can be done.

BTW - I figured that this was possible, but the debugger is a bit clunky to get to work (basically fooling the simulated chip to think it is connected to something).

RonB

-------------------------------------------------- "It is human nature to take shortcuts in thinking"

--------------------------------------------------

Reply to
Ron Blancarte

Yes, of course. That is how you provide data to be returned to the master. I think the problem you see with the simulator is that it had no control over the SPI communications. I know we have done similar with the 834 and

845 while testing code for the Master side, but I don't think we did for the slave.

I never tried, but it might be possible to redirect one of the com ports to the SPI port. You can certainly redirect the PC com ports to the 8xx Uart ports. We did some communication testing between a PC running the simulator and a real unit one day. Never looked to see if the SPI would do the same.

Scott

Reply to
Not Really Me

Once you realize that SPI is a pair or a chain of shiftregisters with input, output, clock and latch, their handling becomes rather simple. The master is the one that provides the clock and the latch signal.

Rene

--
Ing.Buero R.Tschaggelar - http://www.ibrtses.com
& commercial newsgroups - http://www.talkto.net
Reply to
Rene Tschaggelar

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.