Would you like to react to this message? Create an account in a few clicks or log in to continue.

You are not connected. Please login or register

R1254@WIN10: SPI Slave of mega328 not working

2 posters

Go down  Message [Page 1 of 1]

TimFisch

TimFisch

It seems that the SPI slave does not correctly work on the 328.

Issues:
  • The CLK, MOSI and SS shows a short spike on the startup of the Master. (A Trigger Condition on each pin pauses on the init).
  • The SPIF flag on the slave is already set after the 6th bit, not after the 7th bit.  
  • The SPDR register of the slave is not updated with the transferred data.
  • The slave data is not pushed onto MISO line.


source files are here:
https://wiki.mexle.org/_media/spi.zip

The master shall send 0xAC, the slave data buffer is initialized with 0xFF in the as first signal. The slave shall show the received signal on PORTC. The output is not the recieved data but the slave data.



Last edited by arcachofo on Fri Jun 24, 2022 8:45 pm; edited 1 time in total (Reason for editing : Mark as solved (green color))

https://wiki.mexle.hs-heilbronn.de/

arcachofo

arcachofo

I think it is solved at Rev 1276.

Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum