Aug 28, 2012 #1 H hayowazzup Advanced Member level 4 Joined Oct 9, 2010 Messages 117 Helped 0 Reputation 0 Reaction score 0 Trophy points 1,296 Activity points 2,136 I wish to use use usart to pass the data to the spi buffer using interrupt at a frequency of 4.8k. I was wondering if this code is ok. Code: ISR (USART_RXC_vect) { SPDR = UDR; while(!(SPSR & (1<<SPIF))); ; }
I wish to use use usart to pass the data to the spi buffer using interrupt at a frequency of 4.8k. I was wondering if this code is ok. Code: ISR (USART_RXC_vect) { SPDR = UDR; while(!(SPSR & (1<<SPIF))); ; }
Aug 28, 2012 #2 Joeisi Member level 1 Joined Aug 26, 2012 Messages 33 Helped 0 Reputation 0 Reaction score 0 Trophy points 1,286 Location Earth Activity points 1,488 It appears to be fine other than the extra colon on line 4. That does not need to be there.
Aug 29, 2012 #3 H hayowazzup Advanced Member level 4 Joined Oct 9, 2010 Messages 117 Helped 0 Reputation 0 Reaction score 0 Trophy points 1,296 Activity points 2,136 If the Uart interrupt is served at 9600 baud rate without a break, would there be bits missing by the uart as the data has to wait until SPI transmission complete.
If the Uart interrupt is served at 9600 baud rate without a break, would there be bits missing by the uart as the data has to wait until SPI transmission complete.