Shield LCD TFT 3,5 pouces pour Arduino UNO et MEGA
| Broche | Signal | Description |
|---|---|---|
LCD_D2 |
data | Parallel TFT LCD data bus bit 2 from the Arduino to the display controller. |
LCD_D3 |
data | Parallel TFT LCD data bus bit 3 from the Arduino to the display controller. |
LCD_D4 |
data | Parallel TFT LCD data bus bit 4 from the Arduino to the display controller. |
LCD_D5 |
data | Parallel TFT LCD data bus bit 5 from the Arduino to the display controller. |
LCD_D6 |
data | Parallel TFT LCD data bus bit 6 from the Arduino to the display controller. |
LCD_D7 |
data | Parallel TFT LCD data bus bit 7 from the Arduino to the display controller. |
LCD_D0 |
data | Parallel TFT LCD data bus bit 0 from the Arduino to the display controller. |
LCD_D1 |
data | Parallel TFT LCD data bus bit 1 from the Arduino to the display controller. |
SD_SS |
chip-select | MicroSD SPI slave-select/chip-select line; active low to select the card. |
SD_DI |
MOSI | MicroSD SPI data-in line; Arduino MOSI into the card. |
SD_DO |
MISO | MicroSD SPI data-out line; card MISO back to the Arduino. |
SD_SCK |
SCK | MicroSD SPI serial clock from the Arduino to the card. |
LCD_CS |
chip-select | TFT LCD chip-select input; active low to enable LCD command/data transfers. |
LCD_RS |
digital | TFT LCD register-select/data-command control line for the parallel interface. |
LCD_WR |
clock | TFT LCD write strobe; clocks Arduino data into the display controller. |
LCD_RD |
clock | TFT LCD read strobe; used when reading display controller data/status. |
GND |
ground | Ground reference for the LCD shield, microSD socket, and Arduino signals. |
5V |
power | 5 V supply input from the Arduino used to power the TFT shield circuitry. |
3V3 |
power | 3.3 V supply rail used by low-voltage shield circuitry such as the microSD interface. |
J4.4 |
power | Unlabeled power-side header contact passed through to the Arduino shield stack. |
J4.5 |
power | Unlabeled power-side header contact passed through to the Arduino shield stack. |
J4.6 |
power | Unlabeled power-side header contact passed through to the Arduino shield stack. |
LCD_RST |
reset | TFT LCD Reset |
| De | Vers | Fil |
|---|---|---|
board:GND |
x1:GND |
black |
board:5V |
x1:5V |
red |
board:3.3V |
x1:3V3 |
darkorange |
board:D2 |
x1:LCD_D2 |
green |
board:D3 |
x1:LCD_D3 |
blue |
board:D4 |
x1:LCD_D4 |
yellow |
board:D5 |
x1:LCD_D5 |
purple |
board:D6 |
x1:LCD_D6 |
cyan |
board:D7 |
x1:LCD_D7 |
magenta |
board:D8 |
x1:LCD_D0 |
brown |
board:D9 |
x1:LCD_D1 |
pink |
board:D10 |
x1:SD_SS |
teal |
board:D11 |
x1:SD_DI |
lime |
board:D12 |
x1:SD_DO |
green |
board:D13 |
x1:SD_SCK |
blue |
board:A0 |
x1:LCD_CS |
yellow |
board:A1 |
x1:LCD_RS |
purple |
board:A2 |
x1:LCD_WR |
cyan |
board:A3 |
x1:LCD_RD |
magenta |
board:A4 |
x1:LCD_RST |
brown |
Cet exemple a été écrit et vérifié à la compilation pour le arduino-uno. Codey Online l'adapte pour vous à toute autre carte prise en charge.
#include <SPI.h>
#include <SD.h>
// Canonical beginner sketch for a 3.5 inch TFT LCD Shield wired to an Arduino Uno.
// This example demonstrates using the microSD slot with the built-in SD library.
// The TFT control/data pins are shown in the wiring block, but the sketch keeps the
// example simple by focusing on the shield's SD card interface.
const uint8_t SD_CS_PIN = 10;
void printDirectory(File dir, int numTabs) {
while (true) {
File entry = dir.openNextFile();
if (!entry) {
break;
}
for (int i = 0; i < numTabs; i++) {
Serial.print('\t');
}
Serial.print(entry.name());
if (entry.isDirectory()) {
Serial.println('/');
printDirectory(entry, numTabs + 1);
} else {
Serial.print('\t');
Serial.println(entry.size(), DEC);
}
entry.close();
}
}
void setup() {
Serial.begin(9600);
while (!Serial) {
;
}
Serial.println(F("3.5 inch TFT LCD Shield - SD card example"));
Serial.print(F("Initializing SD card on CS pin D"));
Serial.println(SD_CS_PIN);
if (!SD.begin(SD_CS_PIN)) {
Serial.println(F("SD card initialization failed!"));
Serial.println(F("Check power, wiring, and that a card is inserted."));
while (true) {
delay(1000);
}
}
Serial.println(F("SD card initialized successfully."));
File root = SD.open("/");
if (root) {
Serial.println(F("Files on the card:"));
printDirectory(root, 0);
root.close();
} else {
Serial.println(F("Could not open root directory."));
}
}
void loop() {
// Nothing to do here for this basic example.
delay(1000);
}
Décrivez ce que vous voulez créer. Codey Online écrit le code, dessine le schéma de câblage, le compile et flashe votre carte directement depuis le navigateur.
Commencez gratuitement