Synchronisation circuit for a demodulation device and a communication processing apparatus provided with same

Abstract: In a demodulation device for processing a received data including a predetermined pattern, at each m bits, a bit pattern including the predetermined pattern is set, and the received data is shifted by one bit each time. A result of the shift is compared with the set bit pattern each time shifting is performed. The result of the shift is output in the case where coincidence is obtained. In the case where coincidence cannot be obtained, comparison is continued.

Description: BACKGROUND OF THE INVENTION Field of the Invention: The present invention relates to a demodulation device having a parallel interface for connecting a microprocessor and others, and a communication processing apparatus provided with such a demodulation device. Description of the Related Art: Data reception operation in a conventional facsimile will be described below with reference to Fig. 1 which illustrates the connection between a modem and a micro processing unit (MPU) which is a host processor. First, a signal is input from a transmission line located on the left through a modem 302. An analog interface unit 306 performs band-pass filtering on the input signal. The resultant signal is converted into a digital signal and then input to a reception unit 305. The reception unit 305 performs on the digital signal demodulation, equalization and determination, and serially outputs the received data synchronously with data clocks. The serial data is converted into parallel data (which may be in 8 bits) by a serial/parallel converting unit 303, and is then transferred to an interface register 304. At that time, the modem 302 outputs an interrupt request signal to a MPU 301 which is a host processor. When the interrupt request signal is input to a control unit 307, the MPU 301 reads in the received data from the interface register 304 of the modem 302 to registers 306a and 306b via a data bus. Series of the aforementioned operations are repeated each time data is received in 8 bits. The operation of the transmission side will be described below with reference to Fig. 2. First, a MPU 401 on the transmission side writes in transmission data of first 8 bits to an interface register 404. The transmission data is converted into serial data by means of a parallel/serial converting unit 403. A transmission unit 405 performs signal processing on the resultant serial data, and an analog interface unit 406 converts the serial data into an analog signal. A low-pass filter filters the analog signal before the signal is output to the transmission line. The data written in the interface register 404 is transferred to the parallel/serial converting unit 403 when all the data in the parallel/serial converting unit403 has been transferred to the transmission unit 405. At that time, an interrupt request signal is output to the MPU 401. A control unit of the MPU 401 is interrupted by the interrupt request signal, and thereby outputs, to the interface register 404, the 8-bit data which is to be transmitted subsequently. Series of the aforementioned operations are repeated for every 8-bit transmission data. The operation performed on the transmission side will be compared with that performed on the reception side. The 8-bit data written on the transmission side is not always reproduced in the interface register 404 on the reception side as it is. Also, assuming that there is no transmission error caused by deformation or noise inherent to the transmission circuit, a bit shift may occur in the received data due to the difference in the transmission and reception operation timings. Hence, to allow the data transmitted from the transmission side in one byte units to be received at the reception side in one byte units, 2-byte registers (which may be denoted by 306a and 306b) are conventionally prepared at the reception side. To correct the shift, a software capable of searching for a pattern for synchronization (hereinafter referred to as a synchronizing pattern) by shifting the data by one bit each time is used. The procedures of the reception software, which is conducted when the synchronizing pattern is in 8 bits, will be described below with reference to Fig. 3. In step (hereinafter referred to as a S) 1 through S6, which will be described below, reading of the data is repeated by interruption until 8-bit data which coincides with the synchronizing pattern is read in. First, in S1, 0 is assigned to a counter (SHFTCNT) for counting the number of shifted bits. In S2, data is read from the interface register 304 of the modem to the registers 306a and 306b by interruption. In S3, the data in the registers 306a and 306b are shifted to the right by 1 bit, and then in S4, the contents in SHFTCNT are incremented. Thereafter, in S5, the contents in SHFTCNT are compared with 8. If the contents in SHFTCNT are less than 8, the process goes to S6. In S6, the contents in the register 306b are compared with the synchronizing pattern. If they do not coincide with each other, the process returns to S3 and the processing from S3 to S6 is repeated. If the synchronizing pattern is not found after the aforementioned operation is repeated eight times, i.e., if the contents in SHFTCNT are greater than 8, the process returns to S1, and the processing from S1 to S6 is conducted on new 8-bit received data. The processing from S1 to S6 is repeated until the 8-bit data corresponding to the synchronizing pattern is found (searched for). If the 8-bit data corresponding to the synchronizing pattern has been found in S6, the processing in S7 and subsequent steps is performed. In S7 and subsequent steps, bit shift in the received data is adjusted, and data is read in repetitively by interruption. In S7, the data in the registers 306a and 306b are shifted to the right by "8 bits - the contents in SHFTCNT". Next, in S8, data is read in to the register 306a by interruption. Thereafter, the contents of the registers 306a and 306b are shifted by the number of bits which correspond to the contents of SHFTCNT so as to allow the 8-bit data transmitted immediately after the 8-bit data corresponding to the synchronizing pattern to be written in the register 306b. Data can be read out from the register 306b in 8 bit units as it is transmitted from the transmission side by repeating the processing from S7 through S10. In the aforementioned conventional modem, since the timing of the parallel output of the received data from the modem is undefined, a complicated task by a software which enables the MPU for processing the received data to search for the bit pattern is necessary. Furthermore, it is necessary for the MPU to execute a troublesome task of shifting the received data. Document PROCEEDINGS OF THE IEEE VLSI AND COMPUTER PERIPHERALS, 8, MAY 1989, Hamburg, DE, pages 5146-5147; I. ENIS Ungan et al. (hereinafter referred to as "D1") discloses a single chip correlator for detecting a synchronization signal known as « sync word ». Also, according to D1, a micro-processor is informed of the sync word detection by an interrupt signal. However, D1 does not disclose any process or device in which a correlator repeatedly generates interruption signals, based on the sync word detection at predetermined time intervals. In other words, according to D1, the correlator merely generates an interruption signal only when the sync word is detected. Thus, after the sync word is detected, a micro-processor which receives demodulated signals from a modem must determine as to when continuous data should be input by itself. As a result, the micro-processor suffers from heavy load for the determination. SUMMARY OF THE INVENTION One aim of the present invention is to reduce processing load in a processing device at a time of a read-in of the demodulated data. According to a first aspect, the present invention relates to a modem controlled by a processing device, comprising: converting means for performing analog to digital conversion on received data; demodulating means for demodulating the received data which has been converted by said converting means; first storing means for storing the demodulated data from said demodulating means; and output means for outputting the demodulated data stored in said first storing means to the processing device, characterized in that it further comprises: second storing means for storing a predetermined bit pattern, comparing means for comparing the demodulated data stored in said first storing means with the predetermined bit pattern stored in said second storing means, and generating means for repeatedly generating interruption request for requesting read-ins of the demodulated data from said output means, to the processing device at predetermined time intervals, based on a coincidence output from said comparing means. According to a second aspect, the present invention relates to a communication apparatus including a modem and a processing device, comprising: converting means for performing analog to digital conversion on received data; demodulating means for demodulating the received data which has been converted by said converting means; first storing means for storing the demodulated data from said demodulating means; and output means for outputting the demodulated data stored in said first storing means to the processing device, characterized in that the modem comprises: second storing means for storing a predetermined bit pattern ; comparing means for comparing the demodulated data stored in said first storing means with the predetermined bit pattern stored in said second storing means; and generating means for repeatedly generating interruption requests for requesting read-ins of the demodulated data from said output means, to the processing device at predetermined time intervals, based on a coincidence output from said comparing means. According to a third aspect, the present invention relates to a data processing method operative in a modem controlled by a processing device, comprising: converting step of performing analog to digital conversion on received data; demodulating step of demodulating the received data which has been converted in said converting step; first storing step of storing the demodulated data in said demodulating step; and output step of outputting the demodulated data stored in said first storing step to the processing device, characterized by further comprising: second storing step of storing a predetermined bit pattern, comparing step of comparing the demodulated data stored in said first storing step with the predetermined bit pattern stored in said second storing step, and generating step of repeatedly generating interruption requests for requesting read-ins of the demodulated data outputted from said output step, to the processing device at predetermined time intervals, based on a coincidence obtained from said comparing step. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a block diagram showing a conventional structure for reception in a facsimile machine; Fig. 2 is a block diagram showing a conventional structure for transmission in a facsimile machine; Fig. 3 is a flowchart showing the conventional reception operation; Fig. 4 is a block diagram showing the structure of a modem according to an embodiment of the present invention; Fig. 5 is a circuit diagram showing the structure of the essential parts of the modem shown in Fig. 4; Fig. 6 is a flowchart showing the procedures for receiving a preamble in the embodiment shown in Fig. 4; and Fig. 7 illustrates how a mask pattern and a bit pattern are set in the embodiment shown in Fig. 4. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below in detail with reference to the accompanying drawings. Fig. 4 is a block diagram of an embodiment of a modem according to the present invention. A modem 100 is controlled by a MPU 109. To the MPU 109 are connected a ROM 109a and a RAM 109b. The ROM 109a stores the data, such as the program executed to operate the MPU 109, shown by the flowchart of Fig. 6 which will be described later. The RAM 109b is used as the work area for the program stored in the ROM 109a. The modem 100 includes an analog interface unit 101, a reception unit 102, an interface register 103, a serial/parallel converter 104, a transfer signal generator 105, a mask pattern setting register 106, a comparator 107, a bit pattern setting register 108, and differential calculus pulse generator 111. Reference numeral 110 denotes a transmission line. The operation of the above-mentioned structure will be described below. The analog interface unit 101 performs a band-pass filtering and A/D conversion on a signal received from the transmission line 110. The reception unit 102 performs signal processing (including demodulation) on the received data from the analog interface unit 101, and outputs demodulated received data to the serial/parallel converter 104 synchronously with the data clocks. The parallel output from the serial/parallel converter 104 is input to the comparator 107 and to the interface register 103. The parallel data written in the interface register 103 can be read out by the external MPU 109. The output of the comparator 107 is input to the transfer signal generator 105. To the transfer signal generator 105 is connected the mask pattern setting register 106. The external MPU 109 can write data (mask pattern) in the mask pattern setting register 106. The mask pattern is a bit pattern which indicates effective bits to be compared on the comparator 107. To the other input of the comparator 107 is connected the output of the bit pattern setting register 108. The MPU 109 can write data in the bit pattern setting register 108. A data clock is supplied to the reception unit 102 to the transfer signal generator 105. The output of the transfer signal generator 105, i.e., a transfer signal, is sent to the interface register 103 where it is used as the signal for writing parallel data in the interface register 103. The transfer signal is also output to the external MPU 109 as an interruption request signal. The MPU 109 starts reading in the received data (image data) from the interface register 103 in response to reception of the interrupt request signal. The number of bits handled in the serial/parallel converter 104, the mask pattern setting register 106, the comparator 107 and the bit pattern setting register 108 is 16. The number of bits of a connection bus between the MPU 109 and the modem 100 is 8. Assuming that the facsimile reception operation is conducted in the aforementioned connection state, 8-bit data (01111110 in a binary code), called a preamble, is sent out continuously for about 1 second prior to the commands flamed by high level data link control procedures (HDLCs). Hence, the host MPU 109 must search for this bit pattern which is a 8-bit data. The operation of the MPU 109 which searches for the bit pattern will be described below. Fig. 6 is a flowchart showing the procedures of the MPU 109 which searches for a preamble according to the present embodiment. In the following description, the bit patterns set in the bit pattern setting register 108 and in the mask pattern setting register 107 are exclusively used to search for the preamble. In other applications, other bit patterns are set by the MPU 109. First, in S21 and S22, 01111110 (which is 7E in a hexadecimal code) is written in a binary code in both 8 bits on the least significant byte side and 8 bits on the most significant byte side in the bit pattern setting register 108. Next, in S23 and S24, 11111111 (which is FF in a hexadecimal code) is written in a binary code in both 8 bits on the least significant byte side and 8 bits on the most significant byte side in the mask pattern setting register 106. Since the 8-bit data are sent in sequence as the preamble, 2-byte 7E7E are set in the bit pattern setting register 108. After initialization is conducted in S21 to S24, the received data and the bit pattern, 0111111001111110, which is 7E7E in a hexadecimal code and which is the preamble, are compared with each other by the comparator 107. The 8-bit data unit received is shifted by one bit each time by the serial/parallel converter 104 in response to the data clock, by which the bit patten on the serial/parallel converter 104 is changed. Each time the received data is changed, it is compared with the bit pattern set in the bit pattern setting register 108. If the received data and the bit pattern set in the bit pattern setting register 108 coincide with each other, the comparator 107 shown in Fig. 4 outputs a logical high signal (ON). This means that the preamble could be searched for. At that time, the transfer signal generator 105 initiates operation and generates a transfer signal for every 8 data clocks. Synchronously with generation of the transfer signal, the MPU 109 is interrupted and initiates reading in the received data from the interface register 103 (S26). Therefore, the MPU 109, after initialization in S21 to S24, can read out the one byte of data unit as it is transmitted from the transmission side only by taking in the one byte data, which is conducted by interruption, in S25 and S26. In the aforementioned description, since the preamble, 8 bit-data, is sent in sequence, a mask pattern indicating that all 2 bytes are effective is set. The structure and operation of the essential parts of the embodiment will now be described. Fig. 5 is a circuit diagram showing the structure of the essential parts of the modem 100 in detail. Fig. 5 shows the serial/parallel converter 104, the mask pattern setting register 106, the comparator 107, the bit pattern setting register 108, and pulse generator 111. In Fig. 5, 2001 through 2116 indicate the comparator 107. In more detail, 2000 indicates an AND gate; 2001 through 2016 indicate NAND gates; 2101 through 2116 indicate EOR gates; 2201 through 2216, 2301 through 2316 and 2401 through 2416 indicate flip-flops (hereinafter referred to as FFs). The outputs of the NAND gates 2001 through 2016 are connected to the input of the AND gate 2000. The outputs of the EOR gates 2101 through 2116 are respectively connected to one inputs of the NAND gates 2001 through 2016, while the outputs of the FFs 2301 through 2316 are respectively connected to the other inputs of the NAND gates 2001 through 2016. The outputs of the FFs 2401 through 2416 are respectively connected to one inputs of the EOR gates 2101 through 2116, while the outputs of the FFs 2201 through 2216 are respectively connected to the other inputs of the EOR gates 2101 through 2116. The sixteen FFs 2401 through 2416 constitute the serial/parallel converter 104 for converting the received data into parallel data. The serial/parallel converter 104 is a shift register in which the received data is shifted by one bit each time in response to the data clock. The inputs of the sixteen FFs 2301 through 2316 are seriesconnected to the 8-bit data bus so that desired data can be written in by the external MPU 109. The reset inputs of the sixteen FFs 2301 through 2316 are connected to the output of an AND gate 2602. An input of the AND gate 2602 is connected to the Q output of an FF 2601 and another input of the AND gate 2602 is connected to the output of an FF 2500. The output of FF 2500 is connected to the data input of the FF 2601. A data clock is input to the clock input of the FF 2601. Data clock inverted by an inverter 2510 is supplied to the clock input of the FF 2500. In the bit pattern setting register 108 constituted by the FFs 2201 through 2216, the inputs of the eight FFs 2201 through 2208 and those of the eight FFs 2209 through 2216 are series-connected to the data bus so that 8-bit data can be written by the external MPU 109. The operation of the structure mentioned above will be described below. When the outputs of the FFs 2401 through 2416 of the serial/parallel converter 104 coincide with the corresponding outputs of the FFs 2201 through 2216 of the bit pattern setting register 108 in the effective bits set in the mask pattern setting register 106, all the outputs of the NAND gates 2001 through 2016 of the comparator 107 rise, thereby raising (ON) the output of the AND gate 2000, i.e., the output of the comparator 107. Furthermore, since the output of the AND gate 2000 is connected to all the reset terminals of the FFs 2301 through 2316 of the mask pattern setting register 106 via the pulse generator 111, the logical high level of the AND gate 2000 resets all the outputs of the FFs 2301 through 2316 to 0. Consequently, all the outputs of the NAND gates 2001 through 2016 rise, changing the data in the serial/parallel converter 104. Lowering of any one output of the EORs 2101 through 2116 fixes the output of the AND gate 2000 to "1". Therefore, the transfer signal generator 105, shown in Fig. 4, controlled by the logical high level of the output of the AND gate 2000, can output the transfer signal each time 8-bit data is received after the output of the comparator 107 has risen, that is, the MPU 109 can keep reading out the data from the interface register 103. The image signal reception operation conducted in a facsimile machine will be described below. Fig. 7 explains how the mask pattern and bit pattern are set in this embodiment. End of line (EOL) occurs at the beginning of an image signal. Interrupt of the MPU 109 is initiated when the bit pattern represented by this code is received. The bit pattern of EOL is 100000000000 which is 12 bits of the beginning of an image signal. When an image signal is sent following one bit indicating one-dimensional coding scheme or two-dimensional coding scheme which in turn follows EOL, since it cannot be determined whether the added one bit is "1" or "0", 16-bit data shown in Fig. 7 are respectively set in the mask pattern setting register 106 and bit pattern setting register 108. When the 16-bit data shown in Fig. 7 is set in the mask pattern setting register 106, even if one bit on the most significant bit side and three bits on the least significant bit side do not coincide with the reception bit pattern, the inputs of the four NAND gates 2016, 2003, 2002 and 2001, shown in Fig. 5, fall to the logical low level, thus raising the outputs of the NAND gates 2016, 2003, 2002 and 2001 to the logical high level. In each of these NAND gates, the other input, i.e., the results of the comparison between the data in the serial/parallel converter 104 and the corresponding bit pattern in the bit pattern setting register 108, do not affect the output thereof. That is, the mask pattern can be set by a combination of 12 sequential effective bits and 4 invalid bits. Hence, comparison is made by the comparator 107 on the bit pattern portion corresponding to EOL. Rise of the output of the comparator 107 indicates that EOL has been searched for. At that time, transfer of the received data to the interface register 103 at each 8 bit units begins, and output of an interrupt request signal by the transfer signal generator 105 to the external MPU 109 is made possible. The MPU 109 reads out the received data from the interface register 103 in each 8 bit units in response to reception of the interrupt request signal. As will be understood from the foregoing description, in the demodulation device according to the present invention which is capable of outputting parallel data, 2 byte bit pattern, including the bit pattern used to synchronize reception, is set, and the bit pattern used for synchronization is made effective bits, while the bits other than that bit pattern are processed as invalid bits. 2 bytes of the received data input synchronously with the clock are compared with the aforementioned 2-byte bit pattern in every clock. When they coincide with each other, parallel output of the received data to the circuit, such as the external MPU, is made possible. In consequence, the burden of the software executed by the circuit, such as the MPU, for controlling the demodulation device can be greatly alleviated. The facsimile has been described in the above embodiment. However, the present invention can not only be applied to the facsimile, but also other types of communication apparatus. As many apparently widely different embodiments of the present invention can be made without departing from the scope thereof, it is to be understood that the invention is not limited to the specific embodiments thereof except as defined in the appended claims.

Claims: Modem (100) controlled by a processing device (109), comprising: converting means (101) for performing analog to digital conversion on received data; demodulating means (102) for demodulating the received data which has been converted by said converting means (101); first storing means (104) for storing the demodulated data from said demodulating means (102); and output means (103) for outputting the demodulated data stored in said first storing means (104) to the processing device (109), characterized in that it further comprises: second storing means (108) for storing a predetermined bit pattern, comparing means (107) for comparing the demodulated data stored in said first storing means (104) with the predetermined bit pattern stored in said second storing means (108), and generating means (105) for repeatedly generating interruption requests for requesting read-ins of the demodulated data from said output means (103), to the processing device (109) at predetermined time intervals, based on a coincidence output from said comparing means (107). Modem according to claim 1, wherein said predetermined bit pattern stored in said second storing means (108) is given by the processing device (109). Modem according to either one of claims 1 or 2, wherein said second storing means (108) is adapted to store a first predetermined bit pattern for receiving first data, and to store a second predetermined bit pattern for receiving second data. Modem according to any one of claims 1 to 3, wherein said generating means (105) is adapted to generate the interruption request to the processing device (109) each time a predetermined number of data clocks are generated after the coincidence output is obtained from said comparing means (107). Modem according to any one of claims 1 to 4, wherein said second storing means (108) is adapted to store a preamble of 8-bit data as the predetermined bit pattern for receiving image data. Modem according to any one of claims 1 to 4, wherein said second storing means (108) is adapted to store an EOL (End Of Line) of 12-bit data as the predetermined bit pattern for receiving image data. Communication apparatus including a modem (100) and a processing device (109), comprising: converting means (101) for performing analog to digital conversion on received data; demodulating means (102) for demodulating the received data which has been converted by said converting means (101); first storing means (104) for storing the demodulated data from said demodulating means (102); and output means (103) for outputting the demodulated data stored in said first storing means (104) to the processing device (109), characterized in that the modem (100) comprises: second storing means (108) for storing a predetermined bit pattern ; comparing means (107) for comparing the demodulated data stored in said first storing means (104) with the predetermined bit pattern stored in said second storing means (108); and generating means (105) for repeatedly generating interruption requests for requesting read-ins of the demodulated data from said output means (103), to the processing device (109) at predetermined time intervals, based on a coincidence output from said comparing means (107). Communication apparatus according to claim 7, wherein said predetermined bit pattern stored in said second storing means (108) is given by the processing device (109). Communication apparatus according to either one of claims 7 or 8, wherein said second storing means (108) is adapted to store a first predetermined bit pattern for receiving first data and to store a second predetermined bit pattern for receiving second data. Communication apparatus according to any one of claims 7 to 9, wherein said generating means (105) is adapted to generate the interruption request to the processing device (109) each time a predetermined number of data clocks are generated after the coincidence output is obtained from said comparing means (107). Communication apparatus according to any one of claims 7 to 10, wherein said second storing means (108) is adapted to store a preamble of 8-bit data as the predetermined bit pattern for receiving image data. Communication apparatus according to any one of claims 7 to 10, wherein said second storing means (108) is adapted to store an EOL (End Of Line) of 12-bit data as the predetermined bit pattern for receiving image data. Data processing method operative in a modem (100) controlled by a processing device (109), comprising: converting step of performing analog to digital conversion on received data; demodulating step of demodulating the received data which has been converted in said converting step; first storing step of storing the demodulated data in said demodulating step; and output step of outputting the demodulated data stored in said first storing step to the processing device (109), characterized by further comprising: second storing step of storing a predetermined bit pattern, comparing step of comparing the demodulated data stored in said first storing step with the predetermined bit pattern stored in said second storing step, and generating step of repeatedly generating interruption requests for requesting read-ins of the demodulated data outputted from said output step, to the processing device (109) at predetermined time intervals, based on a coincidence obtained from said comparing step. Data processing method according to claim 13, wherein said predetermined bit pattern stored for said second storing step is given by the processing device (109). Data processing method according to either one of claims 13 or 14, wherein said second storing step stores a first predetermined bit pattern for receiving first data, and stores a second predetermined bit pattern for receiving second data. Data processing method according to any one of claims 13 to 15, wherein said generating step generates the interruption request to the processing device (109) each time a predetermined number of data clocks are generated after the coincidence output is obtained in said comparing step. Data processing method according to any one of claims 13 to 16, wherein said second storing step stores a preamble of 8-bit data as the predetermined bit pattern for receiving image data. Data processing method according to any one of claims 13 to 16, wherein said second storing step stores an EOL (End Of Line) of 12-bit data as the predetermined bit pattern for receiving image data.

Inventors: MATSUI HISAYOSHI, MATSUI, HISAYOSHI, Matsui, Hisayoshi, c/o Canon Kabushiki Kaisha
Applicants: CANON KK, CANON KABUSHIKI KAISHA
Application year: 1992
Main classification: H04J3
IPC codes: H04L29, H04J3, H04L7, H04N1