Mac Serial to USB

23 posts / 0 new
Last post
doug-doug the mighty's picture
Offline
Last seen: 3 weeks 1 day ago
Joined: Apr 14 2004 - 17:52
Posts: 1396
Mac Serial to USB

I need to build my own Mac Serial (RS-422 Mini-8) to USB dongle.

The ideal solution will not require any special drivers (or if any are needed, then they must be pretty small in size.

I am finding specs for 422 to RS-232 and RS-232 to USB, but the latter requires usage of certain chips from vendors and I was hoping to keep my final product to something simple or to a single small micro since I have a space constraint.

Google is not my friend tonight. Anyone been down this road before?

TIA
--Doug

dvsjr's picture
Offline
Last seen: 14 hours 57 min ago
Joined: Jun 8 2004 - 15:14
Posts: 136
Sure have

http://tinyurl.com/qyrh7

d

doug-doug the mighty's picture
Offline
Last seen: 3 weeks 1 day ago
Joined: Apr 14 2004 - 17:52
Posts: 1396
Thanks, but...

I need to build my own becuase the Keyspan one is too large for what I want to do with it.

I want my final dongle to be something the size of (or smaller than) a USB thumb drive. If an existing product is close to that size, that is great, otherwise I must consider building my own.

dankephoto's picture
Offline
Last seen: 9 months 1 week ago
Joined: Dec 20 2003 - 10:38
Posts: 1899
eh?

I assume you intend to hook a serial device to a USB host computer, yes? The other way around (USB device to serial computer) is much more difficult. My following comments apply to the first case, I haven't a clue about the second.

As for existing adapters, you may find that the actual PCB inside the casing is small enough for your needs. I've had apart my single-port Keyspan adapter and it's pretty small. Also, it's quite unlikely you'll find any chipset which requires no drivers. Most chipsets have drivers available for OS X, but very few drivers are available for any classic Mac OS.

dan k

doug-doug the mighty's picture
Offline
Last seen: 3 weeks 1 day ago
Joined: Apr 14 2004 - 17:52
Posts: 1396
hmmm...

this will not be easy. I am seeking to build a dongle for a small serial computer from which I may source RS-232 or Mac Serial (RS-422). I seek to attach USB devices, typically a keyboard or a thumb drive. I did expect to have to provide the device specific drivers, but was hoping to be able to plug-and-play my dongle with the serial computer.

Either way, I want to minimize the dongle size to be something like the size of an index finger or smaller.

Eudimorphodon's picture
Offline
Last seen: 3 months 3 weeks ago
Joined: Dec 21 2003 - 14:14
Posts: 1207
Re: hmmm...

this will not be easy. I am seeking to build a dongle for a small serial computer from which I may source RS-232 or Mac Serial (RS-422). I seek to attach USB devices, typically a keyboard or a thumb drive. I did expect to have to provide the device specific drivers, but was hoping to be able to plug-and-play my dongle with the serial computer.

This is real simple then. You can't do that. The technical discussion is long-winded, but, well, search the Ethernet or ADB converter threads that crop up now and again where someone gets the "brilliant" idea of saying "Hey! I have a USB to (insert port, let's say Ethernet) converter. Can I use it in reverse to hook up USB devices to my NuBus PowerMac 6000SUX?". The answer is just as much "no".

You could use something like a Gumstix micro-embedded computer:

http://www.gumstix.com/products.html

running Linux to host the USB devices, and then write what essentially boils down to a network protocol stack to run on the serial computer to talk to the USB host and use the resources it thus supplies. The Gumstix hardware has both a USB 1.1 host controller and a serial port, so you're set there. It's all about writing software after that.

There's no easier way to do this. And no cheaper way, honestly. You're not beating $99.00 for a tiny embedded computer.

--Peace

doug-doug the mighty's picture
Offline
Last seen: 3 weeks 1 day ago
Joined: Apr 14 2004 - 17:52
Posts: 1396
For the sake of argument...

Let's say that my serial computer has the capacity to go into a 'dumb' mode and connect to another computer via its serial port to dock and exchange files controled by an application on the host computer (newer Mac).

Assume that the drivers for the USB to Serial conversion are handled on the Mac side. What is the most compact way to translate the serial to USB?

Otherwise the Gumstix solution looks like it may do part of what I need and I will explore it further. Thanks!

Eudimorphodon's picture
Offline
Last seen: 3 months 3 weeks ago
Joined: Dec 21 2003 - 14:14
Posts: 1207
Re: For the sake of argument...

Let's say that my serial computer has the capacity to go into a 'dumb' mode and connect to another computer via its serial port to dock and exchange files controled by an application on the host computer (newer Mac).

Assume that the drivers for the USB to Serial conversion are handled on the Mac side. What is the most compact way to translate the serial to USB?

Otherwise the Gumstix solution looks like it may do part of what I need and I will explore it further. Thanks!

Just to hazard a guess... you're trying to put a USB port on a Newton, arn't you? ;^)

I'd suggest going to one of these fine locations:

http://www.palm.com/us/
http://www.microsoft.com/windowsmobile/
http://tuxmobil.org/pda_linux.html

And checking out all the fine products you can purchase now, often at very reasonable prices, that will do many things that are very, very difficult to do with Newtons. ;^)

--Peace

Offline
Last seen: 1 year 3 months ago
Joined: Dec 20 2003 - 10:38
Posts: 69
You'll probably need to do th

You'll probably need to do the same things for the Gumstix that you would need to do with OS X -- and write some sort of driver for the USB port to transliterate the raw data into something that the serial port on the victim machine can understand.

You may (probably will) have to write a driver on the victim to manage the oncoming serial data, unless you massage the USB data into what the victim machine is expecting in terms of mouse/keyboard.

dankephoto's picture
Offline
Last seen: 9 months 1 week ago
Joined: Dec 20 2003 - 10:38
Posts: 1899
re: Mac Serial to USB

As is customary DDTM, you're being very cagey about your project. Smile Are you sure you can't just spill the specifics and ask for some alternative solution suggestions?

DDTM, you seem to gravitate toward unspeakably difficult hacking challenges . . . while it's nice to be challenged, that approach can lead to lots of starts but few finishes. Err, ask me how I know . . . Wink

dan k

doug-doug the mighty's picture
Offline
Last seen: 3 weeks 1 day ago
Joined: Apr 14 2004 - 17:52
Posts: 1396
Guilty as charged...

As is customary DDTM, you're being very cagey about your project. Smile Are you sure you can't just spill the specifics and ask for some alternative solution suggestions?

DDTM, you seem to gravitate toward unspeakably difficult hacking challenges . . . while it's nice to be challenged, that approach can lead to lots of starts but few finishes. Err, ask me how I know . . . Wink

dan k

I know I do this all to often, but I like to keep things generalized so I can fill in the specifics on my own. I found from asking help (professionally) in the past, that things were to customized to get clear help form a vendor or counterpart at another company. So if I keep things generic the answers are easier to come by. Asking how do I build a utility to parse variable length fields from a text file (CSV or tab delimited) out as fixed block text is easier than asking how I can feed a Word document into a fixed block VSAM file for use in a COBOL program without changing the logic of the program (which here expects FB files). (The answer for me was to use VB macros and Excel to pump from the file to the mainframe with a single macro.)

Convoluted, I know, but I often find that the simple answer to the generic question can lead to ideas I had not thought of before.

In this case, my end goal is to provide a USB interface for docking my Newton to a computer, but I want to build my own docking station on a recently acquired interconnect plug (raw part, not a dongle). I know I can do it and even find specs out there for it, but I want it to be as simple on the software side as possible. An added plus would be to utilize a USB device with my Newton (say a keyboard). Yes, I could write drivers on the Newton side (in theory), but Eudi's idea of gumstix was not something I would have ever thought of nor do I think I would have been offered that if I had just said 'How can I build my own USB dock for my Newton?'.

You are right in that I tend to seek the impossible challenge and part of this goes to the thin hope that I will never die due to the abundance of unfinished projects that need to be completed. The other part of it is to learn how things work and discover new challenges.

Here, I do plan to build a dock for my Newton that provides USB, I just want to see what else I can do with it since I am in the 'design' phase right now.

dankephoto's picture
Offline
Last seen: 9 months 1 week ago
Joined: Dec 20 2003 - 10:38
Posts: 1899
re: Guilty as charged...

Heh heh, eudi nailed ye on this one - USB on a Newt. Heh! Smile

While a understand and appreciate your desire to turn such projects into learning experiences, there are much simpler ways to accomplish what you seek. First off, you can easily fabricate a 'dock' to connect the Newton serial port to a USB-equipped computer using an existing serial-USB adapter. As for using other peripherals, I think you'd be better served with available solutions. eg: If you need a Newton keyboard, why not just source a Newton serial keyboard?

However, in spite of what I write here, I am, as always, excited to see what you come up with. :?

dan k

doug-doug the mighty's picture
Offline
Last seen: 3 weeks 1 day ago
Joined: Apr 14 2004 - 17:52
Posts: 1396
guilty

Eudi is one of the sharper crayons in the box...

I thought about using an existing serial-to-USB dongle, but the whole thing is driven by the fact that I have an interconnect plug and want to build a docking connector.

This connector need not have a serial port on it (since I have an internal serial port card installed). The whole problem with the existing dongles is that I would need to build in a mac serial port just to plug in a dongle. I would rather route the pins from the interconnect port to the USB plug directly (after going through some translation to switch the channel 0 serial to USB). I did not want to mess with dongles. If I really needed a mac serial AND a USB port, I could just do something like what was on the eMate (the sliding door that let you use the interconnect port OR the serial port, but not both at the same time).

I do have a Newton keyboard, but sometimes I may not bring my keyboard along. Since all Macs now have a USB keyboard, this is a convenient alternative. I must also face the fact that if my Newton keyboard dies, gets lost/stolen, or otherwise unusable, it is near impossible to replace; That and I cannot seem to find one of the Sto-away keyboards from Palm that can easily be hacked to work with the Newton - I am sure that the newer models *could* work, but all the hacks I have seen call for models no longer made/easily found.

Being able to drive a USB device such as a keyboard opens the gateway for more complex devices, such as a thumb drive or a BT plug-in.

The heart of the issue really is *I want to build USB into a dock for my Newton without a dongle*. Note that this is not internal USB I am talking about, this is a legitimate dock interfacing throught the interconnect port via the plug part I have acquired.

Offline
Last seen: 10 years 6 months ago
Joined: Sep 16 2004 - 02:44
Posts: 274
Just curious, but do all newt

Just curious, but do all newtons have pc card slots or just the emate? Wouldn't that give more possibilities for usb on the newton?

doug-doug the mighty's picture
Offline
Last seen: 3 weeks 1 day ago
Joined: Apr 14 2004 - 17:52
Posts: 1396
Yes

All Newtons have PC card slots. The accept Type 2 cards only.

The MessagePad 200 and 2100 had two such slots. The eMate differed in that it could accept a Type 3 card (if it was not type 3, then it was type 2 cards with a type 3 profile due to the double doors on the slot, but it only took one card).

Can you do USB on a PC card? I have never heard of it, but the idea is pretty interesting (not related to my need for it on a dock, but interesting nonetheless).

dankephoto's picture
Offline
Last seen: 9 months 1 week ago
Joined: Dec 20 2003 - 10:38
Posts: 1899
USB pc-card = cardbus = no-go on Newtons

All USB PC cards are 32 bit cardbus (think roughly PCI equivalent) and therefore cannot work on a 16 bit slot equipped Newt. BTW, all Newts can use type 1 and type 2 cards, and yes, the eMate the thicker type 3 as well - the 'type' only describes the thickness of the card.

As for storage, you can use PC-card-based storage in one of your slots, check out Paul Guyot's ATA Support. BT may be available in a 16 bit card, I don't know.

Edit: Looks like 16 bit BT cards are available, see these google results Still, is there an appropriate driver for Newton? If not, it's roll-yer-own time.

dan k

ex-parrot's picture
Offline
Last seen: 3 years 10 months ago
Joined: Dec 20 2003 - 01:35
Posts: 6844
The trouble with this kind of

The trouble with this kind of project, provided I understand what you're describing, is that USB is a far more complex protocol than RS232/RS422. USB uses packets etc and is far more like a high-level network protocol than good old RS232 serial.

If I am correct and you're trying to make a USB docking station for your Newton, why not just take the PCB out of the USB -> RS422 adapter, and wire it straight up to the serial pins in the dock connector?

doug-doug the mighty's picture
Offline
Last seen: 3 weeks 1 day ago
Joined: Apr 14 2004 - 17:52
Posts: 1396
Re: The trouble with this kind of

...If I am correct and you're trying to make a USB docking station for your Newton, why not just take the PCB out of the USB -> RS422 adapter, and wire it straight up to the serial pins in the dock connector?

This would work well, but it would be cheaper to build my own pcb than buy off-the-shelf stuff just to gut it for a project. Especially since I plan to have the audio stuff and power stuff. Just building my own pcb seems the way to go. If the USB driver lives on the Mac, that is fine - I just need to choose hardware that the Mac can easily/already support.

Eudimorphodon's picture
Offline
Last seen: 3 months 3 weeks ago
Joined: Dec 21 2003 - 14:14
Posts: 1207
Re: The trouble with this kind of

This would work well, but it would be cheaper to build my own pcb than buy off-the-shelf stuff just to gut it for a project. Especially since I plan to have the audio stuff and power stuff. Just building my own pcb seems the way to go. If the USB driver lives on the Mac, that is fine - I just need to choose hardware that the Mac can easily/already support.

What makes you think so? Have you actually sourced PCB boards and components in small quantities before? Ripping the guts out of an inexpensive Keyspan serial adapter is going to look *really* cheap by the time you're done, I guaruntee. The other advantage of ripping up pre-existing dongle is you won't have to write drivers for it. You can find USB->Serial components in chip catalogs, but unless you use the same exact one as used by a mass-market adapter with a pre-existing driver *and* make sure your homemade device identifies itself identically when announcing itself on the USB bus you'll have to write your own driver for the host OS.

You could always desolder the components off a commercial device and put them on your own circuit board, I suppose. Good luck with that.

As a general comment, well, not to be overly blunt, but, I'm not sure you entirely understand the scale of some of these projects you come up with. I get the impression sometimes that you look at pinout diagrams for bus X and bus Y, observe that they have signal lines with similar names, and jump to the conclusion that you can just cobble up a plug-and-play "something" from off-the-shelf components that'll translate between X and Y. And further, allow the computer equipped with X to "just use" devices hung off of your cobbled-up Y-adapter without having to write any software drivers.

There *are* ways you could build a USB adapter for a Newton so it could drive a USB keyboard and a thumb drive. Search for the thread which mentions that USB host adapter for Atari 800XL computers, for instance. The same USB host controller could be interfaced to a Newton, probably via the PCMCIA slot. But the hardware is *meaningless* without driver software. You really need to ask yourself if you're willing to learn how to write low-level software drivers *and* possibly higher-level OS shims before undertaking projects like this. If not, then you're going to have to team up with someone else who is, but before you're going to be able to do that you're going to have to demonstrate that you're able to produce a working hardware design. Which brings us back to the first point.

Honestly, before thinking of projects like Newton USB host controllers and PCI slots in Quadra 950s, how about tackling a challenge like this?:

Get your hands on an old ISA bus PC. (ISA interfacing is very simple, and is basically what you'll find on a 16 bit PCMCIA slot except with much larger connections and no complications like hot-pluggability.) Buy an ISA wire-wrap breadboard card:

http://www.jdr.com/interact/item.asp?itemno=gr-jdrpr

design a simple circuit to decode a hardware address, and then interface a few LEDs to it. (Let's say 8 LEDs, one for each of an 8 bit data byte.) Then write some software to flash those LEDs in sequence. Doesn't need to be a full-fledged OS driver, mind you. A simple DOS executable will do.

This is a basic "first semester" computer electronics class project, and being able to do it in your sleep could be considered a *strong* prerequisite for some of the ideas you come up with. If you've done this sort of thing before I apologize for misreading your experience level. If not, well, I'd *really* recommend doing something like this and building said experience before jumping into the deep end. That's not said to discourage you. It's just... you'll never make any progress at all towards these "pie in the sky" projects otherwise.

Anyway.

--Peace

doug-doug the mighty's picture
Offline
Last seen: 3 weeks 1 day ago
Joined: Apr 14 2004 - 17:52
Posts: 1396
Re: The trouble with this kind of

What makes you think so? Have you actually sourced PCB boards and components in small quantities before?

Yes, but not in the past five years.

Ripping the guts out of an inexpensive Keyspan serial adapter is going to look *really* cheap by the time you're done, I guaruntee. The other advantage of ripping up pre-existing dongle is you won't have to write drivers for it.

And to prototype, I may resort to that.

You can find USB->Serial components in chip catalogs, but unless you use the same exact one as used by a mass-market adapter with a pre-existing driver *and* make sure your homemade device identifies itself identically when announcing itself on the USB bus you'll have to write your own driver for the host OS.

I probably would use the same part since it would be known to work, although if I needed to flash it with some ROM code or something (general rule of thumb), I may steer away from that approach.

You could always desolder the components off a commercial device and put them on your own circuit board, I suppose. Good luck with that.

Large caps and resistors, maybe, but not ICs or micro caps.

As a general comment, well, not to be overly blunt, but, I'm not sure you entirely understand the scale of some of these projects you come up with. I get the impression sometimes that you look at pinout diagrams for bus X and bus Y, observe that they have signal lines with similar names, and jump to the conclusion that you can just cobble up a plug-and-play "something" from off-the-shelf components that'll translate between X and Y. And further, allow the computer equipped with X to "just use" devices hung off of your cobbled-up Y-adapter without having to write any software drivers.

I realize that bus X and Y may not shim together. But sometimes I may put that type of question out there to start a few ideas around about how one might (sometimes for the sake of argument and no better reason, sometimes for a very direct and targeted reason).

......If you've done this sort of thing before I apologize for misreading your experience level. If not, well, I'd *really* recommend doing something like this and building said experience before jumping into the deep end.

Not in the past ten years, not counting my recent attempts to design such projects on paper without attempting to make them real-life artifacts.

That's not said to discourage you. It's just... you'll never make any progress at all towards these "pie in the sky" projects otherwise.

No, I realize this and recognize that I talk much more than produce said ideas, but in this asking I do often play both sides of the coin, sometimes confirming my pre-existing idea that a certain thing *could* be done if A, B, and C. Othertimes, I suspect that it cannot happen because of X, Y, and Z. For this reason, I do try to keep my questions somewhat generic. You will find that when I am very specific about my questions, it ususally indicates I am trying to do something real as oppossed to my just tossing around an idea.

I have always respected you and do sometimes refer to you as 'the painful voice of reason', but only because you are right more often than not (still have not seen the 'not'). I do not take any slight from your points.

Thanks!

DrBunsen's picture
Offline
Last seen: 9 years 8 months ago
Joined: Dec 20 2003 - 10:38
Posts: 946

That $99 gumstix board needs some more $ spent on interface boards and more space taken up before it'll do serial and USB. From memory.

DDTM have you worked with PIC micros at all?

Eudimorphodon's picture
Offline
Last seen: 3 months 3 weeks ago
Joined: Dec 21 2003 - 14:14
Posts: 1207
Re:

That $99 gumstix board needs some more $ spent on interface boards and more space taken up before it'll do serial and USB. From memory.

The Gumstix has USB and serial present on its connector header. You will of course require more space to break it out... although, reading the specs more carefully, it's not a host controller. It's just a client that can emulate an ethernet port. Well, so much for that.

(I thought it had a "USB "On-The-Go" controller which can do both, an assumption based on the fact it uses a chipset similar to that used in most Xscale PDAs, but apparently it's dumber then that.)

DDTM have you worked with PIC micros at all?

A PIC will work as a serial dongle, but good luck using one as a host controller, which would be needed for keyboard and disk (flash or otherwise) applications.

--Peace

doug-doug the mighty's picture
Offline
Last seen: 3 weeks 1 day ago
Joined: Apr 14 2004 - 17:52
Posts: 1396
So...

...as it stands, I will then be planning a simple dock with an integrated USB dongle which will require a USB driver.

The higher idea of supporting a USB device, regardless of how simple, will remain just out of reach until such time as someone far smarter than I cna right a Newton-sized driver or embed such into firmware in said such device - or something like that.

This answers many more questions than I had when I first set out with my initial question.

Log in or register to post comments