Erste Frage zu C++

  • 1
  • 2
  • 3
  • 12
  • 13
  • Page 13 of 13
TheBeginner
Schreiberling
Avatar
Gender: n/a
Location: Wunsiedel Bayern
Age: 67
Posts: 756
Registered: 06 / 2013
Subject:

Re: Erste Frage zu C++

 · 
Posted: 26.04.2024 - 06:41  ·  #97
Guten morgen,
ich habe es jetzt geschafft HW-SPI,
warum das so geht verstehe ich überhaupt nicht.

Ich habe das Display jetzt an

#define TFT_CS 54
#define TFT_DC 55
#define TFT_RST 56
//MISO (50)
//MOSI (51)
//SCK (52)
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_RST);


Warum das Display ILI9341 an diese Pins (50/51/52) gefunden wird ist mir unklar.
Ich kann es mir nur so vorstellen das der Treiber dieses Display sucht.

Und die Original variant.h habe ich gelassen
Code

/*
 * SPI Interfaces
 */
#define SPI_INTERFACES_COUNT 2   

#define PIN_SPI_MISO        (64)           
#define PIN_SPI_MOSI        (66)           
#define PIN_SPI_SCK         (65)           
#define PERIPH_SPI          sercom7        
#define PAD_SPI_TX          SPI_PAD_0_SCK_1
#define PAD_SPI_RX          SERCOM_RX_PAD_3
static const uint8_t SS    = (53);          
static const uint8_t MOSI = PIN_SPI_MOSI;
static const uint8_t MISO = PIN_SPI_MISO;
static const uint8_t SCK  = PIN_SPI_SCK;
#define PIN_SPI1_MISO       (80)
#define PIN_SPI1_MOSI       (82)
#define PIN_SPI1_SCK        (81)
#define PIN_SPI1_SS         (83)
#define PERIPH_SPI1         sercom2
#define PAD_SPI1_TX         SPI_PAD_0_SCK_1  
#define PAD_SPI1_RX         SERCOM_RX_PAD_3  
static const uint8_t SS1   = PIN_SPI1_SS;
static const uint8_t MOSI1 = PIN_SPI1_MOSI;
static const uint8_t MISO1 = PIN_SPI1_MISO;
static const uint8_t SCK1  = PIN_SPI1_SCK;


Gruß Frank
  • 1
  • 2
  • 3
  • 12
  • 13
  • Page 13 of 13
Selected quotes for multi-quoting:   0

Registered users in this topic

Currently no registered users in this section

The statistic shows who was online during the last 5 minutes. Updated every 90 seconds.
MySQL Queries: 15 · Cache Hits: 14   36   50 · Page-Gen-Time: 0.01842s · Memory Usage: 2 MB · GZIP: on · Viewport: SMXL-HiDPI