![]() |
![]() |
![]() |
|
|
|||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
|
|
Thread Tools | Display Modes |
|
|
(permalink) |
|
Is there anyway to connect a uC like PIC(any) to a printer and perform a print? or would that be to difficult?
__________________
My YouTube Videos! My Favorite Stores: dipmicro Electronics SparkFun Electronics Futurlec BG Micro |
|
|
|
|
|
|
(permalink) |
|
If it's connected through the parallel port it would be easy enough and you should find examples on the net.
|
|
|
|
|
|
|
(permalink) | |
|
Quote:
If you have a serial port printer it is very easy. If you have a parallel printer it is still easy but you either need a lot of pins or use a shift register (my choice). If you have a USB only printer then the job is more difficult. The last time I checked PICs would only act as slaves. Maybe that has changed, you would need to check or have a body who knows will squeak up. Now for the kicker. If you actually want to print anything you have to find a printer that can print ASCII. Many/most of the printer sold today create the page image on the PC and dump it to the printer. This became popular maybe 15 years ago. So if you can latch on to an older printer.. A sure sign is that the printer takes font cartridges. As in the original HP Deskjet. There are actually a few of these around. They were built well. Mostly the friction pads that picked up the paper from the tray wore out.
__________________
search engine for electronic partsJunebug USB PIC programmer kit., USB Bit Wacker, 3v0's Homepage The 15 Minute Printed Circuit Board! (+drill time) Last edited by 3v0; 24th July 2008 at 05:06 AM. Reason: Changed 15-20 to 15 |
||
|
|
|
|
|
(permalink) |
|
wow that sux to here that.
__________________
My YouTube Videos! My Favorite Stores: dipmicro Electronics SparkFun Electronics Futurlec BG Micro |
|
|
|
|
|
|
(permalink) |
|
Atomsoft, if it's a parallel printer it's actually really easy, all you need are 9 connections, 1 for each data bit and 1 for the strobe. Set the data bits, turn the strobe pin on and wait a small period of time and then set it low again. Each strobe pulse will cause the printer to read in the data pins. USB is however a different story. If a printer has a serial connection it likley has a parallel one as well (though not always)
__________________
"Because I be what I be. I would tell you what you want to know if I
could, mum, but I be a cat, and no cat anywhere ever gave anyone a straight answer, har har." |
|
|
|
|
|
|
(permalink) | |
|
Quote:
__________________
search engine for electronic partsJunebug USB PIC programmer kit., USB Bit Wacker, 3v0's Homepage The 15 Minute Printed Circuit Board! (+drill time) |
||
|
|
|
|
|
(permalink) |
|
Yes, almost no modern printers will work, you need either an old printer, or a very expensive one - old dot-matrix printers are a good option. The last non-Windows printer I had was an HP Deskjet 500 - which cost an absolute fortune.
|
|
|
|
|
|
|
(permalink) |
|
You could learn PCL and send your datastream that way.
Last time I tinkered with a printing application it goes something like this. 1. Application to OS print subsystem 2. OS subsystem creates a printing metafile 3. The driver of the printer takes the metafile an puts it into something the printer understands. So you "could" learn a bit of PCL and fire that at the printer directly, PCL is relatively old but still understood by most printers. A sample datastream looks like this. Code:
%!PS
/minidict 45 dict def minidict begin
/inch {72 mul} def
/ld {load def} def
/gs /gsave ld /gr /grestore ld /gray {gs setgray fill gr} def
/li /lineto ld /rl /rlineto ld /ct /curveto ld/set {gs setlinewidth st gr} def
/mt /moveto ld /tr /translate ld /np /newpath ld /cp /closepath ld
/st /stroke ld /rp /repeat ld /ro /rotate ld /rt /rmoveto ld
/box {np mt rl rl rl cp set} def /circle {np arc set} def
/newline {tm lg sub /tm exch def lm tm mt} def
/centre {dup stringwidth pop 2 div linewidth 2 div exch sub lm add tm mt} def
/right {dup stringwidth pop rm exch sub tm mt} def /r {right n} def
/s /show ld /n {show newline} def /L {newline} def
/c {centre n} def /kern {0 rmoveto} def /k {kern} def
/F {findfont exch scalefont setfont} def
/w /widthshow load def /h {0 32} def
/textbox {/lm 0 def /bm 0 def /rm 7 inch def /tm 0 inch def /lg 12 def lm tm moveto} def
/page {gsave 50 72 translate textbox} def
/close {grestore showpage end} def
/end
gs 0.75 inch 10.50 inch tr textbox
10 /Helvetica F
(Hello World) n
grestore
Hope this is useful Mark p.s. USB = I don't think so! |
|
|
|
|
|
|
(permalink) | |
|
Quote:
|
||
|
|
|
|
|
(permalink) |
|
True, though most printers appear to accept PCL3.
It would be an interesting project though. Mark |
|
|
|
|
|
|
(permalink) |
|
im glad i can give at least a project idea. I wont be taking this on becuase too advanced for me i guess and wont fit project needs. I wanted to make a project that would print info contain in eeprom but formatted like eeprom will contain date/time info and other things.
But i might as well have it dump the info to a terminal and print it there.
__________________
My YouTube Videos! My Favorite Stores: dipmicro Electronics SparkFun Electronics Futurlec BG Micro |
|
|
|
|
|
|
(permalink) | |
|
Quote:
But like many of the members here, I come from an age long before Windows printers - my first printer was actually a Tandy (Radio Shack) one that printed on 4 inch rolls of paper using 4 little coloured ball-point pens. I originally used it on a 6502 based Tangerine computer purely in machine code (not even assembler!), eventually moving to single pass assembler, then dual pass assembler, and eventually Microsoft BASIC and even Forth. The little printers were really amazing, you could print 80 characters wide text on a 4 inch roll, or draw any graphics you wanted - essentially you could switch between the four coloured pens, the pens moved left to right, and the paper moved up and down - in this way it could draw anything you wanted, it wasn't a dot based system (more a plotter than a printer). |
||
|
|
|
|
|
(permalink) |
|
sounds cool but if my project was to ever hit mainstream (for sale) then it would need to be a general printer needed. Or i would have to sell with printer and if printer isnt widely available or is to costly then it would effect sales.
In which case you would need to make it require a PC and printer driver to make it work. Even if it was 20-30 years ago, you would still have needed to provide printer drivers (in your application) for all different supported printers. Windows has really spoiled everyone, the printer manufacturer provides a Windows printer driver and everything works - even back in the PC DOS days every single application had to provide their own printer drivers for supported printers. You could use most printers in a crude text only way though, as they generally mostly provided a simple text only mode, based on the original Centronics standard.
__________________
My YouTube Videos! My Favorite Stores: dipmicro Electronics SparkFun Electronics Futurlec BG Micro Last edited by Nigel Goodwin; 24th July 2008 at 02:13 PM. |
|
|
|
|
|
|
(permalink) | |
|
Quote:
Exactly what do you plan to print.?
__________________
Eric "Good enough is Perfect" PIC tutorials: Gramo's: www.digital-diy.net/ Bill's: www.blueroomelectronics.com/ |
||
|
|
|
|
|
(permalink) |
|
well it was meant in general but lets say for example my im making my alarm and want it to print out the info every time an alarm goes off but on command print out entire eeprom info.
__________________
My YouTube Videos! My Favorite Stores: dipmicro Electronics SparkFun Electronics Futurlec BG Micro |
|
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Latest |
| Two Stepper controllers from Epson printers | Parre86 | Datasheet/Parts Requests | 0 | 4th February 2008 08:20 PM |