Connecting a printer to Basic Stamp
Brian Dalziel
Posts: 17
Hi Fellas,
I'm getting involved with a datalogging project where I need to get a hard copy after the test is complete (using Basic Stamps).·
Wondering how to connect a printer (any type of printer) to a Stamp.· I am sure there must be an intermediate device (USB) that is available to connect to a Stamp somehow, then you connect the printer to the USB device?· Or can you use a straight serial printer.
I am also guessing that you can use SEROUT command to output data to the printer.· I'm sure it gets wildly complex, but any help of what type of equipment I need and frags of code to get me started, would be much appreciated!
Thanks - Brian
I'm getting involved with a datalogging project where I need to get a hard copy after the test is complete (using Basic Stamps).·
Wondering how to connect a printer (any type of printer) to a Stamp.· I am sure there must be an intermediate device (USB) that is available to connect to a Stamp somehow, then you connect the printer to the USB device?· Or can you use a straight serial printer.
I am also guessing that you can use SEROUT command to output data to the printer.· I'm sure it gets wildly complex, but any help of what type of equipment I need and frags of code to get me started, would be much appreciated!
Thanks - Brian
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
Do you have a Stamp Tester yet?
http://hometown.aol.com/newzed/index.html
·
Formatting wasn't too bad, as everything was monospaced, so you just needed to keep track of line position, and figure out how many spaces between fields (taking into account a possibly variable field length). The printer I worked with used separate carriage return and line feed characters.
If you can find a serial dot matrix, you should be all set.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
John R.
8 + 8 = 10
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
John R.
8 + 8 = 10
RoboGeek
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
There are·3 kinds of people in the world,
the dreamers, the do-ers, and the "Oh, what's this button do"-ers.
Formerly bugg.
www.parallax.com
www.goldmine-elec.com
www.expresspcb.com
www.startrek.com
Post Edited (RoboGeek) : 11/19/2005 1:24:33 AM GMT
73
spence
k4kep
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
73
spence
k4kep
http://www.parallax.com/dl/docs/prod/book/bs2pCommnFeat.pdf
·
1. Use a somewhat traditional serial printer
2. Use an I2C chip to get either parallel or serial I/O
[noparse][[/noparse]I am assuming USB printer requires too much initializing code for the BasicStamp to have much space left for an actual task.]
Option One, you may need hardware control lines as well as the Rx and Tx. To do so, I think you need to establish an other serial port with TTL signals and covert them the RS-232. I suppose you might try to use the existng port [noparse][[/noparse]the signals are already inverted] and just add two lines, but you might fine it just ain't worth it unless you absolutely must save two pins.
Lately, I have been thinking that USB is fairly limited in the embedded system environment. It seems to allow transmission and reception, but is very limited on control. Traditional RS-232 had 9 lines - one for the Ring Indication [noparse][[/noparse]nearly useless], four for Tx, Rx, and related grounds, and four for handshaking. Printers like to handshake.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"When all think alike, no one is thinking very much.' - Walter Lippmann (1889-1974)
······································································ Warm regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
www.phanderson.com/stamp/i2c/print1.html
Knight.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-
This message transmitted with 100% recycled electrons.
-=-=-=-=-=-
Gravity doesn't exist. The Earth sucks.
-=-=-=-=-=-
Make a man a fire, and he will be warm for the night.
Light the man on fire, and he will be warm for the rest of his life.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-