July 04, 2025, 08:45:33 PM

Recent posts

#1
ESP32 / Re: ESP32-SBC-FabGL .. PCemula...
Last post by LubOlimex - Today at 08:04:28 AM
No need of hardware modifications. Just software control of the CS, invert the CS. Usually it can be done if you define it as -13 instead of 13. But in some software you might need to look into the code to make sure it is inverted.

My Arduino code was tested empirically. If it compiles and downloads to the board and if you don't see the card info in the serial terminal, then the problem is in the card.
#2
New Product Ideas / Re: Olimex RP2040-PICO-PC for ...
Last post by therese80 - July 03, 2025, 10:30:43 PM
Quote from: homeshopper on August 26, 2024, 12:04:46 PMHi, Thank you for your message, sorry for the late reply.
I did flash DVI.uf2 to the Pico W attached to the RP2040-Pico-Pc board.
A red led lights, but no output from the HDMI.
Do you have anymore suggestions I could try?

Hi homeshopper,

i purchased this board and install Picomite HDMIUSB ( see forum at 'the backshed').

Picomite a Sophisticated Basic interpreteur with a huge community .

It's work at first boot ... with integrated full screen editor .
Power on , boot direct to the BASIC ..

@+
therese80 (aka TRS80)


#3
New Product Ideas / Re: ESP32-SBC-FabGL ... instea...
Last post by therese80 - July 03, 2025, 10:25:32 PM

Hi,

Waow .. Olimex develop card at speed of light  :P

Today I saw RP2350pc .. it's what i needed
HDMI seem to be compliant with Picomite HDMIUSB V6.00.02

it's what i wanted ...

Could you test it with Picomite HDMIUSB V6.00.02 check the forum at the BackShed  ::)
And test SDCARD ... hahahaha

@+
TRS80
#4
ESP32 / Re: ESP32-SBC-FabGL .. PCemula...
Last post by therese80 - July 03, 2025, 05:02:24 PM
hi,
thanks for all this suggestion , but none work...
Used Arduino/PlatformIO


the only don't have tested ,it is the hardware modif. of U1 .. i have no tool for this moment .. and U1 is SMD ..

i gonna to find someone to make modification .

i have rp2040-pico-pc , implemented PicoMite 6.00.02 and work at first boot , and the same  SDCARD used for copy prog. between my laptop .

@+
TRS80
#5
ESP32 / Re: ESP32-SBC-FabGL .. PCemula...
Last post by LubOlimex - July 02, 2025, 02:51:33 PM
One SPI goes to SD card and to the CH32V003 and depending on the CS state one or the other will be used. Important here is that there is also SN74LVC1G04DBVR(SOT23-5) invertor on the CS line specifically.
#6
ESP32 / Re: ESP32-SBC-FabGL .. PCemula...
Last post by LubOlimex - July 02, 2025, 02:50:18 PM
It can work without holding the CH chip in reset if you invert the CS logic. E.g. change CS from pin 13 to pin -13. Try the following demo:

/*
 * pin 1 - not used          |  Micro SD card     |
 * pin 2 - CS (SS)           |                   /
 * pin 3 - DI (MOSI)         |                  |__
 * pin 4 - VDD (3.3V)        |                    |
 * pin 5 - SCK (SCLK)        | 8 7 6 5 4 3 2 1   /
 * pin 6 - VSS (GND)         | ▄ ▄ ▄ ▄ ▄ ▄ ▄ ▄  /
 * pin 7 - DO (MISO)         | ▀ ▀ █ ▀ █ ▀ ▀ ▀ |
 * pin 8 - not used          |_________________|
 *                             ║ ║ ║ ║ ║ ║ ║ ║
 *                     ╔═══════╝ ║ ║ ║ ║ ║ ║ ╚═════════╗
 *                     ║         ║ ║ ║ ║ ║ ╚══════╗    ║
 *                     ║   ╔═════╝ ║ ║ ║ ╚═════╗  ║    ║
 * Connections for     ║   ║   ╔═══╩═║═║═══╗   ║  ║    ║
 * full-sized          ║   ║   ║   ╔═╝ ║   ║   ║  ║    ║
 * SD card             ║   ║   ║   ║   ║   ║   ║  ║    ║
 * Pin name         |  -  DO  VSS SCK VDD VSS DI CS    -  |
 * SD pin number    |  8   7   6   5   4   3   2   1   9 /
 *                  |                                  █/
 *                  |__▍___▊___█___█___█___█___█___█___/
 *
 * Note:  The SPI pins can be manually configured by using `SPI.begin(sck, miso, mosi, cs).`
 *        Alternatively, you can change the CS pin and use the other default settings by using `SD.begin(cs)`.
 *
 * +--------------+---------+-------+----------+----------+----------+----------+----------+
 * | SPI Pin Name | ESP8266 | ESP32 | ESP32‑S2 | ESP32‑S3 | ESP32‑C3 | ESP32‑C6 | ESP32‑H2 |
 * +==============+=========+=======+==========+==========+==========+==========+==========+
 * | CS (SS)      | GPIO15  | GPIO5 | GPIO34   | GPIO10   | GPIO7    | GPIO18   | GPIO0    |
 * +--------------+---------+-------+----------+----------+----------+----------+----------+
 * | DI (MOSI)    | GPIO13  | GPIO23| GPIO35   | GPIO11   | GPIO6    | GPIO19   | GPIO25   |
 * +--------------+---------+-------+----------+----------+----------+----------+----------+
 * | DO (MISO)    | GPIO12  | GPIO19| GPIO37   | GPIO13   | GPIO5    | GPIO20   | GPIO11   |
 * +--------------+---------+-------+----------+----------+----------+----------+----------+
 * | SCK (SCLK)   | GPIO14  | GPIO18| GPIO36   | GPIO12   | GPIO4    | GPIO21   | GPIO10   |
 * +--------------+---------+-------+----------+----------+----------+----------+----------+
 *
 * For more info see file README.md in this library or on URL:
 * https://github.com/espressif/arduino-esp32/tree/master/libraries/SD
 */

#include "FS.h"
#include "SD.h"
#include "SPI.h"

#define REASSIGN_PINS
int sck = 14;
int miso = 35;
int mosi = 12;
int cs = -13;

void listDir(fs::FS &fs, const char *dirname, uint8_t levels) {
  Serial.printf("Listing directory: %s\n", dirname);

  File root = fs.open(dirname);
  if (!root) {
    Serial.println("Failed to open directory");
    return;
  }
  if (!root.isDirectory()) {
    Serial.println("Not a directory");
    return;
  }

  File file = root.openNextFile();
  while (file) {
    if (file.isDirectory()) {
      Serial.print("  DIR : ");
      Serial.println(file.name());
      if (levels) {
        listDir(fs, file.path(), levels - 1);
      }
    } else {
      Serial.print("  FILE: ");
      Serial.print(file.name());
      Serial.print("  SIZE: ");
      Serial.println(file.size());
    }
    file = root.openNextFile();
  }
}

void createDir(fs::FS &fs, const char *path) {
  Serial.printf("Creating Dir: %s\n", path);
  if (fs.mkdir(path)) {
    Serial.println("Dir created");
  } else {
    Serial.println("mkdir failed");
  }
}

void removeDir(fs::FS &fs, const char *path) {
  Serial.printf("Removing Dir: %s\n", path);
  if (fs.rmdir(path)) {
    Serial.println("Dir removed");
  } else {
    Serial.println("rmdir failed");
  }
}

void readFile(fs::FS &fs, const char *path) {
  Serial.printf("Reading file: %s\n", path);

  File file = fs.open(path);
  if (!file) {
    Serial.println("Failed to open file for reading");
    return;
  }

  Serial.print("Read from file: ");
  while (file.available()) {
    Serial.write(file.read());
  }
  file.close();
}

void writeFile(fs::FS &fs, const char *path, const char *message) {
  Serial.printf("Writing file: %s\n", path);

  File file = fs.open(path, FILE_WRITE);
  if (!file) {
    Serial.println("Failed to open file for writing");
    return;
  }
  if (file.print(message)) {
    Serial.println("File written");
  } else {
    Serial.println("Write failed");
  }
  file.close();
}

void appendFile(fs::FS &fs, const char *path, const char *message) {
  Serial.printf("Appending to file: %s\n", path);

  File file = fs.open(path, FILE_APPEND);
  if (!file) {
    Serial.println("Failed to open file for appending");
    return;
  }
  if (file.print(message)) {
    Serial.println("Message appended");
  } else {
    Serial.println("Append failed");
  }
  file.close();
}

void renameFile(fs::FS &fs, const char *path1, const char *path2) {
  Serial.printf("Renaming file %s to %s\n", path1, path2);
  if (fs.rename(path1, path2)) {
    Serial.println("File renamed");
  } else {
    Serial.println("Rename failed");
  }
}

void deleteFile(fs::FS &fs, const char *path) {
  Serial.printf("Deleting file: %s\n", path);
  if (fs.remove(path)) {
    Serial.println("File deleted");
  } else {
    Serial.println("Delete failed");
  }
}

void testFileIO(fs::FS &fs, const char *path) {
  File file = fs.open(path);
  static uint8_t buf[512];
  size_t len = 0;
  uint32_t start = millis();
  uint32_t end = start;
  if (file) {
    len = file.size();
    size_t flen = len;
    start = millis();
    while (len) {
      size_t toRead = len;
      if (toRead > 512) {
        toRead = 512;
      }
      file.read(buf, toRead);
      len -= toRead;
    }
    end = millis() - start;
    Serial.printf("%u bytes read for %lu ms\n", flen, end);
    file.close();
  } else {
    Serial.println("Failed to open file for reading");
  }

  file = fs.open(path, FILE_WRITE);
  if (!file) {
    Serial.println("Failed to open file for writing");
    return;
  }

  size_t i;
  start = millis();
  for (i = 0; i < 2048; i++) {
    file.write(buf, 512);
  }
  end = millis() - start;
  Serial.printf("%u bytes written for %lu ms\n", 2048 * 512, end);
  file.close();
}

void setup() {
  Serial.begin(115200);

#ifdef REASSIGN_PINS
  SPI.begin(sck, miso, mosi, cs);
  if (!SD.begin(cs)) {
#else
  if (!SD.begin()) {
#endif
    Serial.println("Card Mount Failed");
    return;
  }
  uint8_t cardType = SD.cardType();

  if (cardType == CARD_NONE) {
    Serial.println("No SD card attached");
    return;
  }

  Serial.print("SD Card Type: ");
  if (cardType == CARD_MMC) {
    Serial.println("MMC");
  } else if (cardType == CARD_SD) {
    Serial.println("SDSC");
  } else if (cardType == CARD_SDHC) {
    Serial.println("SDHC");
  } else {
    Serial.println("UNKNOWN");
  }

  uint64_t cardSize = SD.cardSize() / (1024 * 1024);
  Serial.printf("SD Card Size: %lluMB\n", cardSize);

  listDir(SD, "/", 0);
  createDir(SD, "/mydir");
  listDir(SD, "/", 0);
  removeDir(SD, "/mydir");
  listDir(SD, "/", 2);
  writeFile(SD, "/hello.txt", "Hello ");
  appendFile(SD, "/hello.txt", "World!\n");
  readFile(SD, "/hello.txt");
  deleteFile(SD, "/foo.txt");
  renameFile(SD, "/hello.txt", "/foo.txt");
  readFile(SD, "/foo.txt");
  testFileIO(SD, "/test.txt");
  Serial.printf("Total space: %lluMB\n", SD.totalBytes() / (1024 * 1024));
  Serial.printf("Used space: %lluMB\n", SD.usedBytes() / (1024 * 1024));
}

void loop() {}
#7
ESP32 / Re: ESP32-SBC-FabGL .. PCemula...
Last post by LubOlimex - July 02, 2025, 02:10:00 PM
Ok, so I tested and I can confirm this is not a problem with your board. I have same behavior here and it is because the SD card won't work with demos found over the internet.

This is because of the CH32V003F4P6(TSSOP20) expander chip. If you track the wires of the SD card - MISO, MOSI, CS, clock - all of them go not only to the ESP32-WROVER module but also to the U1 extender and it influences them.

If I hold the extender chip in reset (U1's pin 4 to ground) the SD card examples from the internet will work without issues.

So to interact with the SD card you need to first to interact with the CH32V003 firmware and driver:

https://github.com/OLIMEX/ESP32-SBC-FabGL/tree/main/SOFTWARE/CH32V003_Driver

You need to use our fork or CH32V003 will not be accounted for!

By the way, maybe check this customer project for first steps with the board:

https://github.com/MrSoxAndShoes/esp32-sbc-fabgl-quick-start

#8
New Product Ideas / Re: GateMateA1 for TERES-I
Last post by olimex - July 02, 2025, 12:59:17 PM
What CPU architecture do you want to make?
At what speed it will run?
Are you capable to make proper Linux support too?
#9
ESP32 / Re: ESP32-SBC-FabGL .. PCemula...
Last post by therese80 - July 02, 2025, 12:40:50 PM
Quote from: LubOlimex on July 02, 2025, 08:21:02 AMEach board is tested after manufacturing, there is also empirical test of the SD card. Board defect is not very likely.

Later today I will test with simple SD card project like you under Arduino IDE one of the boards here and will give you sample code to test.

thanks for your advice .

i tested with example :
Altair8800 , in code when fail to mount SDCARD , it mount drive on Flash ... no error message... but sdCARD still unmount

PCEmulator when fail mountSDCARD .. doesn't mount drive in flash and popup display error

Very strange i have tested this 2 examples and my testsdcard with Arduino and Platformio !

@+
TRS80

#10
ESP32 / Re: ESP32-SBC-FabGL .. PCemula...
Last post by LubOlimex - July 02, 2025, 08:21:02 AM
Each board is tested after manufacturing, there is also empirical test of the SD card. Board defect is not very likely.

Later today I will test with simple SD card project like you under Arduino IDE one of the boards here and will give you sample code to test.