View Full Version : Basic USB workings
I am building a printing GPS.· I envision a portable four port USB hub, with a USB GPS receiver in one port, a big 7.2v RC car battery in another, a Seiko USB label printer in another, and the BS1USB in the last.
So now my question is about basic USB access - how does that work?· Is each device addressable?· How do I know what to read and what to write to?· A pointer to a simple USB primer or an example app would be fine.·
I saw no reference to this in the PBasic manual, but·I might not have been looking in the right place.·
Thank you for your help on this very basic question.
01-21-2007, 03:41 AM
All those units are 'Slave' units on the USB bus.
(The PC is a 'master')
The BS1USB is a 'normal' BS1 with a USB-to-serial chip added. For the BS1 it all looks like a normal serial port.
The Vinculum (http://www.parallax.com/detail.asp?product_id=604-00051) may help you get the BS1 to act like an USB Master, but...
There's no way the BS1 would be capable of doing all the communications needed to get those units to co-operate.
(It just doesn't have the program space or the speed to deal with them)
Do you NEED the printouts to be on labels?
If not, consider a thermic or 'dot matrix' type print assembly as used in printing calculators or cash registers.
And no, you can't use normal paper in the labe printers. They have detectors for 'end of label' and synch markings on the back of the paper, and that won't work with normal paper rolls.
Also, connecting a 7.2V battery in one of the USB HUB ports is a bad idea.
It needs to be connected to the DC-in connector, or if no such connector, be regulated to 5V and connected to the 'upstream' USB-connector. (The one normally connected to the PC)
My reccommendation is a fast BS2 type and serial-based equipment.
Don't visit my new website...
OK Gadgetman, I hear you and I admit that others have told me the same thing. I will check out the Viniculum and either use it or return the USB GPS receiver I bought.
I have no real problem going with one of the BS2 models, and it will give me both more space for my graphical label design and more space to capture the GPS output. If the BS1USB doesn't help me in my connectivity issues, then I have no reason to use it.
I was only connecting the battery to the USB because the BS1USB gets its power via the USB connector; that isn't an issue with the BS2, so I will connect it in the standard way.
I am definitely committed to labels, and I have to be battery powered. I expect to use about 1000 labels in about a week, then the project is done, so the cost of the individual labels is less of an issue than the fact that they fade in UV light. I'm still wrestling with the printer choice.
Thanks for your help!