Shop OBEX P1 Docs P2 Docs Learn Events
Fast Simple Serial Data Logger — Parallax Forums

Fast Simple Serial Data Logger

I use Fast Simple Serial to stream measurement data to Parallax Serial Terminal (uni-directional) and it does the job. I would like to log the data that is streamed using a memory device so I can capture the data without a PC and I would like to do it with as little code modification as possible. What would you suggest to tap into the data stream on either side of the Prop Plug to store the data? Thanks!

Comments

  • Are you trying to output data to both PST and a memory device, or just write code such that it is easy to switch between them?

    Also, I think SD cards are the most common memory device used with the Propeller. Is that acceptable or do you need/prefer something else?

    And finally, what is the data rate that you are logging?
  • jmsaylesjmsayles Posts: 2
    edited 2016-03-10 13:50
    Thank you David. I would like to output to either PST or a memory device, but not both at the same time. I already have production software written targeted for the PST and now I need to store the data in a field trial to a memory card. SD cards would be fine. The data rate is 38,400 baud, but I could go half that if necessary.
  • Hm... I just noticed Fast simple Serial is a Spin object. Sorry - I've been out of the Spin world for quite some time.

    I also noticed that Fast Simple Serial does not require a dedicated cog. I feel reasonably confident in saying, you won't find a SD card implementation in Spin that doesn't require a cog. I think there are only two common ones used: one comes with PropTool (FullMMCEngine or something like that) and the other is Kye's work: http://obex.parallax.com/object/16.

    Since you're looking for the smallest possible code change, I'm guessing you don't want to switch languages... but for future developers with these same requirements, Spin may not be your best choice here. The existing suite of libraries in Spin don't conform to any common standard or interface, making this very difficult.
    That being said, there is work being done on a "Spin Standard Library" which should help you out a lot. It should provide a common interface for different types of communication protocols, like UART and file output. Brett Weir can provide more info on that. http://developer.parallax.com/spin-standard-library/

    Spin as a language also has no way to run inline assembly, forcing everything to be either fast or run in the current cog, but never both. Other languages like C/C++, PropBasic, Tachyon, etc do not have this limitation.
Sign In or Register to comment.