Difference between revisions of "SD Loader"
Jump to navigation
Jump to search
Blwikiadmin (talk | contribs) |
Blwikiadmin (talk | contribs) (→Serial) |
||
Line 207: | Line 207: | ||
** This is data that’s already arrived and stored in the serial receive buffer (which holds 64 bytes). | ** This is data that’s already arrived and stored in the serial receive buffer (which holds 64 bytes). | ||
** Turn off/on receive handshake based on Serial.available() count and storage | ** Turn off/on receive handshake based on Serial.available() count and storage | ||
+ | * [https://www.arduino.cc/reference/en/language/functions/communication/serial/write/ Serial.write()] | ||
+ | ** Writes binary data to the serial port | ||
+ | ** This data is sent as a byte or series of bytes | ||
+ | ** To send the characters representing the digits of a number use the print() function instead. | ||
+ | ** Syntax | ||
+ | |||
+ | <pre> | ||
+ | Serial.write(val) | ||
+ | Serial.write(str) | ||
+ | Serial.write(buf, len) | ||
+ | </pre> | ||
=== References === | === References === |
Revision as of 19:48, 5 June 2022
SD/Serial Loader
- Send/receive files to/from SD card from/to serial port
- Menu driven program
Features
- Supports SD cards up to 32GB
- FAT32 formatted
- Serial interface
- Full hardware Handshake support
Cards
- Constructed out of existing Land Boards cards
- NANO-BKOUT
- SD CARD X49
- MyMenu
- MCP23008 I2C interface
- OLED
- 5 Pushbuttnns
- 3 LEDs
- Level Shifter mounted on GRID49 card
NANO-BKOUT
SD CARD X49
MyMenu
Level Shifter (Optional)
- Convert 5V Arduino NANO Tx/Rx/RTS/CTS to 3.3V
- 4-channel I2C-safe Bi-directional Logic Level Converter
Cabling
NANO-BKOUT to Level Translator Cabling
NANO-BKOUT | SIGNAL | GRID49 | COLOR |
---|---|---|---|
D0 | RX (TO NANO) | G12 | BRN |
D1 | TX (FROM NANO) | F12 | ORA |
D2 | RTS FROM NANO) | E12 | YEL |
D3 | CTS (TO NANO) | D12 | WHT |
+5V | +5V | C12 | RED |
GND | GND | H12 | BLK |
NANO-BKOUT to MyMenu Cabling
NANO-BKOUT | SIGNAL | MyMenu | COLOR |
---|---|---|---|
H7-1 | GND | P2-1 | BLK |
H7-2 | +5V | P2-2 | RED |
H7-3 | SDA | P2-3 | WHT |
H7-4 | SCL | P2-4 | BRN |
H7-5 | INT(D6) | P2-5 | GRY |
NANO-BKOUT to SD_CARD_X49 Cabling
NANO-BKOUT | SIGNAL | SD_CARD_X49 | COLOR |
---|---|---|---|
ISP-1 | D12 / MISO | J1-2 | BRN |
ISP-2 | +5V | J1-8 | RED |
ISP-3 | D13 / SCK | J1-3 | BLU |
ISP-4 | D11 / MOSI | J1-4 | WHT |
ISP-5 | RST* | N/C | OR |
ISP-6 | GND | J1-1 | BLK |
D9 | D9/ SDCS* | J1-5 | GRY |
Software
- Runs on Arduino Nano
Human Interface Design (HID)
- Menu driven
- OLED display
SD Card
- SD Card library
- The SD library allows for reading from and writing to SD cards, e.g. on the Arduino Ethernet Shield
- It is built on sdfatlib by William Greiman
- The library supports FAT16 and FAT32 file systems on standard SD cards and SDHC cards
- It uses short 8.3 names for files
- The file names passed to the SD library functions can include paths separated by forward-slashes, /, e.g. “directory/filename.txt”
- Because the working directory is always the root of the SD card, a name refers to the same file whether or not it includes a leading slash (e.g. “/file.txt” is equivalent to “file.txt”)
- As of version 1.0, the library supports opening multiple files.
- The communication between the microcontroller and the SD card uses SPI, which takes place on digital pins 11, 12, and 13 (on most Arduino boards) or 50, 51, and 52 (Arduino Mega)
- Additionally, another pin must be used to select the SD card
- This can be the hardware SS pin - pin 10 (on most Arduino boards) or pin 53 (on the Mega) - or another pin specified in the call to SD.begin()
- SD card driver software - Example code reads directory
** SCLK - CLK - pin 13 ** MISO - SDI - pin 12 ** MOSI - SDO - pin 11 ** SS - CS - depends on your SD card shield or module.
Serial
- Serial Reference
- Serial.begin(speed)
- Serial.available()
- Get the number of bytes (characters) available for reading from the serial port.
- This is data that’s already arrived and stored in the serial receive buffer (which holds 64 bytes).
- Turn off/on receive handshake based on Serial.available() count and storage
- Serial.write()
- Writes binary data to the serial port
- This data is sent as a byte or series of bytes
- To send the characters representing the digits of a number use the print() function instead.
- Syntax
Serial.write(val) Serial.write(str) Serial.write(buf, len)