1 | <?php |
---|
2 | $seiten_id = 'entwicklungsprojekte'; |
---|
3 | $version = '$Id: development-projects.php 287 2012-08-16 09:02:07Z heribert $'; |
---|
4 | $title = 'Development Projects'; |
---|
5 | |
---|
6 | require "../lib/technikum29.php"; |
---|
7 | ?> |
---|
8 | |
---|
9 | <h2>Development Projects</h2> |
---|
10 | |
---|
11 | <p>This page lists some of our development projects where old hardware meets modern |
---|
12 | computer equipment. All projects are selfmade, with partly enormous hardware and |
---|
13 | software efforts, like routed PCBs, kernel drivers and microcontrollers. |
---|
14 | <br/>Upcoming projects:</p> |
---|
15 | <ul> |
---|
16 | <!-- Done: --> |
---|
17 | <!--<li>punch card I/O with AVR ATmega microcontrollers via RS232 to computers, |
---|
18 | Qt platform independent processing, with various hardware</li>--> |
---|
19 | <li>Anelex printer interface to the Bull Gamma 10 computer (uC based)</li> |
---|
20 | </ul> |
---|
21 | <br/> |
---|
22 | |
---|
23 | <h3><a name="papertape"></a>Paper tape processing with contemporary computers</h3> |
---|
24 | |
---|
25 | <p>We were often in a situation when some data stored on a punched paper needed |
---|
26 | to be sent over long distances. Having Internet access and e-mail, that's no matter |
---|
27 | for todays computers, once you can read in paper tapes. The other way around, |
---|
28 | punching new or modified data on punched papers is also a frequent need in our daily |
---|
29 | business. <br/>Therefore we initiated the <b>Paper Tape Project</b>, having the |
---|
30 | pronounced goal to handle paper tapes with contemporary computers, that is, to |
---|
31 | read, change and write (punch) them.</p> |
---|
32 | <p>We use comparatively new punched paper devices that already feature a Centronics |
---|
33 | interface at TTL level. Unfortunately the devices (in detail: reader |
---|
34 | Ghilmetti FER 201, puncher FACIT 4070) didn't yet implement the Centronics |
---|
35 | common standard from the 1970s (officially standardized as IEEE-1284 not until 1994), |
---|
36 | therefore simply connecting those devices with a standard parallel port printer cable |
---|
37 | won't do the job.</p> |
---|
38 | |
---|
39 | <div class="desc-left"> |
---|
40 | <img src="/shared/photos/rechnertechnik/fer201.jpg" width="239" height="148" alt="Photography of the paper tape reader Ghilmetti FER 201" /> |
---|
41 | <p class="bildtext" style="width:239px;"><b>Ghilmetti FER 201</b> reader with framework for reading zig-zag tapes</p> |
---|
42 | </div> |
---|
43 | |
---|
44 | <p>The very first step was to read the manual carefully to assemble a specially wired |
---|
45 | cable to connect the punch card device with the parallel port of a PC (commonly known as |
---|
46 | "LPT port", a standard port on PC motherboards just a few years ago). Since the devices |
---|
47 | don't implement the standarized hand shake, the second step was to implement a suitable |
---|
48 | driver to emulate the right communication behaviour for the punch card devices.</p> |
---|
49 | |
---|
50 | <p>Development started on the free GNU/Linux Operating System where we used the ppdev |
---|
51 | framework of the Linux 2.6 kernel series to program a user space driver in the programming |
---|
52 | language C with a little effort compared to a real kernel space driver.</p> |
---|
53 | <div class="desc-right"> |
---|
54 | <img src="/shared/photos/rechnertechnik/facit4070.jpg" width="192" height="313" alt="Photography of the paper tape puncher FACIT 4070" /> |
---|
55 | <p class="bildtext" style="width:192px;">The legendary puncher <b>FACIT 4070</b></p> |
---|
56 | </div> |
---|
57 | <p>The parallel port consists of three 8-bit hardware registers: a bidirectional data |
---|
58 | register, a control register and a signal register. Since paper tapes are made of |
---|
59 | 8-bit words (octetts), we just connected these eight bits on the data register to save |
---|
60 | them directly to one byte in the computer. Using the control and signal pins, we could |
---|
61 | implement a interrupt (device cycle) driven communication, since the status register |
---|
62 | features one interrupt enabled bit (strobe). Our devices punch at 80 chars/sec and read in |
---|
63 | 250 chars/sec, so even older PCs can easily run the driver programs.<br> |
---|
64 | |
---|
65 | As already told, there's not really the question how to model punched papers on |
---|
66 | computers, since they use the same word length (8 bit) and computer files are |
---|
67 | conceptually the same as paper tapes: byte arrays. A 250 byte binary file therefore |
---|
68 | represents a 250 chars long punched paper. Thus processing punch card files |
---|
69 | with Unix command line tools or hex editors is very easy. To speed up the workflow, |
---|
70 | we wrote some simple perl scripts to label paper tapes. Afterwards we wrote a |
---|
71 | graphical editor, called "Paper Tape Editor", where binary files could be visualized |
---|
72 | and directly edited as paper tapes on the screen. This program was written in C, using |
---|
73 | the Gtk+ toolkit. After writing drivers for the Microsoft Windows Operating System, |
---|
74 | this program was extended to the "Paper Tape Suite" to read, edit, save and punch |
---|
75 | paper tapes graphically. That way every possible procedures with paper tapes can be |
---|
76 | performed with ordinary PCs.</p> |
---|
77 | |
---|
78 | <p>You can get further details with a lot of documentation material on the homepage of |
---|
79 | <a class="go" href="http://dev.technikum29.de/projects/wiki/PaperTapeProject" |
---|
80 | >The Paper Tape Project</a>. The source code was released as open source can be checked |
---|
81 | out from the <a |
---|
82 | href="http://dev.technikum29.de/projects/browser/paper-tape-project/trunk">technikum29.de |
---|
83 | subversion repository</a>.</p> |
---|
84 | |
---|
85 | <h3><a name="punchcard"></a>Reading punch cards with contemprary computers</h3> |
---|
86 | <p>There is an historical storage media that is even more important than paper tapes: |
---|
87 | Punch cards. They were the one of the pillars of early mass electronic data processing |
---|
88 | and were used for saving data and program executables. Based on the <i>Paper Tape Project</i>, |
---|
89 | we started the <i>Punch Card Project</i> with the similar target of reading, editing and |
---|
90 | punching punch cards.</p> |
---|
91 | |
---|
92 | <p>When connecting these small paper tape devices (shown above) directly to modern |
---|
93 | personal computers via the parallel port ("LPT"), we noticed they were too slow for |
---|
94 | communication. Having modern GHz powered high end computers, how's that possible? |
---|
95 | <br/>The real cause for this performance is the software and hardware design of |
---|
96 | contemporary personal computers. They are conceptually designed for processing huge |
---|
97 | amounts of data and high speed calculations, but no more for short latencies with I/O |
---|
98 | handling. Actually, all time-ciritcal parts in modern high speed communication |
---|
99 | protocols (like USB, Ethernet, Firewire, etc.) are implemented in hardware. Software, |
---|
100 | on the other side, features more and more abstraction levels, so there's no more |
---|
101 | real-time operation even at kernel space. |
---|
102 | <br/>There are real-time operating systems, indeed, but by using such an operating |
---|
103 | system, the computer would be dedicated to communicating to the device. This is not |
---|
104 | neccessary. There is a (not even young) branch of computers which perfectly match |
---|
105 | all the criteria mentioned: Low latency, fast I/O, fully deterministic. Microcontroller |
---|
106 | are these low cost processors, a single chip featuring a lot of peripheral equipment.</p> |
---|
107 | |
---|
108 | <div class="desc-left"> |
---|
109 | <img src="/shared/photos/rechnertechnik/documation-m200.jpg" width="300" height="215" alt="Photography of the Documation M200 pneumatically Punch Card Reader" /> |
---|
110 | <p class="bildtext" style="width:300px;"><b>Documation M200</b> card reader (this one implemented by WANG)</p> |
---|
111 | </div> |
---|
112 | <p>We are using an ATmega microcontroller made by Atmel AVR. Most of the 40 digital I/O |
---|
113 | pins are directly wired to the electrical Input/Output of the punch card device |
---|
114 | <i>Documation M200</i> (featuring a pneumatic card feed). On the other side of the small |
---|
115 | development board there is the RS232 port ("serial port"), communicating to the computer. |
---|
116 | This small board is actually so small that it fits right into the device's cabinet. |
---|
117 | Running with 8 MHz, the microcontroller is easily capable of hard real-time |
---|
118 | communication (300 cards/minute) and serving 4kB RAM, there is enough space for buffering |
---|
119 | a lot of punch cards until they can be sent to the virtually lazy computer via RS232. |
---|
120 | This is a quite old industry standard for serial data transportation, but since its very |
---|
121 | easy and robust, RS232 is quite perfect for such an interface. Using contemporary USB |
---|
122 | was no option since it's very complex and bulky (above all, there are cheap RS232-to-USB |
---|
123 | interfaces).</p> |
---|
124 | |
---|
125 | <p>We wrote a program for the microcontroller that implements the device driver to the |
---|
126 | punch card device. Now having an electrically specified interface to the computer (RS232), |
---|
127 | how should we communicate to the computer (automatically)? Furthermore, in which way |
---|
128 | should we represent a punch card with binary digits (zeros and ones)? |
---|
129 | <br/>While modeling 8 bit paper tapes into 8 bit bytes is trivial, a punch card, having |
---|
130 | 80 columns with 12 rows each, is much more complex. Therefore we wrote the |
---|
131 | <a href="http://dev.technikum29.de/projects/export/head/punch-card-project/trunk/protocols/documation-m200/protocol.htm" class="go">PC Documation M200 µC Serial Communication Protocol</a> that defines the |
---|
132 | way how computer and microcontroller shall communicate autonomously. It defines, that |
---|
133 | two punch card columns shall be packed into three octetts, each. This binary format has |
---|
134 | been proposed by the computer sciencist <a href="http://www.cs.uiowa.edu/~jones/">Douglas |
---|
135 | W. Jones</a>. |
---|
136 | <br/>For the computer side, we wrote the <i>Punch Card Editor</i>, a program that recieves |
---|
137 | the punch cards from the microcontroller (via the RS232 interface) and visualizes them in |
---|
138 | the graphical user interface. At this step, the text encodings (IBM H9 code, Bull Code) |
---|
139 | can be used to translate between binary punch card data and ASCII text. Thus card decks |
---|
140 | can be read in, modified and saved as files. Of course the comfortable program already |
---|
141 | has the interface for punching paper tapes, once we have selected a device and programmed |
---|
142 | some microcontroller for that job. At this point, there is also another benefit of this |
---|
143 | approach: The program runs on all modern platforms/operating systems (like Microsoft |
---|
144 | Windows, GNU/Linux, Apple OS X, etc. - there just needs to be some RS232 or USB connection).</p> |
---|
145 | |
---|
146 | <p>You can get further details with a lot of documentation material on the homepage of |
---|
147 | <a class="go" href="http://dev.technikum29.de/projects/wiki/PunchCardProject" |
---|
148 | >The Punch Card Project</a>. The source code was released as open source can be checked |
---|
149 | out from the <a |
---|
150 | href="http://dev.technikum29.de/projects/browser/punch-card-project/trunk">technikum29.de |
---|
151 | subversion repository</a>.</p> |
---|
152 | |
---|
153 | <!-- irgendwie schon sinnlos, auf ein deutsches PDF zu verlinken: |
---|
154 | <br/>We've published a german paper <a href="http://dev.technikum29.de/projects/wiki/Papers" |
---|
155 | >Lochkartenverarbeitung per Computer</a> (30 pages) |
---|
156 | with an analysis of the problem, modelling and implementation on both microcontroller |
---|
157 | and Computer (there won't be an english translation).</p> |
---|
158 | --> |
---|
159 | |
---|