goebish / nrf24_multipro

nRF24L01 multi-protocol RC transmitter
GNU General Public License v3.0
472 stars 195 forks source link

Using Arduino Pro Micro #60

Closed ardianet closed 2 years ago

ardianet commented 2 years ago

Could this be done with Arduino Pro Micro? Already changed the SPI Output as mentioned in datasheet, but still no connection/binding.

// ############ Wiring ################

define PPM_pin 2 // PPM in

//SPI Comm.pins with nRF24L01

define MOSI_pin 16 // MOSI - D16 PB2

define SCK_pin 15 // SCK - D15 PB1

define CE_pin 10 // CE - D10 PB6

define MISO_pin 14 // MISO - D14 PB3

define CS_pin A1 // CS - A1 F6

//#define ledPin 13 // LED - D13

//pro micro attempt // SPI outputs

define MOSI_on PORTB |= _BV(2) // PB2

define MOSI_off PORTB &= ~_BV(2)// PB2

define SCK_on PORTB |= _BV(1) // PB1

define SCK_off PORTB &= ~_BV(1) // PB1

define CE_on PORTB |= _BV(6) // PB6

define CE_off PORTB &= ~_BV(6) // PB6

define CS_on PORTF |= _BV(6) // PF6

define CS_off PORTF &= ~_BV(6) // PF6

// SPI input

define MISO_on (PINB & _BV(3)) // PB3

ardianet commented 2 years ago

Don't know if this would be useful, but I managed to get it working on Pro Micro :

// ############ Wiring ################

define PPM_pin 2 // PPM in

//Arduino Pro Micro //SPI Comm.pins with nRF24L01

define MOSI_pin 16 // MOSI - D16/PB2

define SCK_pin 15 // SCK - D15/PB1

define CE_pin 10 // CE - D10/PB6

define MISO_pin 14 // MISO - D14/PB3

define CS_pin 9 // CS - D9/PB5

define ledPin 17 // LED - D13

// SPI outputs

define MOSI_on PORTB |= _BV(2) // PB2

define MOSI_off PORTB &= ~_BV(2)// PB2

define SCK_on PORTB |= _BV(1) // PB1

define SCK_off PORTB &= ~_BV(1) // PB1

define CE_on PORTB |= _BV(6) // PB6

define CE_off PORTB &= ~_BV(6) // PB6

define CS_on PORTB |= _BV(5) // PB5

define CS_off PORTB &= ~_BV(5) // PB5

// SPI input

define MISO_on (PINB & _BV(3)) // PB3