TYPEWRITER

Abstract: There is provided a typewriter with which the margins and tab positions are electronically set by using a memory. A photosensor (88) is attached to a carriage (82) of the typewriter. The typewriter has a plurality of position indica­ tors (20, 22, 24, 26) which may be moved in the same direc­ tion as the carriage (82) to desired positions. The indicators protrude from the housing of the typewriter through a hori­ zontal slits and can thus be seen by the typist. Their respec­ tive positions may be detected by the photosensor (88). The carriage is automatically moved once over the longest dis­ tance it can move, each time the power supply switch of the typewriter is closed. As the carriage is moved over this distance, the positions of the indicators are written into a memory in response to the output signal from the photosen­ sor.

Description: Typewriter The present invention relates to a typewriter, and more particularly to the technique of setting margins and tab positions. All typewriters have a margin setting mechanism which sets both the left and right margins of paper. Once the mechanism sets both margins, the carriage of the typewriter cannot move but between these margins. Almost every typewriter has a tabulation mechanism which facilitates the typing of tables. Once several tab positions are set, the carriage of the typewriter is moved to the nearest right tab position every time a tabulation key is depressed. In other words, when the tabulation key is depressed, the carriage will be moved to the leftmost printing position of each column of a table. In recent years, electronic typewriters, which have a memory for storing text data entered by the keyboard have been put to practical use. With any typewriter of this type, the left and right margins and the tab positions are set by storing data representing them into the memory. More specifically, the space key is depressed to move the carriage to a desired position. When the carriage reaches this position, the typist depresses a margin setting key or a tabulation setting key. A carriage position signal is stored into the memory as a margin signal or a tab position signal. Once such margin signals and tab position signals have been written into the memory, the typist can no longer recognize the margins or tab positions which have been set. Besides, these data, i.e., the margin signals and tab position signals, will be erased when the power supply switch of the typewriter is turned off. To retain the data even after the switch is turned off, the typewriter must be provided with a CMOS memory and a battery for this CMOS memory. The use of a CMOS memory and a battery will of course raise the cost of the typewriter. The object of the present invention is to provide a typewriter with which margins and tub positions can easily be set and displayed and which can still be manufactured at low cost. Basically, the present invention provides a typewriter which comprises a keyboard having a plurality of keys for generating a key signal in accordance with a key depressed, a memory for storing a key signal generated from the keyboard, a printing mechanism having a carriage with a printing head movable in one direction for printing a character according to a signal from the keyboard and/or the memory, a position indicator movable in the same direction as the carriage, a detector provided at the carriage or the position indicator, or both, for detecting that the carriage reaches the position indicated by the position indicator, and a position setting circuit for moving the carriage in the direction upon every supply of power to the typewriter and for storing data representing the position of the position indicator into the memory in response to an output from the detector. This invention can be more fully understood from the following detailed description when taken in conjunction with the accompanying drawings, in which: Fig. 1 is a perspective view of a typewriter of an embodiment according to the present invention; Fig. 2 is a plan view of a keyboard of the typewriter shown in Fig. 1; Fig. 3 is a schematical diagram showing an internal structure of the typewriter of Fig. 1; Fig. 4 shows a photosensor which is used in the typewriter shown in Fig. 3; Fig. 5 is a circuit diagram of a control circuit used in the typewriter of Fig. 1; Fig. 6 shows a data format of a memory provided in the control circuit of Fig. 5; and Fig. 7A and Fig. 7B are flowcharts illustrating the operation of the typewriter of Fig. 1. A typewriter according to one embodiment of the present invention will now be described with reference to the accompanying drawings. Fig. 1 is a perspective view of the typewriter. In the front portion of a housing 10 there are provided a keyboard 12 and two pitch scales 14. The keyboard 12 includes character keys and various function keys which are arranged in a specified manner. One of the pitch scales 14 has a graduation of 10 characters per inch, and the other pitch scale 14 has a graduation of 12 characters per inch. These scales 14 extend parallel to each other and set apart from each other. A long, narrow window is provided between the pitch scales 14. Through this window a cursor 16 indicating the position of a carriage is seen. The housing 10 has a horizontal slit 18 extending along the pitch scales 14. Four position indicators 20, 22, 24 and 26 are slidably disposed'in this slit 18. These indicators 20, 22, 24 and 26 are moved by a typist to desired positions, thereby set margins and tab positions. The leftmost position indicator 20 and the rightmost position indicator 26 are used to set the left and right margins, respectively. The other position indicators 22 and 24 are used to set tab positions. Position indicators other than these indicators 22 and 24 may be provided to set other tab positions. A pair of platen knobs 28 protrude from the left and right sides of the housing 10, respectively. Fig. 2 is a plan view of the keyboard 12. Character keys 30 are arranged at the central portion of the keyboard 12. Function keys are arranged as follows. A margin release.key 32, a margin/tab set key 34, a paper feed key 36, a repeat key 38, a tabulation key 40, a shift lock key 42 and a shift key 44 are arranged at the left end portion of the keyboard 12. A space bar 46 is provided along the lowest row of character keys 30. A back space key 48, a correction key 50, an express key 52, a carriage return key 54, a shift key 56 and a half back space key 58 are arranged at the right end portion of the keyboard 12. On the right side of the keyboard 12 there are a printing pitch select switch 60, a character select switch 62, a printing pressure select switch 64, an error lamp 66 and a power lamp 68. Fig. 3 is a schematic view of the structure disposed within the housing 10. Between a left frame 70 and a right frame 72, a platen 74 and two shafts 76, 78 extend parallel to one another. A carriage 82 with a printing head 80 is movably mounted on the shaft 76. The carriage 82 is moved along the shaft 76 when it is pulled by a loop of wire 86 the part of which is wound around a motor 84. A photosensor 88 is mounted on that side of the carriage 82 which faces the shaft 78. This photosensor 88 is a photocoupler which consists of a light emitting diode 90 and a phototransistor 92. The diode 90 and phototransistor 92 are arranged face-to-face as shown in Fig. 4. The aforementioned position indicators 20, 22, 24 and 26 are slidably and detachably mounted on the shaft 78. A portion 20a of the indicator 20, a portion 22a of the indicator 22, a portion 24a of the indicator 24 and a portion 26a of the indicator 26 protrude toward the carriage 82. These portions 20aZ 22a, 24a and 26a of the position indicators 20, 22, 24 and 26 cut the optical path between the light emitting diode 90 and phototransistor 92 of the photosensor 88 when the carriage 82 moves to face the respective position indicators 20, 22, 24 and 26. A home position detector 94 is fixed close to the left end portion of the shaft 76. This detector 94 determines the home position of the carriage 82. It is a switch which is closed every time the carriage 82 abuts against it. The output of the photosensor 88 and that of the home position detector 94 are coupled to a control circuit 96. The output of the control circuit 96 is connected to the printing head 80 and the motor 84. The printing head 80 and the motor 84 may thus be controlled by an output signal from the control circuit 96. Fig. 5 is a circuit diagram of the control circuit 96. The circuit 96 has a CPU (central processing unit) 100. It further includes a ROM (read-only memory) 102, a RAM (random-access memory) 104, a keyboard controller 106 and an I/O (input/output) port 108 which are connected to the CPU 100 by a data btis line 110, an address bus line 112 and a control line 114. The CPU 100 controls the RAM 104, keyboard controller 106 and I/O port 108 according to the program data stored in the ROM 102. The keyboard 12 is electrically connected to the keyboard controller 106. A motor controller 116, a printing controller 118 and amplifiers 120, 122 are connected to the I/O port 108. The motor controller 116 controls the motor 84, thus controlling the carriage 82. The printing controller 118 controls the printing head 80, thus controlling the printing being achieved by the head 80. The output of the home position detector 94 is coupled to the I/O port 108 through the amplifier 120. Thevoutput of the photosensor 88 is also connected to the I/O port 108 through the amplifier 122. The RAM 104 stores not only text data to print, but also carriage control data such as left margin data LM, right margin data RM, carriage position count data CPC, sensor count data SC and tab position data TAB1-TABs, as illustrated in Fig. 6. Referring to Figs. 7A and 7B, both being flowcharts of the CPU 100, it will be described how to set margins and tab positions. First, the position indicators 20, 22, 24 and 25 are moved in the slit 18 of the housing 10 to desired margin positions and desired tab positions. Any of these indicators, if not used, is moved to the right end of the slit 18 or detached from the shaft 78. The carriage 82 is stopped at its rightmost position which is a few centimeters left of the right end of slit 18. When the power switch is closed, the margins and tab positions will be automatically set in the following manner. In step 205, the carriage 82 is moved to the left until it abuts on the home position detector 94. In other words, the carriage 82 stops when the detector 94 detects the home position of the carriage 82 in step 210. Then, in step 215, the RAM 104is cleared of the carriage control data, i.e., the left margin data LM, right margin data RM, carriage position data CPC, sensor data SC and tab position data TAB1-TAB8. The setting of margins and tab positions depends on the printing pitch selected by operating the printing pitch select switch 60. Therefore, in step 220 the question is asked whether or not the pitch of 10 characters per inch has' been selected. If the answer is NO, the 12 character/inch pitch routine 225 will be exectued as will be described later in detail. On the other hand, if the answer is YES, it will then be determined in step 230 whether or not the photosensor 88 is turned off, that is, whether or not the carriage 82 is at the same position as any position indicator, where the optical path of the photosensor 88 is cut. Here, let us assume that the pitch of 10 characters per inch has been selected. If the answer to the question posed in step 230 is NO, that is, if the carriage 82 is not at any position indicator and the photosensor 88 is on, the carriage 82 will be moved in step 235 one pitch, i.e., 1/10 inch, to the right. Then, in step 240, the carriage position count data CPC will be incremented by 1. That is, the data CPC represents the position of the carriage 82. Accordingly, the data CPC will represent no position further right beyond the abovementioned rightmost position of the carriage 82. Let us assume that the data CPC indicates this rightmost position when its value is 115. In step 245, the question is asked whether or not the data CPC has reached this maximum value, i.e., 115. If the answer is NO, step 230 is repeated. When the answer to the question posed in step 230 is YES, that is, when the carriage 82 is at any position indicator and the photosensor 88 is thus off, it will then be determined in step 250 whether or not this indicator indicates a left margin position. Since the carriage 82 is moved from the left to the right, the leftThost position indicator indicates the left margin. As will be described later, the sensor count data SC is incremented by 1 when every margin or tab position is written into the RAM 104. Hence, if the data SC is 0, it represents that the indicator indicates the left margin. Otherwise, the data SC represents that the indicator indicates a tab position. In step 250, it is determined whether or not the data'SC is 0. If the answer is YES, the CPC data is written into the RAM 104 as the left margin data LM in step 255. On the other hand, if the answer to the question posed in step 250 is NO, the CPC data is written into the RAM 104 as a tab position data. Each of the tab positions is identified by the sensor count data SC. Since the tab positions are indicated by the second leftmost position indicator et seq., the CPC data is written as the SC-th tab position data TABSC. Step 255 or step 260 is followed by step 265. In step 265, the sensor count data SC is incremented by 1. The process then goes to step 235. In this way, every time the photosensor 88 is turned off while the carriage 82 is moving to the right, pitch by pitch, the data representing the position of the carriage 82 is written into the RAM 104 as margin or tab position data. Once the carriage 82 reaches the rightmost position, it can no longer move to the right. Then, in step 270 it is determined whether or not the sensor count data SC is 0. If the answer to the question is YES, it means that neither a left margin position nor a tab position has been set. In this case, the rightmost position of the carriage 82 is written into the RAM 104 as the right margin data in step 275, and the home position (CPC = 0) is regarded as the left margin. On the other hand, if the answer in step 270 is NO, it is then determined in step 280 whether or not data SC is 1. If the answer to this question is YES, it means that only the left margin has'been set. In this case, too, the rightmost position of the carriage 82 is written into the RAM 104 as the right margin data in step 275. If the answer to the question asked in step 280 is NO, i.e., if data SC is more than 1, the rightmost tab position data TMSC-l is written into the RAM 104 as the right margin data RM. Then in steps 290, 295 and 300, the carriage 82 is moved back to the left margin, pitch by pitch, whereby the setting of margins and tab positions is completed. Thereafter, the typist may enter any text data. The above operations are also performed when the margin/tab set key 34 is depressed. Therefore, during typing operation, the margins and tab positions may be changed and then set merely by moving the position indicators 20, 22, 24 ad 26 and then by pushing the margin/tab set key 34. The 12 character/inch pitch routine 225 is essentially the same as the 10 character/inch pitch routine described above. In other words, the routine 225 consists of step 230 through step 300 which are shown in Figs. 7A and 7B. In this case, the longest distance that the carriage 82 may move and that is defined in step 245 is 138 printing pitches, not 115 printing pitches. With the embodiment described above it is sufficient to move the position indicators 20, 22, 24 and 26 along the pitch scales 14 to desired positions to thereby set the margins and tab positions. In addition, the typist can recongize the margins and tab positions thus set, merely by seeing the indicators 20, 22, 24 and 26 and the pitch scales 14. Furthermore, since the margins and tab positions are automatically set when the power-on switch is closed, it is unnecessary to retain the margin position data or the tab position data after the power-on switch is opened. Therefore, the typewriter need not be provided with a memory for retaining these data and may be manufactured at lower cost than otherwise. In the embodiment described above, the arrival of the carriage 82 at any position indicator is detected when the indicator cuts the optical path of the photosensor 88 attached to the carriage 82. The detection of carriage position is not limited to this embodiment and various modifications may be used. A plurality of such photosensors 88 may be attached to the respective position indicators 20, 22, 24 and 26.

Claims: Claims: 1. A typewriter comprising: a keyboard (12) having a plurality of keys for generating a key signal in accordance with the key depressed; memory means (104) for storing a key signal generated from the keyboard (12); printing means having a carriage (82) with a printing head (80) movable in one direction for printing a character according to a signal from the keyboard (12) and/or the memory means (104); position indicating means (20, 22, 24, 26) movable in the same direction as the carriage (82); characterized by further comprising: detector means (88) provided at least one of the carriage (82) and position indicating means (20, 22, 24, 26) for detecting the the carriage (82) reaches the position indicated by the position indicating means (20, 22, 24, 26); and position setting means (100) for moving the carriage (82) in said direction upon every supply of power to the typewriter and for storing data representing the position of the position indicating means (20, 22, 24, 26) into the memory means (104) in response to an output from the detector means (88). 2. A typewriter according to claim 1, characterized in that said position setting means (100) also operates in response to a predetermined key signal from said keyboard. 3. sA typewriter according to claim 1, characterized in that said detector means (88) is a photocoupler attached to said carriage (82) for producing an output signal when its optical path is cut by said position indicating means (20, 22, 24, 26). 4. A typewriter according to claim 1, characterized in that said position indicating means (20, 22, 24, 26) consists of a plurality of position indicators for indicating left margin position, right margin position and tab positions, a portion of each position indicator protruding from a housing of the typewriter. 5. A typewriter according to claim 1, characterized in that said memory, means (104) is a volatile memory.

Inventors: NAGAI, JUNSHIRO, SHIMATANI, SABURO
Applicants: TOKYO ELECTRIC CO., LTD.
Application year: 1983
Main classification: B41J21
IPC codes: B41J29, B41J21