Fast Simple Serial Data Logger
jmsayles
Posts: 2
in Propeller 1
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
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?
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.