ATmega168 SPI as Slave - how do I know if SPI received byte?

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello :-)

I need to do a SPI->RS232 using ATmega168. RS232 to PC is already working.

I would like to know when I received a byte on SPI, so I can send it to RS232... is there any bit on SPI Status Register or some bit that I am missing?

Thank you.

JPCasainho,
www.Casainho.net
.Portugal

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

SPIF? (I think that normally people would write slave SPI as interrupt-driven rather than polled.)

Lee

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

theusch wrote:
SPIF? (I think that normally people would write slave SPI as interrupt-driven rather than polled.)

Lee

Thank you for your quick and prompt answer. Unfortunately I can't test it now as I need to do another things before - If later I test and this isn't the solution, I will report.

I am almost sure that should be that bit. I couldn't have sure before - and my English language knowledge don't help me ;-)

Thank you :-)

JPCasainho,
www.Casainho.net
.Portugal