Data communication apparatus using memory means for error detection

Abstract: The present invention relates to a data communication apparatus having an error correction communication mode in half duplex operation and method. The data communication apparatus has a memory for storing a received data, and means which detects an overflow in the memory and presence of an error in the received data and requests re-sending in accordance with this detection result.

Description: BACKGROUND OF THE INVENTION Field of the Invention The present invention relates to a data communication apparatus having an error correcting communication function. Error correcting communication in full-duplex operation and error correcting communication in the half-duplex operation are known. Especially in error correcting communication in half-duplex operation, in order to hold data sufficient to sequentially execute a communication sequence of data (picture signal) and an error correcting sequence, it is necessary to have a substantial fixed memory capacity. An error correction mode (ECM) specified in CCITT, for example, should have a memory with a memory capacity of 64 K bytes or more. In a general data communication apparatus having a memory for storing data, it is normal to perform memory sending or memory reception of data. If 64 K bytes has to be reserved for ECM, for example, then the memory as a whole cannot be utilized efficiently. If, however, the capacity of the unused memory is less than 64 K bytes, there is the problem that communications using ECM cannot be made. Concerning re-sending data due to an error, U.S. Patents Nos. 4,829,524 and 4,885,755 have been used. However, the above problem concerning efficient utilisation of memory has not yet been solved. Accordingly it is a concern of the present invention to make error correcting communication executable using a small capacity memory. It is also a concern of the present invention to efficiently utilize memory for storing data, and to make error correcting communication executable even if the available memory is less than the memory capacity required for a normal error correcting communication. US Patent Specification No. 4,841,550 discloses a communication device which enables two terminals to communicate with one another even though there is a frequency or phase difference between the clocks of the two terminals. However this prior specification is not concerned with error correction and accordingly cannot provide a solution to the problem already discussed. French Patent Application FR-A-2635627 discloses a facsimile apparatus with ECM mode correction having two memories which are used cyclically. In accordance with the present invention there is provided data communication apparatus as set out in claim 1 and a method as set out in claim 4. The present invention will now be described by way of example and with reference to the following drawings, in which: Fig. 1 is a block diagram showing the basic configuration of a facsimile apparatus according to an embodiment of the present invention. Figs. 2, 3 and 4 are flow charts showing a control operation of a CPU 8 according to an embodiment of the present invention. Figs. 5 and 6 are views showing examples of an area for ECM of an image memory 11. The present invention will hereafter be described in detail with respect to embodiments thereof shown in the drawings. Although a facsimile apparatus, which communicates image data using ECM, will be described as an example in the following embodiments, the present invention is not limited to ECM, nor to a facsimile apparatus. That is, the present invention can be applied to all data communication apparatus (such as telex, computer communication and word processor communication) which perform error correcting communication. Fig. 1 is a block diagram showing an outline configuration of a facsimile apparatus having an ECM function and according to an embodiment of the present invention. In Fig. 1, numeral 1 is a communication line, and 3 is a telephone set. A network control unit (NCU) 2 switches a communication line 1 to a telephone set 3 or MODEM 4 for connection. The MODEM 4 modulates and demodulates a picture signal and a control signal in a FAX protocol, and has a modulation and demodulation function such as V21, V27ter and V29 as recommended by CCITT. An interface 5 inputs and outputs a signal between the MODEM 4 and a CPU 8. Interface 6 inputs and outputs signals between a reader 12 and the CPU 8, and interface 7 does the same for signals between a recorder 13 and the CPU. The CPU 8 has overall control of the facsimile apparatus and consists of microcomputers. The CPU 8 controls the apparatus by executing a control program stored in a ROM (read only memory) 9. The CPU 8 also encodes and decodes image data. A RAM (random access memory) 10 temporarily stores data and is provided with a frame number storage area for storing a frame number in which an overflow in a memory can occur when carrying out an error correction mode. An image memory 11 stores image data, and is used for storing data to be sent, storing received memory and carrying out error correction. In operation of the device a reader 12 reads an original (or a draft), and a recorder or printer 13 records image data. The configuration of a facsimile apparatus has now been described and its sending and receiving operations in accordance with the present invention will be described. In the case of sending, when the memory send mode is specified by a key input switch (not shown) provided at the reader 12, an original is read by the reader 12, and the read image information is encoded and stored in the image memory 11. When after all the originals to be sent have been read and a line has been established with a specified recipient by dialing the recipient using a dial key provided at the reader 12, a FAX protocol is executed, and communication mode is set by exchanging control signals with the recipient. In this FAX protocol, when the recipient has an ECM (error correction mode) function, the image is communicated in ECM. When the recipient has no ECM function, the image is communicated in an ordinary way. When a real-time send mode has been specified the recipient is dialed, the FAX protocol is executed to set the communication mode, and the original image is then read. In the case of receiving, when there is no recording paper in the recorder 13, or when a private mode has been specified by the recipient, the received data is stored in the image memory 11. When there is recording paper and no private mode has been specified, the received data is recorded in the normal manner. In the facsimile apparatus being described, the image memory 11 is used not only for memory sending and memory reception but also as a buffer memory in ECM. In ECM, as recommended by CCITT, a buffer memory with a minimum of 64 K bytes is required to store one block (one partial page) of image information. However, to efficiently utilize the image memory 11 for memory sending and memory reception it is necessary to have available in the image memory 11 a minimum of 16 K bytes for ECM, and communicate an image in ECM by means of the image memory for 16 K bytes. Also when there is an unused capacity of 64 K bytes or more depending upon the condition of use of the image memory, communicate the image (the first error correcting communication mode) in ECM using an ordinary memory of 64 K bytes. Figs. 2 to 4 are flow charts showing a control operation of the CPU 8 according to an embodiment of the present invention. A control program to execute these flow charts is stored in the ROM 9. The operation of this embodiment will be described indetail by following the flow charts. First it is detected in step S1 in Fig. 2 whether or not sending is instructed by the key input switch in the reader 12, and it is detected in step 2 whether or not there is a call signal from the line 1, i.e. whether or not there is already an incoming signal. If there is a sending instruction the process proceeds from step S1 to step S4, and it is judged whether or not the memory send mode is selected. When the memory send mode is selected, the original image is read by the reader 12, and the read image is encoded and stored in the image memory 11 in order in steps S5, S6 and S7. Thus, it is detected in step S5 whether or not the unused capacity of the image memory 11 is 16 K bytes or more. When the unused capacity of the image memory 11 is less than 16 K bytes, the process terminates as storage error due to memory full in step S8. The image data is thus stored in the memory 11, and after it is detected in step S7 that all the original images have been stored, the process proceeds to step S9. On the other hand, when the memory send mode is not selected in step S4, the process proceeds from step S4 to step S9. In step S9 using a dial key (such as ten-key pad and one-touch dial key) of the reader 12 it is a designated recipient (destination station) which is dialed. An auto dialer is provided at a NCU 2, and the CPU 8 sends dial data to the auto-dialer at the NCU 2 for dialing. When the line 1 is connected with the recipient, the FAX protocol is executed in step S10. When it is judged by this protocol in step S11 that the recipient is an apparatus equiped with ECM function, the process proceeds to the ECM send routine of step S14. If step 11 shows that the recipient has no ECM function, image data is sent in step S12. In the case of memory sending, the image data is sent from the image memory 11, and in the case of real-time sending, the image data read in the reader 12 is encoded in order for sending. When all image data have been thus sent, the sending operation is terminated. When a call signal (call signal of 16 Hz or 1300 Hz) is given from the line 1 in step S2 the process proceeds to step S15 to check the recorder 13 for recording paper. If the recorder 13 has no recording paper, it is judged in step S22 whether or not the unused capacity of the image memory is 16 K bytes or more, and if the unused capacity of the memory 11 is 16 K bytes or more the FAX protocol is executed in step S24. If the unused capacity of the memory 11 is less than 16 K bytes, the process terminates in step S23 as the received data can neither be stored or printed. If there is sufficient recording paper in the recorder 13, the process proceeds from step S15 to step S16 to execute the FAX protocol. In step S17, it is judged whether or not a private mode is specified in the FAX protocol, and in step 18 it is judged whether or not ECM is specified. When the private mode is specified, the process proceeds from step S17 to step S25 to execute memory reception in the private mode. Also if ECM is specified, ECM receive routine is executed in step S19. If neither the private mode nor ECM is specified, the process proceeds from step S18 to step S20 to record the received image data in order (real-time receive record), and when all image data have been received, the control operation is terminated. If the recording paper in the recorder 13 runs out while receiving image data for recording in steps S20 and S21, the process proceeds to step S26 to shift to memory reception. When there is no recording paper, the process proceed to steps S15, S22 and S24 as mentioned above, and memory reception is performed in step S25. On the other hand, in the case of the private mode, the process proceeds from step S17 to step S25 for memory reception. It is judged in step S26 whether or not the unused capacity of the image memory 11 is more than 16 K bytes, and if the unused capacity in the memory 11 is less than 16 K bytes, the process terminates in step S30. Also if the unused capacity of the memory 11 is more than 16 K bytes, it is judged in step S27 whether or not an image for one page has been received. After the image for one page has been received, the FAX protocol is executed in step S28, and it is judged in step S29 whether or not all images have been received, and the process terminates the reception operation when it is judged that all images have been received. In the flow chart in Fig. 2 as mentioned above, the unused capacity of the image memory 11 will be used for memory reception or memory sending until it reaches 16 K bytes. The ECM receiving operation will be described. Figs. 3 and 4 are flow charts showing the process to be executed by the CPU 8 on receiving ECM. When proceeding to step S19 in the flow chart in Fig. 2, the ECM record routine in Fig. 3 is first started, and the ECM interrupt routine in Fig. 4 is executed in the ECM record routine in Fig. 3 by interrupt request (MODEM interrupt) from the MODEM 4. Accordingly, the ECM reception is performed in accordance with the ECM record routine in Fig. 3 and the ECM interrupt routine in Fig. 4. First, after reading information on an area for storing a complete frame number (frame number free from errors) of RAM 10 in step S100 in Fig. 3, it is judged whether or not a frame to be recorded exists (whether or not data for the corresponding frame is complete). If there is a frame to be recorded, data for the frame from the image memory 11 is read in step S101 to increase the frame number. Thereafter, the processes in steps S102 to S107 are executed, and then it is judged in step S100 again whether data for the frame of the increased number is complete. After reading data of one frame from the image memory 11 in step S101, the frame data read in step S102 is processed byte by byte for decoding. It is judged in step S103 whether or not the decoded data (raw data) for one line is complete, and if the raw data for one line is not complete, it is judged in step S108 whether or not data to be decoded still remains. If the data to be decoded still remains, the process returns to step S102 for continuous decoding. On the other hand, if no data to be decoded exists, the process returns to step S100 and waits until the next frame data is complete. After raw data for one line is complete by the above process, it is judged in step S104 whether or not the recorder 13 is busy. If the recorder 13 is not busy, the raw data for one line is transferred to the recorder 13 in step S105. Thus, the data for one line is recorded. It is judged in step S106 whether or not an image data for one page has been recorded, and if one page data has not been recorded, the process proceeds to step S108. If one page data has been recorded, it is judged in step S107 whether or not there is the next page (all pages of data have been recorded), and if there is the next page, the process returns to step S100. The ECM interrupt routine in Fig. 4 is executed by a MODEM interruption from the MODEM 4 while the ECM record routine in Fig. 3 is being executed. Since, when a received image data for one byte is complete, the MODEM 4 transfers a data for one byte to CPU 8, a MODEM interruption occurs. A step to be executed by one MODEM interruption is up to returning to step S211, or until the routine is completed. Assuming, for example, that the execution starts with step S211, the step is a period up to returning to step S211 again. First it is detected in step S201 whether or not the unused capacity of the image memory 11 is 64 K bytes or more, and if 64 K bytes is available, the received image data in an ordinary ECM in step S202 and after is recorded. On receipt of one byte data from the MODEM 4 in step S202, it is stored in a buffer area (for 64 K bytes) for ECM in the image memory 11 in step S203. When it is judged in step S204 that one frame data has been received, the presence of frame error is checked in step S205. If a frame error exists, information with an error frame number is stored in an error frame number area of RAM 10 in step S206, and it is judged in step S207 whether or not one block data has been received. On receipt of one block data, it is judged in step S208 whether or not an error frame number is written (whether any error frame exists or not) in the error frame number area in RAM 10. If an error frame exists the process proceeds to step S209. In the step S209, the frame number data for re-sending request are arranged to request a transmitter to re-send the error frames in accordance with the re-sending request procedure (not shown) after passing through this interrupt routine. Thus, the error frame data is received again. Similarly also in steps S224, S225 and S228, the frame number data for the re-sending request are arranged to request the re-sending after passing through the interrupt routine. If one block data is thus free from errors, it is judged in step S210 whether or not all data have been received. If all data have been received, the receiving operation is terminated. If the unused capacity of the image memory 11 is less than 64 K bytes in step S201, one byte data is received from the MODEM 4 in step S211, and it is judged in step S212 whether or not an overflow flag is set in the RAM 10. If no overflow flag is set, the data is stored in the buffer area for ECM in the image memory 11 in step S213. It is judged in step S214 whether or not the image memory 11 is full (no unused bytes). When the memory is full, an overflow flag is set in the RAM 10 in step S215, and information on the frame number at the time when the overflow occurred, is stored in the RAM 10 in step S216. When one frame data has been thus received in step S217, it is checked in step S218 whether or not the received frame data is error frame data. If it is not error frame data, store the complete frame number in the RAM 10 in step S219 as described in step S100 in Fig. 3. On the other hand, if it is error frame data, the error frame number is stored in the RAM 9 in step S220. It is judged in step S221 whether or not one block data has been received, and if one block data has not been received, the process returns to step S211. If one block data has been received, the process proceeds to step S222. It is judged in step S222 whether or not an overflow flag is set to the RAM 10. When an overflow flag is set, it is judged in step S223 whether or not an error frame existed before an overflow (memory full) in the image memory 11. This is performed by judging whether or not information on error frame number is written in the RAM 10 before the frame number stored in step S216. When there was no error frame before the overflow, the frame number data are arranged in step S224 to request resending of all frame data after the overflow in memory, and the process proceeds to step S226. On the other hand, when there was an error frame before the overflow, the frame number data are arranged in step S225 to request re-sending of both error frame data and all frame data after the overflow in memory, and the process proceeds to step S226. In step S226, both the overflow flag of the RAM 10 and the frame number information after the overflow are cleared, and also the error frame data of the image memory 11 is cleared, and then the process returns to step S211. In step S225, re-sending of both error frame data and all frame data after the overflow in memory is requested, but re-sending of all frame data after the error frame may be requested to simplify the control of the CPU 8. If an overflow flag is not set in step S222, it is judged in step S227 whether or not there is an error frame. If there is an error frame, the frame number data are arranged to request re-sending of the error frame data in step S228, and the error frame data in the image memory 11 is cleared in step S229, and then the process returns to step S211. If there is no error frame in step S227, it is judged in step S230 whether or not all data is received. If all data has not been received, the process returns to step S211, and if all data has been received, the receiving operation is terminated. Recording the received data in accordance with the above ECM record routine is performed nonsynchronously with storing the received data into the image memory 11 in accordance with the ECM interrupt routine. The image memory data is read in sequence and is recorded by the recorder 13 until an error frame occurs. When an error frame occurs, the recording is stopped at a step S100 in Fig. 3, and when an error frame is normally received after re-sending, the recording will be executed again. According to an embodiment of the present invention, data can be received in ECM even if 64 K bytes or less of the image memory 11 are unused (that is, a data can be received in ECM even for any capacity 64 K bytes or less, a minimum capacity at which a data can be sent in ECM). In the above-mentioned embodiment, it is possible to receive in ECM even if 16 K bytes to 64 K bytes of the image memory 11 are unused. Fig. 5 shows that an area for ECM of the image memory 11 has 64 K bytes, and the shaded area is used for memory sending and memory reception. In this case, ordinary reception in ECM is performed. Fig. 6 shows that an area for ECM of the image memory 11 has 16 K bytes, and in this case, reception in ECM is performed by using a method shown in the above-mentioned embodiment. In the above embodiment, it is so constructed that a minimum of 16 K bytes are secured as an area for ECM in the image memory 11. However, the entire image memory 11 is arranged to be used for memory sending and memory reception, and when 16 K bytes of the image memory 11 are unused, it is possible to notify (notify by FAX protocol) the opposite apparatus of having an ECM function. The minimal capacity for ECM of the image memory 11 is not limited to 16 K bytes. Applications of the present invention are not limited to the above-mentioned embodiments, but can be modified in various ways.

Claims: A data communication apparatus for receiving data from an external source and capable of half duplex operation and of operating in an error correcting mode in which predetermined amounts of data are sent block by block; and characterised by comprising: a memory (11) for storing received data, and having a capacity not greater than the amount of data to be transmitted at one time in said error correcting mode; and control means (2) adapted to detect the presence of an error in received data, to judge the available capacity of said memory, and to detect when the volume of data sent is too great for the available capacity of said memory, wherein said control means is also adapted, when an error in a block of data is detected, to store correct data in the block in the memory up to the available capacity of the memory but leaving capacity for the erroneous data and to request resending of the erroneous data, and if no error has been detected on a block of data and an over-flow condition has been detected, to request resending of the data which could not be stored. Apparatus according to claim 1, wherein once the memory has been filled with correct data the control means causes the stored data to be output. Apparatus according to claim 2 and including printing means for printing the output data. A method of data communication utilising apparatus capable of half duplex operation and of operating in an error correcting mode in which predetermined amounts of data are sent to the apparatus block by block; and characterised by: storing received data in a memory having a capacity not greater than the amount of data to be transmitted at one time in said error correcting mode; and utilising control means to detect the presence of an error in received data, to judge the available capacity of said memory, and to detect when the volume of data set is too great for the available capacity of said memory, wherein said control means, when an error in a block of data is detected, causes correct data in the block to be stored in the memory up to the available capacity of the memory but leaving capacity for the erroneous data and to request resending of the erroneous data for storage with the correct data, and if no error has been detected in a block of data and an over flow condition has been detected, requests resending of the data which could not be stored, and wherein once the memory has been filled with correct data the stored data is output. A method according to claim 4, wherein the output data is printed.

Inventors: ONO TAKASHI, UENO YASUHIDE, ONO, TAKASHI, UENO, YASUHIDE, ONO, TAKASHI, C/O CANON KABUSHIKI KAISHA, UENO, YASUHIDE, C/O CANON KABUSHIKI KAISHA
Applicants: CANON KK, CANON KABUSHIKI KAISHA
Application year: 1991
Main classification: H04L1
IPC codes: H04N1, H04L1