Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

usart buffer to spi buffer [atmega]

Status
Not open for further replies.

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))); 
	;
}
 

It appears to be fine other than the extra colon on line 4. That does not need to be there.
 

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.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top