Hello,
I'm trying to learn SPI protocol of AVR micro-controller AtMega168
I learned about polling method and this is the code
AVR SPI : Not working with UART enabled
I'm trying to learn SPI protocol of AVR micro-controller AtMega168
I learned about polling method and this is the code
Code (Text):
- // this program enables SPI communication and
- // Sets the AVR into Master mode
- #include <avr/io.h>
- #include <util/delay.h>
- #include "USART.h"
- int main (void)
- {
- char data = 'A';
- //initUSART();
- //printString("MASTER\r\n");
- DDRB |= (1<<2)|(1<<3)|(1<<5); // SCK, MOSI and SS as outputs
- DDRB &= ~(1<<4); // MISO as...