EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Designing a protocol for the first time

Started by CC March 2, 2008
Keith M wrote:

Snip...

> Xmodem is considerably easier to implement than Zmodem. I implemented > Xmodem when I was about 10 or 11 years old, first in Basic, and then in > C.
Brings back old memories. My first product had X-Modem download capability and I wrote and debugged it in assembly language on a Saturday afternoon. It was exquisitely ugly with software timing loops and no crc, but it worked for years. I finally got sick of it and completely rewrote it with crc.
Keith M wrote:
> CBFalconer wrote: > >> If you are going to consider X-modem, try Z-modem. Much better >> error control, speed, etc. Uses the same transmission paths. >> > > Sorry to pick on your idea CBF. > > Xmodem is considerably easier to implement than Zmodem. I implemented > Xmodem when I was about 10 or 11 years old, first in Basic, and then in > C.
That's the sort of thing I can deal with!
>I remember Zmodem when it was first released, and it was great. Big > improvement over Xmodem and Ymodem, lots of extra features and > functionality. But it was also a lot more complex. Sliding windows, > automatic recovery, big checksums, transfer of filenames, etc etc. > > I'm not necessarily advocating anything for your particular application, > just wanted to point out that using Zmodem might not be a slam dunk.
I wouldn't have considered Zmodem for my app.
> Oh, and regarding FTDI chips. Their chips, drivers, and support are all > top notch. I'm using their FT232BM chip at 2mbps, and it works > reliably. I started using their VCP drivers, which work very well. I > eventually switched to using their D2XX .dll drivers, because it offers > more fine-grain control. > > Be sure to download the datasheets, app notes, and tips on their > website, especially when they talk about latency, baud rates, etc.
Thanks for the input to the thread! -- _____________________ Christopher R. Carlen crobc@bogus-remove-me.sbcglobal.net SuSE 9.1 Linux 2.6.5
Jim Stewart wrote:

> Brings back old memories. My first product had X-Modem > download capability and I wrote and debugged it in assembly > language on a Saturday afternoon. It was exquisitely > ugly with software timing loops and no crc, but it > worked for years. I finally got sick of it and completely > rewrote it with crc.
Jim, Sorry to bring the thread back from the dead -- just saw your reply now. Yeah, old memories indeed. I co-wrote some (unpopular, basically unknown) BBS software years ago as a kid, and one of my tasks was implementing the file upload/download feature. I remember finding XMODEM.TXT(the xmodem specs) on some bulletin board, and being very excited about it. At the time, however, I didn't have enough RAM to store it, and I couldn't write real time to my tape drive. So what I did was attach my modem to my printer directly (daisy wheel 130 column 25cps), and lo-and-behold, I managed to get a printed copy of it! 300 baud is +/- 25cps, so a little flow control, and I was home free. Ingenious for not being yet in my teenage years! :) Anyways, I ended up not understanding how the 8-bit checksum worked (I think it was just check=check+newbyte mod 256.), and so I picked up the phone and called the phone number at the top of the page.(of course!) Turned out to be either Ward Christensen or Chuck Forsberg at some university. I remember him telling me, "it's all in the spec" but I didn't know enough to understand most of what was in there. He provided a couple quick pointers and shoo'd me away back to my paper route. Ahh well. Keith

The 2024 Embedded Online Conference