Output ProtoBoard/DemoBoard etc directrly to USB printer
Skogsgurra
Posts: 231
I know next to nothing about USB. So, before I fry anything, I thought that it would be a good idea to ask. Simply put: Can I connect the PropPlug directly to a USB printer? Do I need a "null modem" or can I connect using a standard straigh through cable?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Comments
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
USB is a serial network with one master (host) and some number of slaves (peripherals). All the devices are addressable. There's a huge amount of complexity in the host to organize this network and manage it. There are some fairly cheap USB host interfaces on the market now that can be connected to a Propeller. The USBwiz from GHI Electronics has provisions for using a USB printer as well as a USB keyboard or mouse plus mass storage devices like thumb drives or even a CD drive.
I will get around to writing some usb drivers myself but you may like to look at what one guy did by bit-bashing an AVR.
www.cesko.host.sk/IgorPlugUSB/IgorPlug-USB%20(AVR)_eng.htm
This is possible with the Propeller running the USB at 1.5Mbps since 12Mbps would be out of the question. You might need clamping diodes.
*Peter*
*Peter*
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
E3 = Thought
http://folding.stanford.edu/·- Donating some CPU/GPU downtime just might lead to a cure for cancer! My team stats.
Personally I hate the USB implementation, but not the concept. If they had allowed for multi-dropping as well as for hubs plus +12V power on the cable it would be more "universal". Then there's the software complexity that seems to accompany anything remotely associated with microsoft. There also seems to be a great deal of obfuscation surrounding usb in general but that's what happens when you have a standards body and $4,000 annual membership fees.
But I'm just a mushie and I don't know that's it's impossible.
*Peter*
Perhaps somethnig like this would be easier to implement
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
E3 = Thought
http://folding.stanford.edu/·- Donating some CPU/GPU downtime just might lead to a cure for cancer! My team stats.
The problem: I have this little hand-held boc that takes field measurements (Prop Inside) and stores the results. Then, it is taken to a PC and the results are transferred, using Hyperterminal or something. Someone said that it would be neat to plug the device right into a printer and get the results on paper. The output is already formatted for that.
I told him to use a serial printer and he didn't even know what it is.
And there are no Centronics connectors on printers any more either... :-(
Thanks for lots of information! I bet there is more?!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
That printer is still being driven from the PC, the propeller is just converting encoder pulses from the origional paper feed to step pulses for a stepper motor.
More details of my ongoing project here: www.indoor.flyer.co.uk/3dprint.htm
Skogs,
A thermal printer module would probably do what you want, like the ones used in tills.
Or build your own printer: http://www.parallax.com/detail.asp?product_id=27949
Or look at the IR camera to printer interfaces, MIGHT be easier than USB if documented.
Graham
Sometimes, a no is also an answer
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
NO
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
E3 = Thought
http://folding.stanford.edu/·- Donating some CPU/GPU downtime just might lead to a cure for cancer! My team stats.
I'd check with Minolta first before I would say "not any more".
http://www.xs4all.nl/~achatz/drucker.MPG
have fun
Franz
Any further details?
Graham
I have a color dell laser (renamed xerox laser) and a b/w brother laser. Both have parallel and usb interfaces (the dell color also has ethernet, but that wouldn't help you too much).
So it would probably be cheapest to just go find a printer with a parallel interface that supports raw text printing (usually called dos support). If you can get that then just reserve about 10 pins on the Propeller (8 bit data, 1 bit strobe, 1 bit busy) and you can print via parallel.
Harrison
The problem is not, as I said before, to find a printer. The problem is that someone was a little lazy and did not want to walk to his office, start Hyperterminal etc. He than thought that it would be nice to plug into a USB printer close to the work-area and get a printout. I also thought that that would be a valuable possibility, if it was a possibility. Which it doesn't seem to be. So, he will either bring a laptop with him - or walk a couple of hundred metres, start HT and do the transfer. There's not much to it.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For a portable device like yours·I would suggest to use a calculators printer, like the HP 82240B thermal printer·that is used with HP calculators and can print text and graphics in a compact size. It uses an InfraRed port to communicate and the command set is easy to implement in a Propeller.
There are several examples on the internet·of how to use this printer with a microcontroller. I wrote·a very·simple BS·code·for a Stamp and it worked nicely.
This printer is cheap and is still available at many stores although HP has discontinued it(although there are compatible printers).
http://www.calculatorsource.com/hp-82240b.html
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
And no, you didn't really waist our time but if it was a boolean answer you were seeking, perhaps you should have mentioned it in the first or second post.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
E3 = Thought
http://folding.stanford.edu/·- Donating some CPU/GPU downtime just might lead to a cure for cancer! My team stats.
I learned a lot. That USBwiz is something I will look into. Not for this application, but others. This guy will have to do some walking. He is already excersising...
Thanks for sharing your vast knowledge. I appreciate that.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Any time you guys dig your teeth into a question... it is never a waste of time.
Scogs, you said "Thanks. But this is not about having a printer or having a computer. It is about someone being too lazy to walk a few hundred metres and starting the terminal program."
It sounds like your guy needs a hard-copy record... occasionally. And it sounds like he is employed... so he can't be all that lazy. Time is money... The distance he has to walk has a direct monetary value... and therefore set's the floor and ceiling for project costs.
distance x velocity x wage rate + cost of health care/hour + social security per hour + insurance * 8 hrs * 5 days * 52 = total cost per year (your potential budget[noparse]:)[/noparse]
You can set the terminal program once and it will be constantly waiting for input... which it can automatically save to a fixed file location. You could have another program watching that file and automatically print the file or some portion of it depending upon logic that you choose(ImageJ... is my favorite... nice macro language). If I were you, I would hot glue a prop to the side of the computer so your guy doesn't lose it...[noparse]:)[/noparse] But I'm not an engineer... so your solution would probably work better...
You problem can be translated "the office based prop communicates with the Prop doing the measurements... over a couple of hundred meters.
What is the cheapest and most reliable way to get the data from one to the other.
Rich
He could ride a bicycle?
This is a little like when I was employed at the head office of that HUGE company. When there was a technical thing to discuss, we posted a piece of paper on the bill-board in our coffee-room. Only hours later, the ideas used to pop up. Sometimes taking unexpected ways. Like riding a bike...
Yes, you are right. This is in an industrial environment. And it isn't just laziness. I think that the macro idea is just what I was needing. Some guys do not like to start programs like Hyperterminal, let alone configuring them. Bringing a laptop on site is no big deal. And if the data collection can be automated, it will be perfect. I will see what a macro can do for me. Thanks!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I have a similar problem... much simpler though. I like ImageJ... because you can watch the data come into your pc file and do things like "print" based on the value. http://rsb.info.nih.gov/ij/notes.html