LSatan / SmartRC-CC1101-Driver-Lib

This driver library can be used for many libraries that use a simple RF ASK module, with the advantages of the cc1101 module. It offers many direct setting options as in SmartRF Studio and calculates settings such as MHz directly.
Other
388 stars 85 forks source link

ili9341 spi lcd and CC1101 spi problem #60

Open ghost opened 3 years ago

ghost commented 3 years ago

hi everyone, i can't get CC1101 to work with ii9341 display. I am attaching the pins I used on the ESP32,

BUZZER PIN 13

SDCARD SD_MOSI PIN 23 SD_SCK PIN 18 SD_MISO PIN 19 SD_CS PIN 12

LCD VCC VCC GND GND CS PIN 17 RESET PIN 5 D/C PIN 16 MOSI PIN 23 SCK PIN 18 LED PIN 32 MISO PIN 19 T_CLK PIN 18 T_CS PIN 21 T_DI PIN 23 T_DO PIN 19

IR RX PIN 14 TX PIN 15

CC1101 VCC VCC GND GND CSN 27 MOSI 23 MISO 19 SCK 18 GD0 26 GD2 25

If I start the sketch with this library and the tft_espi library, it gives me error multiple definition of `spi ' Please help me!!!

LSatan commented 3 years ago

hi, sorry for the late feedback. use a different spi interface for cc1101. use the following command and wiring in setup before init:

ELECHOUSE_cc1101.setSpiPin(14,12,13,15); //SCK, MISO, MOSI, CSN

notpike commented 3 years ago

Hi!

I'm having same issue with sharing the CC1101 with other devices on the same SPI bus.

I'm trying to make this lib work with the M5Stack which is an ESP32 that uses a ILI9341 display and SD card. Both the display and SD card uses the same SPI bus. I tried making the library to make this coexist with the other two devices with no luck .

Would you have any advice on how to make this work?

Thanks! -NotPike

BG7UHS commented 2 years ago

I also encountered the same problem. mmexport1632154209398

BG7UHS commented 2 years ago

hi, sorry for the late feedback. use a different spi interface for cc1101. use the following command and wiring in setup before init:

ELECHOUSE_cc1101.setSpiPin(14,12,13,15); //SCK, MISO, MOSI, CSN

Probably the spi variable name in ELECHOUSE_CC1101_SRC_DRV.cpp. I'm not sure.

atipezda commented 2 years ago

Does anyone have something new?

atipezda commented 2 years ago

Same issue with Pololu microSD card reader: ### wiring: CC1101: MOSI: 23 MISO: 19 SCK: 18 CS: 5

SD: MOSI: 23 MISO: 19 SCK: 18 CS: 15

in setup order when I initialize the microSD card reader first SD.begin(15)

whole setup procedure freezes on ELECHOUSE_cc1101.getCC1101() Exacly on: ELECHOUSE_CC1101_SRC_DRV.cpp line: 892 if (SpiReadStatus(0x31) > 0) deeper: while (digitalRead(MISO_PIN)); I cant fully understand why we want MISO_PIN to be set low @LSatan