ah. Can a PIC32 microcontroller work as a USB flash RAM stick?

A flash RAM drive must support a file system and an appropriate USB API functions for an operating system to recognize it as a flash drive. I used FAT12 file system image, which was more than enough for a flash RAM drive with about 1 MB storage space. I reserved the rest of PIC32MZ2048ECH100 flash RAM for program code. However, with a smaller flash RAM drive (around 30 kB) it is also possible to use PIC32MX270F256B microcontroller as a flash RAM drive...

Get PIC32MZ2048ECH100 USB flash drive.zip with the HEX file from Downloads section.

ALSO READ:

- PIC32MZ2048ECH100 - 100-pin PIM basic USB circuit

- How to make a large (flash) RAM drive with 1 MB or more inside a microcontroller?

- How to get PIC32MZ2048ECH100 working on USB?

- What are PIC32MZ2048EC advantages?

- How to connect PIC32MZ2048ECH100 PIM to a standard PCB or Velleman K8055N-2 experiment board?

Having a (flash) RAM disk in your microcontroller may greatly simplify its use through an operating system like Windows 7 or newer. A configuration file on a microcontroller flash RAM drive may be altered using an arbitrary text (*.txt) editor, not just by a specialized application. The (flash) RAM drive may also provide a standard communication interface to various Windows applications without USB APIs (Application Program Interfaces).

PIC32 microcontrollers are developed around a 32-bit MIPS CPU core that was once used in UNIX workstations. It is not surprising though that Microchip 32-bit microcontrollers with large enough RAMs and flash RAMs (kind of EEPROM) are starting to support this functionality again.

Yes, it can!

Click on the schematic to enlarge it.