Closed shakil-anwar closed 3 years ago
Which microcontroller are you compiling for? ATmega1284P?
yes I was trying to compile for atmega1284p
The 1284P only has one SPI peripheral. SPI1 is only for the ATmega324PB.
https://www.microchip.com/wwwproducts/en/ATmega1284P "Digital Communication Peripherals 2-UART, 3-SPI, 1-I2C"
the datasheet talks about only one SPI interface
but there is the possibility to create two additional SPI masters using USARTs, check datasheet
"The Universal Synchronous and Asynchronous serial Receiver and Transmitter (USART) can be set to a master SPI compliant mode of operation."
edit: 2x USART = +2x SPI
edit2: http://www.gammon.com.au/spi search USART
I get error: 'SPCR1' was not declared in this scope
C:\Users\Asus\AppData\Local\Arduino15\packages\MightyCore\hardware\avr\2.1.0\libraries\SPI1\src/SPI1.h:292:31: note: suggested alternative: 'SPCR'
I am getting many similar errors , while compiling with SPI1.begin() and SPI1.transfer(..,..);