Inferno #06
03 декабря 2004 |
|
Iron - Description of a block of memory from the printer Robotron CM 6329.01 M. Part 2.
About printer malfunction The printer does not respond to external data (excluding normal rarely missteps by pressing its buttons) and produces 3 "banning" of the signal: passive signal of choice - not ready printer to work, nevybor printer, or even its absence (obtaining this signal, the modern computer displays a message that there is no printer), an active busy signal - not ready to accept the information (automatically generated when nevybore, so everything here logical), the active error signal - or open the paper (if the sensor unlocked and the paper was previously), or taking an illegal instruction (code ESC), or mechanical failure - jammed feeder head (it is equipped with a stroboscopic detector). Interestingly, when foreign "not ready" and "error" the printer itself after the test and goes into standby mode "ONLINE", without giving an error signal. It turns out that CENTRONICS or produces the wrong data or wrong programmed by printer from the printer to malfunction. Of course, both events not unlikely, but there are other interesting facts. Speccy often uses a simplified protocol in parallel exchange for the LPT: besides the common wire (and its the same screen as if it a), of course, are 8-bit data bus, and only 2 of Governors Signal: STROBE to the printer, to send a byte of data, and BUSY from printer to record his employment, to suspend or stop printing. In practice, BUSY can not be used if data transfer is relatively slow (eg BASIC), then the printer will have time to unload your clipboard. According to statistics 90% of the standard dot matrix printers with LPT port, excellent work on the simplified scheme (a 80% slow, without BUSY), and of the remaining 10% of the additional 2% can be made to work without a change in the scheme, trickier software algorithms, although in this case there inappropriate moments (the program can start typing, even if printer not included), and must observe certain rules of with the printer. In fact, nearly all of the standard signals to LPT port Speccy is not even connected, and physically impossible to use. Tales From the above it is clear that the test of the printer computer system Speccy can get direct access to LPT by simplified algorithm, since almost all the signals the port "are ignored by hardware, signal unavailability (at fault printer) are simply not visible and can be printed, not paying attention to him (or rather, try to transfer data as if the printer is selected and fully functional, in spite of its signals). Although we make of it a busy signal, we can also ignore it (This is our business as we respond to external signals), because employment in some (very rare) printers can be denoted testing of graphics mode and receiving the data block for print (Probably, and going on my printer DAEWOO). So I did - try typing not paying attention, because the printer itself logically prepared to receive data after power - stood in the mode of "ONLINE". But nothing happened! For byte did not react, that inclines us to the fault interface, but I do not rule out hardware and software configuration, lock ... Rummaged in the instructions did not find anything forbidden in the position jumpers, checked the lock on the sensor open lid and found the sensor - a reed switch, allow sound jumper, but the printer does not works bytes BELL, and I heard nothing. Just in case, decided perevklyuchit button mode "ONLINE", and when you hear the signal. Repeated several times - when off. "ONLINE" heard the sound. My first thought: unlock bridge, and the printer is always beeping at these pressings (programmed). Again tried to pass code BELL, but the printer just in case molchal.Na again perenazhal "ONLINE" and to my surprise, the sound have not heard, but the printer with the paper advanced a little forward. At first thought it was a glitch printer, because I do not sound cut off, but then I remembered that I gave last code 10, ie, translate stroki.Neskolko by pressing "ONLINE", I was convinced that it works off the printer, and transferring BELL, by pressing the same button I heard a sound. It turns out an interesting thing: The printer produces prohibiting job signals that he is ready to work on input information does not react, but when you click "ONLINE" (And when you turn off this option) fulfills the last byte received (and as it turned out, stamps, if the character). This suggests at least partially by the interface because data and Gate (specifically tested the fixation of the next byte strobe) pass through it. Perhaps it is programmed incorrectly, if some level or control signals do not come out of the printer? To verify this was to transfer to the printer consistently Bytes 32 ... 255. Below are control codes, and it makes no sense them once more to touch, t.k.diapazonom 32 ... 63 5 LSBs, and so will provereny.Nelegkaya it was a venture, because after each byte is transmitted it had to "see" the printer, which pressed button "ONLINE", and after printing the symbol should have been pressed again "ONLINE" and send the next byte. The printer is correctly printed. Printed tables, I surprisingly discovered that she was essentially repeated, this suggests ignoring the 7-th (highest) bit, if it ever passed through interfeys.K addition, the passport symbol table was actually 7-bit. But perhaps this "Evil" phrase: the unused bits in the cliff and not affiliated with printerom.Togda can assume that the interface port is programmed incorrectly (7-bit can mean the necessary modes of operation) and he does not accept the data stream, but because of an erroneous mode transmits only the last (although this depends on the button which is not connected with the interface directly, the program queried separately, perhaps, the logic signals erroneously matches - but 3 matches highly unlikely). You can check this by using graphics mode. But in the statement was a warning about printers with 7 needles, it just drops the high bit - and do not check its passage (t.k.sisteme he did not need one). Were doubts about the inclusion of graphics mode. Normally the printer as it freezes, taking the entire set of image data, and then all at once their prints, but in our case, with such "violent" byte-castings, as if not bump into the system A printer error (such as: interruption of the flow of image data, output out of print mode on the button "ONLINE"). But all decided to experiment. I passed the inclusion of graphics mode (bytes 27,75,11,0) with Listing 11 bytes of graphics on the printer, as usual, did not react. Then he began to pass themselves graphic bytes (decided pass "ladder" - a serial search of all bits, and full line and at the beginning and end of an empty space, t.e.bayty 0,1,2,4,8,16,32, 64,128,255,0). Printer to print them, as always, one by one, except first and last zeros, normally worked graphics mode and came out of him (I sent the code for the sound check). But on a ladder, because of the dried paint, the points were very vague, and although all 8 were visible, I decided to play safe and give a further 7 graphics bytes in the same mode: bytes 27,75,7,0,0,% 01010101.0, 10101010.0%, 255.0 (symbol% denotes the entry in the binary form, then go% bits from older to younger). The result was that each needle printed by one, with an intermediate distance, and you print 4 needles from the bottom and then the other, counting from the top, and then all 8. Due to the distance between the print needles and shift bits of the press (and the distance between the positions of print) was clearly shows the imprint, and one could say - all 8 data bits caught in the printer, there is no break, and the interface to the data bus is not defective. Pleased that the printer is able to print it all: the text and graphics, but how to do it, upset, because almost every byte (Except managers) simulated a few seconds, and print would solve only a big fan or "tourists" out of interest "Not just buttons ponazhimat. Of course, quite possible to gather a small shemku that after taking the byte "clicks" a button, but it should push it again only after working the current byte, and the time of processing depends on the byte, and from the print position, you can enter the standard delay, but 5 seconds per byte (If not more) - not too impressive speed. Disassemble the printer is not wanted (ROM is not excluded), and the interface checked three times - all connections are normal. It remains only to analyze and predpolagat.Itak, for example, the interface is faulty and gives false signals, and the printer is ready to print, but due to the failure not receiving data. Then there are the options: fault only the main chip interface (presumably, this is not only I / O port, but the shaper signal interruption); More and more defective chips (through which the signals pass to a computer). I must say at that moment I was not sure that the printer has a Z80, but the analogy signals clearly seen. If you look at the circuit interface CENTRONICS, it is evident that through the auxiliary circuit is only an exchange of signals (Signals, taken from the main chip and past shallow logic back into the main chip is not returned). This means that the failure of simple chips will not change the logic of the byte general way, in addition the fact that any byte will be transmitted or not, and passed with an error either true (despite what the logic elements will be denied), t.e.printer software can not "know", "check" and "use" in their work that other interface circuits are faulty. He takes data from the main chip, and only it can control. A Here are the data received is not true (because of malfunction of the shallow logic), he sees, but decides for the correct data. Now we shall understand these might be "incorrect" data (we assume that just because their system is not working as it should). There 4 signals and data bus. STROBE signal and SM are fully on the basis of published experiments (gate goes to only one leg of the main chip, and hence exactly comes inside - in the the main chip - it can not work properly, but this is not a malfunction "walk-through circuits"). The remaining 3 signals in question as my system in general are not issued and hang (default) inactive state. But all of these signals, whatever they are (at fault "walk-through" mikruh) in the main chip is not received, we can block the bridges and the printer will not respond to them, ie, the state has no meaning (simplified protocol). Well, with the output (the printer) signals much simpler: having passed "checkpoints" mikruhi, a printer, they do not come back, and he "still" that with them, but I just ignore their condition, giving data on printer as if it were fully functional. Hence the conclusion: even If all other Defective mikruhi interface and, therefore, give false signals, the printer must print normally received data t.k.shina data and strobe are working, and other signals Printer does not see, and ignores the other on the basis of jumpers. But once he did not prints, we can assume: faulty chip main interface or the printer itself is defective. Now consider the alleged logic of the printer, as well as the reception and testing of bayt.Itak, turn on the printer. Interface port programmed, and part of its "external" inputs runs on input (Data bus and 3 control signals), as part of the withdrawal, except He is programmed to logic "capture" of bytes and the formation of Interrupt on any event - which actually is reception of the next byte. This assumption is based on the signals arriving at interfeys.Analogichno is programming the internal printer ports, responsible for the display / speaker (O), buttons / jumpers (input), engines and needle (pin), but with its own logic of work (compared with the interface CENTRONICS). As a rule, such systems often use interrupts. Interrupt - this is a reaction to an external processor signal.Pri performing basic tasks the processor can receive an interrupt signal (There is a special entrance) and interrupt the main program (Certainly not in the middle of the team, and between them), go to the program interrupt handling, and after the return from it and continue to perform basic tasks. There are different modes and different interrupt how they obrabotki.Po special team interrupts can be disabled, and the processor will not pay attention to them (to distract from the main task), the other team can resolve them. In Depending on the mode, interrupt signals may lead to the implementation of various actions in the program. With them, perhaps a multi-(almost parallel) execution. It is only logical to use an interrupt in this printer. The logic of action printer is approximately as follows: test the memory and mechanism (if that is defective, given the error signal and the system hangs) after checking the key, and if any of them pressed, it is system testing, to check on keys to stop him, or programmable ports scanned key jumper, and given the display, as well as going working out the changes on the buttons / jumpers, t.e.protsessor turns to the core problem - the handling of its input interface (keyboard and jumpers). It is logical, because not known when exactly the user will transmit data for printing, and there is no sense in vain to check the interface to unknown data (including interference connection). When the interface comes bytes transferred (ie, not just received some new information, but also sampled - that it is received), the port stores it in its register (It is a fact based on the tests) and forms a signal (confirmation of the byte) of the transmitting device and activates busy signal (after all, bytes, even though he entered, but not yet processed). However, the port generates an interrupt processor. Processor (if not too busy with higher priority) drew attention to this fact and proceeds to interrupt processing routine, which first checks the jumper settings and system variables, and on this basis takes the byte, putting it in buffer, and can, once processing, and then removes the busy signal (to an external device can send the next byte) and out of the interrupt handler, returning to the main problem. The reliability of such actions is very high, at least, the fact of using interrupts. Later, inspired by a relatively simple repair such printer, I made out that, properly inspected, cleaned, alcohol and checked. Interestingly, when the outer dust Printer board was almost in perfect condition (it was a weak blue plaque next to the connector interface, blackened by the flying feet of one resistor, slightly oxidized one fuse, but still serviceable, and like all specialties). In general, the "repair" has given nothing, everything was in order, and the printer then does not become work better. That's when I found 2 more similar to the port (as in the interface) and 2 other specialized chip, which, presumably, are programmable timers - breakers and can generate signals for DMA mode and multi-tasking interrupt for working press, including time slots for the mechanism. But to say exactly what these chips can not, t.k.nikakoy documentation to them I do not have, it is clear only that they use the above signals and is likely to have contact with the microprocessor Z80 (microprocessor in one package). But in our country as we know, Z80 secretly brought, on the other did not think (there were not needed), ie they are not well known. The result: the scheme nalazilsya, natestilsya ... In fact, fully confirmed his theory of using interrupts. Almost all of the interface signals, with the same name, go to the Z80, and come (no breaks). Thus, the theory of fault next (possible fault simple chip interface for the statistics will not exclude, but Even in this case they are not alone to blame, and not primarily Although almost certain that they work): Failure of the main chip Interface; fault similar chip printer chip fault of another printer other malfunction of the system as Total (detail, including small chips, memory unit, and also the processor - in short, no rule - a kind of TOTAL case), the fault memory (almost exclusively the loss of some data - a lot and do not need a little, but aptly ...). How to transfer is not a priority! You should also remember the past this printer, and exactly what he originally was not defined as working (though the test is always held) t.e.nelzya exclude failure from the outset - a marriage (I'll take it to the GENERAL case). But I would prefer it to be defective or faulty memory. Although it is easier: to resolder a small chip or reflash Rom? The first is easier, but if the chip is not small, then get one where it - Nothing is known about him, do not simulate - just me! In favor of the main chip interface CENTRONICS says his ability to capture and transmit data byte to the processor, and as a reaction to most of the input signals from the printer (although not all of them can be checked). Consider these signals. Addresses A0 and A1, input is the choice of port registers - half of their options fully operable, because and allows programming port (albeit incorrectly), and read from it accept information, but there is a dark place in the options of access to registers port. A6 to the input CS; had he not been working with the Port nothing to read. The signal RD - it was he who reads the incoming bytes, without nikak.Signal IORQ responsible for access to the port (as opposed to memory) and duplicates the signal of CS (allowing you to control the choice of ports in different locations, without the CS would have to mix the two Signal shallow logic, and serve as a signal IORQ choice), and hence input rabotaet.Signal CP works too, t.k.blagodarya input clock frequency and is an autonomous capture of incoming bytes, the signal STROBE. Remain the two dark horses: M1 and the IEO. M1 has (in this case) to reset signal INT, the processor does not react to it twice (the processor, receiving INT, did not immediately react, but INT mozho reset only when the react, or processor that INT miss), to confirm their response processor generates combination IORQ and M1, which recognizes the port, dropping INT). The idea is that this entry should be defective, because participates in After the formation of the interrupt, but his passive state allocated a combination of entries in the port (by process of elimination, WR t.k.signal the port is not supplied), and if the record does not work as expected, the port is either not zaprogrammiruesh, or you can do it wrong (both options are extremely improbable - although the fact : port is programmable, but the effect is not true), and another thing, which is not decoding the signal M1 (at fault chip port) can constantly reset INT so that the processor did not notice (too short INT). IEO signal comes, of course, if its level corresponds to a resolution granting termination, you may need not simple level, and the momentum is IEO in question, as well as similar chip in the printer, with which here comes IEO (perhaps wrongly). Actually, by studying the circuit can be very significantly to declare: no printing, t.k.ego processor is not interrupted. This was confirmed by a eksperiment.Poskolku during the CENTRONICS interface is located inside the printer can not verify the acting in the signals. I dismantled the interface and brought two Posting: signals INT (comes with chips) and IEO (comes on a chip). During the tests, I gave the bytes to the printer and took it for these signals. It turned out that the transfer byte status signal is absolutely no change, but when you click "ONLINE" chip generates INT, and B worked through the printer (this can be seen in the weak change in signal voltage, short pulse t.k.zafiksirovat tester is impossible). Another signal is also changed, with one these changes more evident, and the other just barely (can not remember any how, but the fact that they vary). This completely confirms my the theory of using interrupts in this case. Everything is logical: if Pressing formed an interrupt and the processor draws the attention of the incoming bytes. Rather it is logical only recently, but relationship pressing with the emergence of the interrupt signal, the chip interface - a very strange fact. In this case, INT button can be produced for two reasons: 1. the chip enters signal from the printer indicating the interrupt enable, and chip fulfills pulse interrupt 2. exit from the regime of "ONLINE" CPU accesses to the port interface to program it, because the printer does not have to take the bytes outside the regime "ONLINE", and thus generates INT. Note that in any event, this event is bizarre - print byte on exit from the print mode. Of course, we remember that the majority of printers, taking line of text, do not move, and the imprint it, only by adopting the code newline or carriage return code that appraises as adopted by the end of the line or string is printed at withdrawal from the "ONLINE" (as many bytes as the unit has managed to take), though perhaps it happens in the new entrance to the regime "ONLINE" (as after filling the paper if it's over, and the text nedopechatan). From this position it is possible (though questionable) say that our printer tries to print a line that he did not passed and adopted at the same time last byte in the register zafiksirovany port - that he still can. It turns out that the chip interface CENTRONICS at least partially defective because even generates an interrupt, but not always, when it should be. Of course, there remains the likelihood of its partial failure, and failure of such a chip in the printer itself, with which this signal goes IEO, as well as others who form such a signal initially. It can be assumed, and such malfunction: the inner port can not completely see the condition of bridges. Those that block the unused interface signals are not checked and the printer thinks there is no lock, and waits for the appropriate signals to the computer. But this contradicts the fact that the necessary signals received from a modern computer and did not yield results, as well as the fact that since entry is blocked (due to lack of signals), what then ... are printing at least one byte from the input, let and last ... All this suggests a false programmed port (not excluding his fault), because of what the printer is not working as it should. Given the total number of ports - their 5, is not enough any program when you switch to there were surprises. Although the two are mostly programmed true, otherwise the motion mechanism as well as display, keyboard and a jumper, normally would not be controlled. Another fact, equally telling, and the incorrect programming interface, and possible about his failure, concluded that the port not only does not generate an interrupt signal (which may be a hardware reason - not received the proper signal from the printer IEO), but gives false information that somehow come with a normal data bus. Question: where they come from? Or they are distorted in most ports because of its failure, or true programmable port - that is, wrong. It can be assumed and then the firmware is not suitable for this interface - interface specified IFSP, and we CENTRONICS, and therefore the port comes incorrect information (for another interface, it is true). Generally, this is strange, because the interface itself - separate, removable module that connects to a standard signal, and a general method of data exchange is used for all models of interfaces, but they can be programmed, of course, in different ways, despite what the logic of the transfer, but once a removable module, then by necessity it can be replaced (no matter what insert the plug), and print from another source, a different protocol. The idea is that when such simple replacement should not get into the printer and change proshivku.Proshivka itself must determine the type of interface (once it is provided with jumpers) because of the socket interface a lot of empty contacts, which can be used for auto-configuration of the plug. However, if we compare the interface circuits, then both Other contacts are not used, and thus autoconfiguration impossible, but initialization of the ports - a survey immediately after their inclusion - will give different results in different interfaces, allowing to distinguish them. True, it can be assumed that such a convenient - autoconfiguration - the firmware just is not enough space, or information, or simplified. Otherwise, get silly: the interface must be changed together with the firmware, so casually, and a table with Cyrillic change possible, or barter ... Take the scheme both interfaces and checks on the basis of logic of signals for data transmission and pertinence of the bits of the port. Conclusion: yes, very much like the truth. If our program CENTRONICS a willingness to accept data protocol IFSP, then the port generates the signal nevybora (in the IFSP is just readiness), and the error signal from CENTRONICS again normal - "Infallible" - for the IFSP. About the busy tone: it is not cleared because the programs the output port of discharge of employment as input (for IFSP), and a passive one input to zero, of course, not become. In this case, the bytes are not accepted, because all control bits do not enter the port (these inputs are connected to the inputs shallow logic, which themselves are waiting for a signal from the port, and eventually such "Mnogovhodnye" points scheme hangs in the passive one (the level is not TTL input connected - a unit, but it is sensitive to interference). In general, it seems that blame for firmware and program the printer as our CENTRONICS IFSP, and therefore it does not work properly. At issue is that the printer can not print one (last) bytes. This can be explained as interference in the free entry (as if not connected, according to our theory with the firmware) causing false positive combination of control signals and yet what a system failure or incorrect programming features of the port, its distinctive logic work at the same time. The processor is clearly defective, t.k.delaet their business. Of course, not to exclude it, but too well the state board and the conditions of his operation. In my experience, no one has not yet dead, although there were circuit outputs. They say someone burned, but such trials, which this printer, and never dreamed of. Of course, poor programming and erasing may ROM, because then the program will execute in favor of neverno.V This version also has some say, is very rare crashes Printer - because something is behind them, may, of course, stagnation mechanism, or a bad contact when connecting interface, but nothing can be ruled out, including damage to the firmware ROM. Take, for Had my printer. Initially refused to feed back (although mechanically All right, and no matter where spinning). Then came the crashes in state lines, and then began to fall apart when you turn on the initialization, in the end he either did not become tested, no mechanism "Going crazy". I was hoping that it's not ROM was a scheme climb that could have - checked, but the big chips you can not just check the tester, because the state of their signals can be programmed incorrectly and should either operand to 100% logic test ROM, which I certainly do not, either implicitly trust the contents of the firmware, and, among other things, completely aware of its logic (to know what chips are programmed when and how, and under This check them). As a result of that story, I found reference data on the ROM K573RF8 (32 kilobytes) and found that it keeps all only 25 thousand hours, and switched off and switched on, well, even 3 years, and has been almost 7 years - closed to 2 terms. Then I print the contents of this ROM and got rid of the file on disk.Ot program, of course, much remains, but there was so much every bullshit that of normal logic operation can not say (I disassemble the code). Swap the bytes have been completely erased, and towards the end of memory loss that vozrastali.Seychas printer lies in the closet, being completely intact, and there is no firmware him. Although the assembler is available to me, I do not know all the features of the programming mechanism, so you can spend a lot of time wasted, even having a chance to damage the very mechanics of the test. In Overall, I would like to get a normal ROM with the firmware, and even for 100 rubles (although the printer I got for 200, and the money is not sorry something I'm still typing on it), but so far there is no place on the internet yet have not tried to watch, although the chances very high. But in general, willing personally take (within the Ryazan) to someone who will be able to use for other purposes. Just a pity to throw the system. Someday I will gather the programmer and try to revive ... There is another interesting fakt.V my comp without sockets soldered ROM K573RF5. It's almost "analogue in our case." Her and the volume same pinout and like p ^ 2, differ only in electrical parameters (polyphagia). In particular, the storage of information it is the same - 12 years, but when engaged, not 3, and 6 years (twice in p ^ 2). But if we recall how I drove my Speccy, including around the clock, then my computer worked 2 years continuously (if not more) that reduces the total time Holds up to 8 years and years have passed, 11 t.e.uzhe 3 years as the data can Stretham. However, the tests (there are special programs with the checksum) is still talking about repair. But even if this Chip erased (I can not ask - desoldering the need and the quality of mounting such that the track just pootletayut), I do not hurt. Of course, the standard BASIC print functions will work badly - buggy, but I do not use them, and it does not use a modern program, everywhere has its own driver. Perhaps that is why Rom as it is turned off (the CPU to it becomes very rare), and this increases the storage time, but the term must have already passed, and for about 10 years although the information least partly spoiled. In favor of serviceability ROM of the printer is the fact that to test all the characters are printed normally, and their image data loss is not visible. But what are the characters? Only ten part of the ROM, and is it in a separate chip, possibly sewn later, and, accordingly, with a large reserve storage time. In addition, the "Operating System Printer" in the work performed constantly all the time until the printer simply switched on and the characters extracted only when you print, ie rarely used. Therefore, storing their chip is in "poluspyaschem" condition, and the data in it lost less kept longer ... We arrive at the fact that before actual repairs - analysis of the chip the printer, it is necessary to ensure proper operation of its ROM (correctness of data stored there), through an experiment with it replacement, and if ROM in order to puzzle over the printer itself (it is possible, comparing a working original). In practice, the repair of many Speccy, I've often suspected loss of data in their main memory (27C512 to import 64 KB) but not once it was not confirmed! In fact I have no background Data on these chips. A fault was in the prime prichinah.Prichem I have heard that these chips are very robust and in fact not "erased" by themselves. But statistics can not exclude it, because mikruha erasable. And only a year ago, my suspicions about one such import mikruhi confirmed, but only by replacing, and as it turned out, her last barely flashed (it was partly to marriage). [Ed.: I had 2 of these cases. ] So I'm inclined to believe the wrong programming interface CENTRONICS - due to internal fault or data loss (or their incompatibility) in ROM. At least 50% interface working properly (50% sure it completely). File is created in the editor ACE0.85, in Pentagon system 128, the latest edition of the file on Aug. 24, 2004. KSA-7G
Other articles:
Similar articles:
В этот день... 21 November