New user of this site (And a newbie on the Arduino as well). I have an ongoing project that I was trying to do with an Arduino, but before I go any further I thought I might listen if anyone here had some good ideas for an approach.
This is the case:
I have an old defective Genicom lineprinter. This receives data via a Dataproducts parallel interface from an old mainframe. With help from a program made by Paul Jewel, I did another version that converts the Dataproducts standard to RS-232. This gives me the printout in a terminal window on a PC, but the old Genicom printer is also capable of printing dot graphics (Printronix Graphic mode). Currently I am receiving these ASCII codes via the terminal and translating them with a program on the PC. This software is however filled with bugs and strange things, so I am looking for another solution.
My question for the forum is, what could be another approach using the Arduino even more. I was thinking something along the line of when the printer goes into graphic mode, then converting these data to f.ex. Epson ESC/P code instead, which is more commonly known by a lot of printing software for PC's.
For information the mainframe outputs an ENQ (05) after a line of dot data, this is what causes the printer to go into dot mode.
Your printer interface is usually called "Centronics" Parallel Interface. What Arduino are you using? I ask because the interface takes 17 pins to implement, plus ground. IS the whole in and out supported?
I would use the Arduino you currently are using, just as the serial to parallel converter, and program a second Arduino to send and receive serial data to/from the converter.
I am using an Arduino Uno. The thing is already running. Centronics is a different type parallel standard. Back in the days, there was two competing standards. Guess which one won. It is only 7 bit data (no extended ASCII) one strobe and one acknowledge. Very simple. The interesting part is how to deal with the plot mode graphics commands.
I made an interface program in Processing to take the serial output from a scope and print it out on the screen. I know it is not exactly what you want but it does take the plot graphics commands and turns them into a graphics screen on my Laptop. It also uses an old version of Processing but it might give you some ideas:- http://www.thebox.myzen.co.uk/Mac_Apps/Processing.html
Sorry for being unclear. I am scrapping the printer and using the arduino to convert the parallel data from the old mainframe, currently just to a terminal on a pc. The graphic conversion is currently being done by a program on the terminal pc. So to sum it up: the arduino is replacing the old dot matrix printer from 1989.
LarsHansen:
Sorry for being unclear. I am scrapping the printer and using the arduino to convert the parallel data from the old mainframe, currently just to a terminal on a pc. The graphic conversion is currently being done by a program on the terminal pc. So to sum it up: the arduino is replacing the old dot matrix printer from 1989.
That has helped a bit - but more explanation is needed
How could an Arduino replace a printer? An Arduino has no capability to make marks on paper.
And this
The graphic conversion is currently being done by a program on the terminal pc
suggests that the data is already getting from the mainframe to your PC without any need for an Arduino.
What exactly is the role you have in mind for the the Arduino?
Ah, Sorry once again. I am already using the arduino as a printer-to-terminal. The data i put in my software on the pc is comming from the usb rs-232 interface on the arduino. This is the parallel data from the mainframe, converted by the arduino to serial data instead which I can read on my terminal software. When the output from the mainframe goes into plot mode, I am saving the data and converting them using another program. The plot data is just ASCII codes telling the punching hammer where to put dots. It is not some fancy heavy duty graphic.
I put this under project guidance because I have no idea what the arduino is capable of. I need ideas for what I might be able to do with it if I wanted to use it to convert the plot mode graphics into something useable on a modern PC or even skipping the terminal and connecting a laser printer directly to the arduino, so everything recieved from the mainframe will just be printed out on this.
LarsHansen:
I put this under project guidance because I have no idea what the arduino is capable of. I need ideas for what I might be able to do with it if I wanted to use it to convert the plot mode graphics into something useable on a modern PC or even skipping the terminal and connecting a laser printer directly to the arduino, so everything recieved from the mainframe will just be printed out on this.
You put this in the proper forum.
You need to completely understand where you are going with this. If the end result is graphics on a PC, then you need to be very conversant with graphics on a PC. If it is to go to a laser printer, then the same applies to the laser printer.
Right now you are concentrating on a really irrelevant part of the system. You need to define the input, which you have, pretty much, and define exactly the output of your system. when that is done, then worry about how to do the translation.
The end result is open for interpretation. I was actually looking for god ideas as to what I might be able to do. If I already had the idea I would probably be asking about help for coding in C, as I am not used to it.
I know all there is to know about the plot mode graphics as well, it is very simple stuff. Each ASCII character represents 6 dots/empty spaces. Line distance is 1/72 inch. Each line has 780 dots/empty spaces (130 ASCII characters per line). There are 708 rows on a page. I don't have the programmers reference for the old system here, but i believe it is 60x72dpi resolution. Just for information.
LarsHansen:
Ah, Sorry once again. I am already using the arduino as a printer-to-terminal. The data i put in my software on the pc is comming from the usb rs-232 interface on the arduino. This is the parallel data from the mainframe, converted by the arduino to serial data instead which I can read on my terminal software. When the output from the mainframe goes into plot mode, I am saving the data and converting them using another program. The plot data is just ASCII codes telling the punching hammer where to put dots. It is not some fancy heavy duty graphic.
So it sounds as if you have an Arduino program that takes in data from the parallel output of the mainframe and converts it to serial data which is passed on to your PC. Is that correct? I do wish you had told us that in your Original Post.
If that program is working correctly (as seems to be the case) I don't understand what assistance you are hoping to get from this Forum?
The business of interpreting the data and producing text or pictures on your PC screen is a matter for a program running on your PC.
I did actually say that in the original post. The code is even attached. I might have been unclear but that is what I said.
You are correct in one thing, processing the data on a pc is the normal way to go, and that is what I am doing now, but where is the fun in that. But hey, we could just stop all innovation. If that is the only thing I can use the arduino for here, then I could have build it with a few IC's instead, no programming needed.
Onde again the original question is about the possible solutions IF the arduino could be used for graphic conversion or whatever. I only asked because I do not know its limitations.
LarsHansen:
Onde again the original question is about the possible solutions IF the arduino could be used for graphic conversion or whatever. I only asked because I do not know its limitations.
Now that we have all the confusion out of the way maybe you can describe what exactly you think the Arduino might do in relation to the graphic conversion?
Convert from what to what?
What would be the purpose of conversion using the Arduino rather than the PC?
...R
PS... I think the following is a correct and concise description of your problem (please correct me if I am wrong)
I am using an Arduino Uno to take data from the parallel interface on an old mainframe computer and convert it to serial data so I can view it on my PC. (My parallel printer is broken). This Arduino program is working well but I would like some help to extend it to do some graphic conversions.
Yes, you are pretty much correct, but I wouldn't say I am looking for help. I am rather looking for good ideas to what I might do with the arduino if I wanted it to convert the dot graphic data to something else.
The purpose of using the arduino instead of the pc is purely because I can. 20 years ago when these problems with failing (and very expensive) dot matrix printers started to become more common, the solution was exactly what I am doing now. Convert to rs-232, recieve on PC, convert with software and then print. Here we are 20 years later, and I want to try something else. I have no more specific information to give you. I am not asking for help regarding a problem I have, I am asking for any advice on what I might be able to do with the arduino given my situation. Does this make sense to you?
The simplest thing you could do with the graphs data is to display it on a small graphics LCD display like this:- 240x320-SPI-TFT-LCD-Serial-Port-Module
Or more out of of the box thinking, why not turn the graphics data into notes and play a tune. For a better tune send the data to a MIDI sound module. That way you have different instruments and can play chords.
Or how about flashing LEDs that mirror the ASCII data, not useful but looks cool, all computers have flashing lights don't they?
Or triggering a typewriter sound effect as the data is printed out.