Shop Learn
Has anyone published P1 code functionally similar to SparkFun Thing Plus Dual-Port Logging Shield? — Parallax Forums

Has anyone published P1 code functionally similar to SparkFun Thing Plus Dual-Port Logging Shield?

dbpagedbpage Posts: 215
edited 2022-06-19 22:05 in Propeller 1

There is plenty of source code available to read sensors and log data to a microSD card. I wrote spin/pasm source code to log data to a microSD card. When it comes to reading the logged data, I have two choices:
1. Eject the microSD card and plug it into my computer card reader.
2. Connect my device to a computer and use TeraTerm and one-character commands to display a directory list of files, select a file, and transfer a file using XMODEM.

I have written spin source code that interfaces the P1 to my computer via a FT200XD USB UART Bridge and FSRW objects. My device powers up and enters Data Transfer mode when the USB cable is connected to a computer. This works fine, but I'd rather enjoy seeing Windows File Explorer or Mac Finder open and display the microSD card files when the USB is connected.

The SparkFun Thing Plus Dual-Port Logging Shield appears to provide the capability I am seeking, but this is for Arduino. The "dual port" feature refers Arduino logging data to the micro SD card through one "port" (a separate Thing device) and a USB connection allowing the computer to access the files through the second "port" (this shield). Only one "port" is active at a time, which is perfect for my application.

I am about to download the Arduino source code to see if there are enough clues to write similar functionality into my device to replace my simple user interface and TeraTerm.

In the meantime, I decided to ask the forum if anyone has published P1 code that provides similar functionality.

EDIT: I discovered that the "magic sauce" in the SparkFun Thing Plus Dual-Port Logging Shield is the Microchip USB2241 Ultra Fast USB 2.0 Multi-Format, SD/MMC, and MS Flash Media Controllers . The Shield lets the USB2241 interface the microSD card to the USB and computer.

Comments

  • msrobotsmsrobots Posts: 3,555

    well Flexspin has some sort of Filesystem to allow the Prop to access the PC file System and Pc access to the SD filesystem without removing SD from the Prop.

    Mike

  • I'm not seeing it. Flexspin compiles to hub memory.

    Please advise more details.

    Thanks!

  • JRoarkJRoark Posts: 1,047

    I believe Mike is referring to the Plan 9 Filesystem. This lets the Prop use the PC for storage, but I have never seen any way for the PC to mount the SD on the Prop or access it remotely. If that ability does exist, I’ve missed it (and whoa-baby I sure could use it! Lol).

    Paging @ersmith for clarification…

  • Thanks. If the P1 code doesn't exist, I will create and publish it!

  • ersmithersmith Posts: 5,334

    @msrobots said:
    well Flexspin has some sort of Filesystem to allow the Prop to access the PC file System and Pc access to the SD filesystem without removing SD from the Prop.

    Not the second part. The host filesystem in flexspin lets the Prop access the PC file system (you'll need to use loadp2 or my modified proploader on the PC side to support this). But there's no built in way for the PC to access the SD on the Prop.

  • dbpagedbpage Posts: 215
    edited 2022-06-20 21:48

    Does anyone happen to have a release copy of ISO/IEC 14776-326:2015 Reduced Block Commands (RBC).pdf (or equivalent) I can borrow? It's a bit pricey. Drafts are available for free, but I would hate to implement obsolete code.

    This pdf describes the USB packets for format, read, write and other commands.

    I think this information along with other documents I have will permit me to turn a P1/P2 into a USB card reader for on-board microSD cards to avoid removing the microSD card and using a computer card reader. The USB connection will require a separate FT200XD in lieu of the FT231XS in the Parallax Prop Plug and on other boards.

Sign In or Register to comment.