View Full Version : connecting to a hard disk
yabbadabbadoo
10-16-02, 09:56 PM
Hi, is it possible to store data on a hard drive or flash card using the RS 232/432 on an IsoPod? How would one even program it to do such a thing (drivers) using IsoMax?
Thanks in advance
Originally posted by yabbadabbadoo
Hi, is it possible to store data on a hard drive or flash card using the RS 232/432 on an IsoPod? How would one even program it to do such a thing (drivers) using IsoMax?
Check out http://www.star.net/people/~mvs/ where they sell an item called the 'stamp drive'. This is basically an RS232 to IDE/CF interface card. You send read/write commands and data via the serial port to the microcontroller connected to the storage device. I have never used one, so I can't comment on it's performance.
It would also be possible to add a CF/IDE interface to the IsoMax via the digital I/O, but unless you're making a lot of units this (or similar) device would be more cost effective.
Regards,
PJE
yabbadabbadoo
10-19-02, 04:44 AM
Thanks PJE,
That's just what the doctor ordered. 115 kbaud max transfer rate, 10 mW not including the storage device. I wonder what rate I could get through IsoPod digital I/O. I'm looking at the IsoPod with external storage for use in a cansat (tiny satellite). Now I need to look into writing compression software in IsoMax or Forth, or to low power compression hardware.
Originally posted by yabbadabbadoo
Thanks PJE,
That's just what the doctor ordered. 115 kbaud max transfer rate, 10 mW not including the storage device. I wonder what rate I could get through IsoPod digital I/O. I'm looking at the IsoPod with external storage for use in a cansat (tiny satellite). Now I need to look into writing compression software in IsoMax or Forth, or to low power compression hardware.
I would expect you'd be able to get maybe 10 times the read/write speed if you connected the drive directly to the IsoPod. Running the IDE interface in 8-bit mode would required (WAG) around 12-16 I/O lines. The main issue is time reading the IDE spec.
Regards,
PJE
RMDumse
10-21-02, 09:13 AM
What kind of compression are you looking for, what is the nature of the signal? In 1989 I wrote a lossless data compression for a siesmic event recorder that acheived typical compressions of 13:1.
yabbadabbadoo
10-21-02, 01:24 PM
To PJE:
Thanks for the guidance. I have a year to prepare this, if I were to write an IDE driver, as it's not for a current project. I guess whether a custom IDE driver is worth doing depends on whether the RS-232 product's bandwidth proves to be high enough, and whether it takes up too much room or power. Also, RS-232 to IDE to Flash is also a bit complicated - I'd like it to be as simple as possible. Perhaps a direct RS-232 to CompactFlash, or digital IO to Flash, if I was going to roll my own interface. Part of my question, though, is HOW to do this with IsoMAX. I like IsoMAX, so I'd rather use that than switch to MetroW/C, but I have no idea how I'd write a complex device driver or digital compressor in IsoMAX. Perhaps I'd have to extend IsoMAX with Forth, or write subroutines in Forth and call them from IsoMAX; since IsoMAX is (I believe) built on top of a Forth compiler, I imagine that shouldnt be much of a stretch (compared to embedding C or assembly). Anyone from NewMicros care to comment?
To RMDumse:
Thanks for your reply. What I had in mind was to implement a generic zip compressor or some other standard. Other than that, I don't have a particular satellite in mind so I can't now choose a compressor optimal for the data. The satellite I'm working on now will not use an IsoPod, but, coincidentally, the data this satellite will be looking at is seismic. It's a student project satellite that will be looking for earthquakes. The project is using a Pegasus x86 board with an IDE adaptor for holding a flash card, and I was wondering whether it was even feasible to use an IsoPod in its place (in a later project). At minimum that would require an external storage device and some form of compression. If I work on another project, IsoPod will be my first choice if it is up to the task (and not overkill). Most of the project satellites are running off of PICs or BasicStamps, but they don't have to process and store much data.
Thanks
Originally posted by yabbadabbadoo
To PJE:
Thanks for the guidance. I have a year to prepare this, if I were to write an IDE driver, as it's not for a current project. I guess whether a custom IDE driver is worth doing depends on whether the RS-232 product's bandwidth proves to be high enough, and whether it takes up too much room or power. Also, RS-232 to IDE to Flash is also a bit complicated - I'd like it to be as simple as possible. Perhaps a direct RS-232 to CompactFlash, or digital IO to Flash, if I was going to roll my own interface. Part of my question, though, is HOW to do this with IsoMAX. I like IsoMAX, so I'd rather use that than switch to MetroW/C, but I have no idea how I'd write a complex device driver or digital compressor in IsoMAX. Perhaps I'd have to extend IsoMAX with Forth, or write subroutines in Forth and call them from IsoMAX; since IsoMAX is (I believe) built on top of a Forth compiler, I imagine that shouldnt be much of a stretch (compared to embedding C or assembly). Anyone from NewMicros care to comment?
Without having a Stamp Drive I imagine they implement a simple block read/write to either IDE hard discs or CF card. This would simply consist of writing a few bytes into some configutation registers and then writing the block of data to the device. Looking at a pdf file from the beck website http://www.bcl.de/download/download.asp?id=14&status=en_download which outlines a simple IDE interface, as long as there are enough I/O spare it should be relatively easy to implement via parallel bit-banging the I/O ports (as the address/databus are not available).
It should be possbile via IsoMax to generate a state machine which accepts a command from another task and returns a status byte after it has written/read the data from the drive.
Hope this was of use.
PJE
yabbadabbadoo
10-24-02, 03:16 AM
To PJE
Thanks. Yes, very helpful.
To RMDumse
Would your algorithm run on an IsoPod? Is it proprietary?
----------
I'm looking for Forth algorithms for data compression, one link to a general article is here: http://www.programmersheaven.com/zone22/cat208/2252.htm
The IsoPod has 500 halfword bytes of program RAM, and 2k halfword bytes of data RAM. There's also 32k flash etc.. I'm just wondering how fast a compressor could run in that. I wish there was some sort of "streaming zip chip" out there I could just use as a black box.
I'll see if I can get the program linked to above running on a pod. It will be the first time I've tried to compile a Forth program in MaxForth. My pod is of course running IsoMax - how to load a Forth program and run it? I've printed out the manual to IsoMax but it's a guide to programming simple Finite State Machines. I dont see anywhere a method for uploading a Forth program and giving it a machine name (or calling it as a command) in IsoMax.
yabbadabbadoo
10-24-02, 03:27 AM
I printed out a list of command words for IsoMax. It is from the isopod.net site, and is for IM v0.2. After a full listing it organizes the words and lists what is described as a full implementation of MaxForth (v5?).
Also lists "procedural defining words" PROC and END-PROC.
Still wondering how to name and call upon such user-defined procedures within machines.
yabbadabbadoo
10-24-02, 03:49 AM
OK, so all "actions" are supposed to occur after the CAUSES statement, and that is where I suppose a procedure can be called, rather than something like "YELLOW ON" as one of the IsoMax examples.
Actions can be inserted between the six statements of a transition chain, but CAUSES is where they're intended to go.
I suppose a machine could be defined with something like the following
blah blah blah
CAUSES
PROC
yabbadabbadoo <=> code for the program I want to insert
END-PROC
blah blah blah
and that's how I could stick the program "yabbadabbadoo" into a machine transition. If that's the right answer, send me beer. But I don't think it is the best answer, because by the above I mean that I'm defining the yabbadabbadoo program within the machine. If I wanted to use the same program elsewhere, I'd have to enclose another copy of it again between PROC and END-PROC. What I'd like to do is
(somewhere, over the rainbow)
PROC YBDBDOO
[code for program "yabbadabbadoo"]
END-PROC
(somewhere else, inside a glass slipper)
blah blah blah
CAUSES YBDBDOO
blah blah blah
Is that how it is done?
nmitech
10-24-02, 03:48 PM
yabbadabbadoo,
PROC ... END-PROC is how you access Forth from within Isomax. The way it
works is the way you wants, but the syntax is slightly different.
It is
DEFINE <name> PROC ...Forth code... END-PROC
or, to use your example,
DEFINE YBDBDOO PROC
[Forth code for program "yabbadabbadoo"]
END-PROC
(somewhere else, inside a glass slipper)
blah blah blah
CAUSES YBDBDOO
blah blah blah
...is how it is done.
yabbadabbadoo
10-24-02, 04:50 PM
Thanks,
Last night I found the DEFINE statement (and example of using it with PROC .. END-PROC) at the very end of the IsoMax pdf manual. I had done searches for the word PROC in the pdf, but the code samples are apparently not searchable. At least that one wasn't.
Thanks again.
vBulletin v3.0.7, Copyright ©2000-2012, Jelsoft Enterprises Ltd.