• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

emulating parallel printer with PIC24 and SD card - completed with photos!

mdanh2002

Member
Hi,

Out of curiosity I made a PIC24-based virtual parallel port printer in order to transfer screen captures and memory data from my Tektronix 1230 Logic Analyzer to a PC. This is because although my 1230 comes with both Centronics and RS-232 ports, I could not find the Tektronix application software for the RS-232 port (hard-to-find!) as well as the manual, which contains description on the serial protocol needed to pull the data out of the logic analyzer. On this logic analyzer, screen capture can be printed by double-pressing the NOTES key whereas memory contents can be printed by pressing the D key.

As the Tektronix 1230 Logic Analyzer prints its memory contents in text format but prints screen capture in graphics format, I have also written a tool to convert the print job file (containing the Epson escape codes generated by the logic analyzer) back to a 450x250 bitmap file, viewable on a PC.

The whole project is completed within three days, from breadboard-prototyping to soldering onto veroboard for more permanent usage.

Attached to this post are some photos of my virtual printer, the bitmap converter tool and its output.

epson.png IMG_0289.JPG printed.JPG printing.JPG PRN2782.png PRN3635.png reading.JPG whole_set.JPG

Look forward to your comments.


See details and download source code at my blog article http://minhdanh2002.blogspot.sg/2014/02/capturing-data-from-tektronix-1230.html
 
Last edited:

MrAl

Well-Known Member
Most Helpful Member
Hi,

That looks pretty interesting. Sometimes we need stuff like this because the interface built into something isnt what works with our system the way we want it to work or not at all. I ran into this several times in the past, one even involved a parallel printer port too where the new motherboard did not have a PPP so i had to buy a card, but the card was very slow, too slow for my use.

Of course when they went to USB somebody somewhere decided that we didnt need RS232 anymore...they decided that for us without any concern for what we might still need. Sure it's an old standard, but there are still a lot of devices that need that so we have to buy adapters for USB to RS232. They could have easily built a default mode that allowed RS232 right into the port without an adapter.
 

large_ghostman

Well-Known Member
Most Helpful Member
That is a cool project! there is alot of test gear where this would be handy! did you use the pics PSP port?
 

mdanh2002

Member
That is a cool project! there is alot of test gear where this would be handy! did you use the pics PSP port?
No. I just use bit-banging. Easier to program and you have full control. Using the PMP/PSP module will be more tricky and offers little extra benefit - they are not designed with parallel port printer in mind. :)

MrAl said:
Of course when they went to USB somebody somewhere decided that we didnt need RS232 anymore...they decided that for us without any concern for what we might still need.
I wonder why manufacturer can't just spare some space on modern PC for the parallel/serial port. It's not that there is no space left - and those ports are much easier to program and use in hobbyist electronics, compared with USB ports.
 
Last edited:

large_ghostman

Well-Known Member
Most Helpful Member
No. I just use bit-banging. Easier to program and you have full control. Using the PMP/PSP port will be more tricky and offers little extra benefit - they are not designed with parallel port printer in mind. :)



I wonder why manufacturer can't just spare some space on modern PC for the parallel/serial port. It's not that there is no space left - and those ports are much easier to program and use in hobbyist electronics, compared with USB ports.

That is precisely why! If you look at the operating systems they are making it harder and harder to get any access to user ports. Most use windows and for some reason microsoft dosnt want people having access to any of the serial ports! they dont even give you a terminal program now.
While microsoft dictate to pc manufactures there will be a time you wont be able to get port add on cards, not unless you pay a fee to microsoft for some DLL or something
 

MrAl

Well-Known Member
Most Helpful Member
No. I just use bit-banging. Easier to program and you have full control. Using the PMP/PSP port will be more tricky and offers little extra benefit - they are not designed with parallel port printer in mind. :)



I wonder why manufacturer can't just spare some space on modern PC for the parallel/serial port. It's not that there is no space left - and those ports are much easier to program and use in hobbyist electronics, compared with USB ports.

Hi,

Some still have one or the other or both, but either one is very rare these days so people have to buy adapters, and the adapters dont always work right for parallel port (speed issues).
 

misterT

Well-Known Member
Most Helpful Member
Some still have one or the other or both, but either one is very rare these days so people have to buy adapters, and the adapters dont always work right for parallel port (speed issues).
I just got a brand new HP laptop at work.. it is a slim, mean, modern machine. Solid state hard drives etc. (only about 200 gigs, programmers do not need much, haha). I was very surprised to find a rs232 port on back of it. Serial port is very important for embedded programmer, but even when the laptop has a "genuine" serial port I still use my usb to serial converters because they give me 3v logic compatible signals and operating voltage for the microcontroller. I think serial port is going to live long as a protocol, but the physical standard serial port is going to vanish eventually.

Nice project mdanh.. btw :)
 

mdanh2002

Member
I just got a brand new HP laptop at work.. it is a slim, mean, modern machine. Solid state hard drives etc. (only about 200 gigs, programmers do not need much, haha). I was very surprised to find a rs232 port on back of it. Serial port is very important for embedded programmer, but even when the laptop has a "genuine" serial port I still use my usb to serial converters because they give me 3v logic compatible signals and operating voltage for the microcontroller. I think serial port is going to live long as a protocol, but the physical standard serial port is going to vanish eventually.

Nice project mdanh.. btw :)
Thanks :)

Totally agree. Although the physical RS232 port has long gone from most modern computers, internally many hardware (GPS receivers, etc.) still use serial ports to communicate

Interesting to know that your new slim HP laptop has RS232 port - great for embedded engineers, many old equipments still use RS232 for data transfer. Now I wonder if it will work with a PIC JDM programmer using WinPIC or PonnyProg software :)

My Tektronix 1230 Logic Analyzer has a DB25 (yes, not DB9) RS-232C serial port at the back. :) Need to solder an adapter to connect it to a newer serial port. Wonder if any 'modern' equipment still has this 25-pin serial port?
 

large_ghostman

Well-Known Member
Most Helpful Member
You also have a nice site with loads of information! great stuff
 

KeepItSimpleStupid

Well-Known Member
Most Helpful Member
I get "Outdated Java Plugin detected" pop-up from a website called "tempsale.com" with nothing but an encoding after the name. You can't even dismiss the dialog. Not good at all. Sometimes when I dismiss that I get one for Adobe. These are common traps.
 

mdanh2002

Member
I get "Outdated Java Plugin detected" pop-up from a website called "tempsale.com" with nothing but an encoding after the name. You can't even dismiss the dialog. Not good at all. Sometimes when I dismiss that I get one for Adobe. These are common traps.
Could be your system issue (infected with spyware that shows random popup based on which site you visit?). Never get anything on mine including popups. Did not put anything on that page other then text and photos
 

large_ghostman

Well-Known Member
Most Helpful Member
I didnt get any pop ups, but yeah those java outdated things are annoying!!
 

KeepItSimpleStupid

Well-Known Member
Most Helpful Member
Running Ubuntu Linux. I don't have a Java plug-in installed. Oracle has made it difficult to install Java and Adobe will not support Flash anymore.
 

large_ghostman

Well-Known Member
Most Helpful Member
Running Ubuntu Linux. I don't have a Java plug-in installed. Oracle has made it difficult to install Java and Adobe will not support Flash anymore.
Can we no longer update flash then? I ask because I get loads of flash errors! and it crashes on win 8.1 loads
 

KeepItSimpleStupid

Well-Known Member
Most Helpful Member
See: http://get.adobe.com/flashplayer/

above website said:
NOTE: Adobe Flash Player 11.2 will be the last version to target Linux as a supported platform. Adobe will continue to provide security backports to Flash Player 11.2 for Linux.
I think there is an elusive bug in nearly all versions of Flash including the one for Windows. I did use Firefox and Win 7, but I see the same bug in Linux.

What I find is hangs or crashes when I'm watching streaming content with commercials or when you play with windows while flash is running. It didn't matter what platform.

It is supposedly one of the top crashers.
 

Latest threads

EE World Online Articles

Loading

 
Top