Data transmission method and apparatus

Abstract: A method and apparatus for transmitting print data signals serially to a printing device (21) is disclosed. Print data for printing dots selectively line by line is stored as a plurality of bytes in which each byte represents the number of contiguous binary bits to be output to the printing device having the same binary value. The bytes are output to a comparator (24) which receives the output of a counter (25) driven by clock signals (26). The counter is started when a byte is output and the clock signals clock a data line (29) held at a level representing the value of the bits. When the count equals the byte, the comparator (24) toggles the data line so that it is at a level representing the next binary bits to be output. The apparatus is disclosed for use in a franking machine.

Description: This invention relates to a method of data transmission and in particular to a method of outputting data signals to a printing device. US 4,228,467 discloses a facsimile transmission system in which a sequence of binary signals is run-length encoded into words representing strings of contiguous binary bits having the same value. At the receiver of the system, the words are entered one at a time into a register and the word is read out to set a counter to a value corresponding to the word. Clock signals are output to a printer and to the counter to decrement the counter. When the counter reaches zero count, the supply of clock signals is terminated. EP A-0 050 338 discloses a picture information processing and storage device. Scanning information is converted to run-length codes. Decoding is effected by setting a counter to the value of the run-length code and decrementing the counter to zero. A further disclosure of run-length encoded data is provided by WO-A-8 501 174. Printing devices capable of selectively printing dots in a row are used to print characters or a graphic pattern by repeatedly operating the printhead in a succession of print cycles to print selected dots in a succession of rows on a print receiving medium. An example of such a printing device is a thermal dot printhead. Thermal dot printheads comprise a row of resistive print elements through which electric current is passed selectively to heat selected elements. The heated elements of the printhead cause an impression to be printed on a medium either by an ink transfer process in which ink carried by a backing layer is caused to be removed from the backing layer and deposited on the print receiving medium or by direct thermal activation of a heat sensitised medium. Each print element is capable of printing a dot on the medium in a line aligned with the row of print elements. Printing of characters or graphic patterns is effected by relative movement between the printhead and the medium in a direction transverse to the row of print elements during which the print elements are selectively heated to build up the required impression line by line. Energisation of the print elements is controlled by means of a register having a plurality of stages corresponding in number to the number of print elements. Each stage of the register is associated with a different one of the print elements respectively. For each line of printing, the stages of the register are loaded with a binary digit representing energisation or non-energisation of the corresponding print element. For example print elements associated with stages loaded with binary one will be energised while print elements associated with stages loaded with binary zero will not be energised. It has been proposed to use thermal printheads in postage franking machines to effect printing of a franking impression on items of mail. A printhead for such use is proposed to provide a resolution of 8 dots/mm and to have a printing width of 30mm. Consequently such a head is provided with 240 energisable print elements and requires a register having 240 stages into which a corresponding number of print data bits must be loaded for each line of dots to be printed. For any given print speed, i.e. rate of printing line by line, there is a maximum time interval for the loading of the print data. While parallel loading of the register enables the print data to be loaded in the duration of this time interval even for relatively high speeds of printing, generally, commercially available thermal print heads are designed for serial loading of the print data. Furthermore parallel loading of the data requires complex and costly electronic circuits and if error checking of the print data is required it is more convenient and less costly if only a single serial data line needs to be checked. Accordingly it is desirable to load the print data into the register serially bit by bit for each line of printing. However it is desired to be able to print lines of dots at a rate for which the load time interval is only 2ms for a line of 240 data bits and hence the load time is only 8.3µs per bit of print data. In practice a safety margin is required and for this printing speed the load time for each bit would need to be reduced to approximately 6 to 7µs. Usually electronic circuits of a franking machine include a micro-processor which carries out accounting and control functions of the machine and the operation of the microprocessor imposes limitations on the rate at which print data for controlling energisation of the print elements of the printhead can be output. Print data is usually stored as a bit map in which each possible dot position of an impression to be printed is represented by a binary data bit in a bit map. This requires the provision of a substantial number of storage locations in memory. Conventionally the microprocessor is required to output information for each bit of print data sent to the printhead. Typically six instructions are required to be executed by the microprocessor for the output of each bit of print data. Thus for a printhead with 240 print elements, output of print data defining a line of print the microprocessor is required to execute 1440 instructions. According to one aspect of the invention a method of storing a data message and outputting signals corresponding to said stored data message including the steps of storing said data message as a data byte having a value representing the number of bits in a string of contiguous bits having the same one binary value; setting a data line to a first state representing the binary value of the string of bits represented by said data byte; outputting a series of clock signals from a source of clock signals and utilising a counter to control the output of clock signals so that the number of clock signals is equal to the number of bits in the string of bits represented by said data byte is characterised by the steps of storing a plurality of bytes representing a multi-bit data message, incrementing the counter with said clock signals; terminating output of said clock signals in response to the counter reaching a state corresponding to the value of a first one of said data bytes; and switching the data line to a second state representing the other binary value; and repeating the sequence of aforesaid steps of incrementing the counter with said clock signals; terminating output of said clock signals in response to the counter reaching a state corresponding to a next data byte and switching the data line, said first data byte and said second data byte being in a sequence corresponding to the sequence of strings of bits in the data message. According to a second aspect of the invention apparatus for storing a data message and outputting binary signals corresponding to said data message including means for generating a multi-bit data message to be input as binary signals to a printing device; a print data line connected to the printer device; a memory; said means being operable in a printing routine to write a sequence of data bytes to said memory representing strings of binary print data signals to control the printer device to print dots at selected positions in a line, each byte representing a string of contiguous binary print data signals to be output on said print data line and having the same binary value; a counter; a source of clock signals connected to said counter and to said printer device; control means responsive to thee state of said counter to control output of the clock signals to the printer device such that the number of clock signals is equal in number to the number of binary bits in a string of contiguous bits represented by said data byte; characterised in that said means is a microprocessor; said memory stores a plurality of data bytes representing said multi-bit data message; said microprocessor is operable in said printing routine to read said data bytes from said memory and to apply said data bytes serially one at a time to said comparison means in a sequence corresponding to the sequence of binary bits in the data message and to enable the source of clock signals each time a data byte is applied to the comparison means; said comparison means being operative in response to a count of clock signals by said counter reaching equality with the value of the data byte applied to the comparison means to disable the source of clock signals and to output to the microprocessor a data line control signal; said microprocessor being operative to hold the print data line at one of first and second levels representing binary one and binary zero respectively corresponding to the binary value of bits represented by the data byte applied to the comparison means and in response to said data line control signal to switch the data line to the other of said first and second levels. An embodiment of the invention will now be described by way of example with reference to the drawings in which:- Figure 1 is block circuit diagram of a postage franking machine, Figure 2 is a block diagram illustrating output of print data to the printhead, and Figure 3 is a flow chart illustrating the steps utilised in outputting print data. Referring first to Figure 1, a microprocessor 10 is connected to a bus 11 to which a number of peripheral and memory devices are connected. The microprocessor is operable under program sequences stored in a read only memory (ROM) 12 to carry out accounting and control functions of the franking machine. A random access memory 13 is connected to the bus and is utilised by the microprocessor as a working store. Postage accounting data relating to usage of the franking machine in franking postal items is stored in non-volatile memories 14, 15 also connected to the bus 11. For purposes of security and maintenance of integrity of the accounting data in the event of a mal-function, the accounting data is stored in duplicate in each of the memories 14, 15. Usually the accounting data comprises a value of credit available for use in franking, a tote value which is the accumulated value of postage used in franking items, a count of the number of items franked and a count of the number of items franked with a postage charge in excess of a predetermined value. Input of values of postage charge required to be franked, other data and commands to control operation of the machine is effected by means of a keyboard 16 connected to the bus 11. A display device 17 connected to the bus is operated by the microprocessor to echo keyboard entries of postage values and to display information to assist users in uses of the machine. An input/output port 18 connected to the bus handles transmission of signals output from the microprocessor to other devices and of signals input to the microprocessor from those devices. A motor control circuit 19 is controlled by signals output via the input/output port 18 to control energisation of a main drive motor 20 of means for feeding mail items past a printhead 21. The control circuit also controls operation of an impression control motor 31 which effects application of pressure to urge mail items toward the printhead so that a thermal transfer ribbon interposed between the printhead and the mail item is pressed into ink transfer engagement with the mail item. The thermal transfer ribbon is drawn by its engagement with the mail item past the printhead and the used ribbon is wound onto a take up spool or reel driven by a take up motor 32 controlled by control circuit 19. Feeding of the mail items is sensed by means of a tachometer 22 which inputs signals to the microprocessor via the input/output port 18 to synchronise the line by line printing of the franking impression with the feeding of the mail items. The thermal printhead 21 is connected to the input/output port 18 so as to receive multi-bit data messages comprising print data signals and strobe signals from the microprocessor 10. When printing is to be effected, the microprocessor loads print data defining a plurality of lines of print to form a franking impression to be printed in memory, which may be RAM 13, and outputs successive lines of this print data in a succession of print cycles, one line of data being output in each cycle. When a line of print data has been output to the printhead and loaded in the printhead register (not shown), a strobe signal from the microprocessor causes the print data in the printhead register to energise the printhead elements in dependence upon the print data. Successive lines of data are loaded into the printhead register in successive print cycles and the strobe signals cause energisation of the elements. Output from the tachometer is utilised to synchronise the timing of the strobe signals with movement of the mail item as it is fed past the printhead so that the lines of print are evenly spaced along the mail item. In accordance with the present invention instead of storing the print data as a bit map, the print data for a line of print is stored in memory 13 as a number of bytes each corresponding respectively to a group of contiguous binary ones and zeros in the print data. The bytes are each of eight bits and the magnitude of each byte represents the number of print data bits in a string for the group of bits corresponding to the byte. The width of any franking impression to be printed is less than the overall width of the printhead and hence, with binary one representing a dot to be printed, the ends of a line of print data are always binary zeros. Accordingly the initial string of bits for a line of print data always consists of zeros and hence the first byte always represents a number of zeros. The second byte represent a number of ones, the third byte a number of zeros and so on alternately. It will be appreciated that lines of print data will be represented by different numbers of bytes in dependence upon the number of groups of contiguous zeros and ones in the data. The print data for a line of print also includes a number having a value equal to the number of bytes representing the print data for a line of print. As illustrated by the block diagram of Figure 2 and the flow chart of Figure 3, during a printing cycle the printing data for a line of print is output one byte at a time via the input/output port 18 and lines 23 to one side of an eight bit magnitude comparator 24. An input to the other side of the comparator 24 is from a counter 25. The counter is driven by clock signals from a clock generator 26 enabled by an enable signal on line 27. Clock signals from generator 26 are output on line 28 to clock data signals into the register of the printhead in dependence upon the state of a data line 29. Thus the count from counter 25 is equal to the number of data bits clocked to the printhead register. When the count from the counter is equal to the value of the byte loaded into the comparator 24, the comparator generates a count equal signal on line 30 which is sent via the input/output port 18 to the microprocessor to indicate that the required number of bits of one value have been sent to the printhead and that the next byte of print data requires loading into the comparator. The clock generator 26 is inhibited while loading is effected and the state of data line 29 is complimented so that it is toggled from its previous state while the previous byte was in the comparator to an opposite state. Thus after loading of a number, represented by the value of a byte, of data bits of one binary value the data line is toggled so that the next byte controls loading of a number of data bits of the other binary value. Upon completion of loading the data bits for a line of print, and at a time determined inter alia by output from the tachometer, the microprocessor outputs a strobe signal on line 33 to the printhead to effect energisation of print elements in dependence upon the loaded print data to effect printing of a line of the required impression. The microprocessor sets a counter equal to the value of the number which is equal to the number of bytes representing print data for a line. This counter is decremented by unity for each loading of a byte into the comparator. Inspection of the counter by the microprocessor provides an indication of when loading of a complete line of print data has been accomplished. Successive lines of print data are loaded and printing of successive lines of print is effected as hereinbefore described until the data for a complete required impression has been loaded and the complete impression printed. The speed of data handling is enhanced because the microprocessor is required to generate an output only when the state of the data line is required to be toggled. For a typical franking impression this may occur approximately thirteen times for each line of print whereas for previous proposed methods of print data output the microprocessor has been required to generate an output for each bit of print data sent to the printhead. If the microprocessor is required to execute six instructions for each output generated, with the data transmission system described hereinbefore the microprocessor is required to execute only 78 instructions for a typical line of print forming a franking impression as compared with 1440 instructions when output is generated for each print data bit thereby providing a decrease in speed of data handling of approximately 20 times. An additional benefit is provided in that less memory space is required to store the bytes representing print data than would be required to store the print data in bit map form. While the invention has been described hereinbefore by way of reference to an embodiment in which print data is output serially to a thermal print head, the method of data transmission in accordance with the invention may be used for transmission of print data to printing devices other than thermal print heads, for example print heads using other printing technologies to selectively print a plurality of dots in rows. Furthermore the method of data transmission may be utilised for transmission of data serially to devices other than print heads.

Claims: A method of storing a data message and outputting signals corresponding to said stored data message including the steps of storing said data message in a memory (13) as a data byte having a value representing the number of bits in a string of contiguous bits having the same one binary value; setting a data line (29) to a first state representing the binary value of the string of bits represented by said data byte; outputting a series of clock signals from a source of clock signals (26) and utilising a counter (25) to control the output of clock signals so that the number of clock signals is equal to the number of bits in the string of bits represented by said data byte characterised by the steps of storing in the memory (13) a plurality of bytes representing a multi-bit data message, incrementing the counter (25) with said clock signals; terminating output of said clock signals in response to the counter (25) reaching a state corresponding to the value of a first one of said data bytes; and switching the data line (29) to a second state representing the other binary value; and repeating the sequence of aforesaid steps of incrementing the counter (25) with said clock signals; terminating output of said clock signals in response to the counter (25) reaching a state corresponding to a next data byte and switching the data line (29), said first data byte and said second data byte being in a sequence corresponding to the sequence of strings of bits in the data message. A method as claimed in claim 1 further characterised by setting a value to a number corresponding to the number of data bytes representing the multi-bit data message and decrementing the number of said value by unity in correspondence with each successive sequence of steps. Apparatus for storing a data message and outputting binary signals corresponding to said data message including means (10) for generating a multi-bit data message to be input as binary signals to a printing device (21); a print data line (29) connected to the printer device (21); a memory (13); said means (10) being operable in a printing routine to write a sequence of data bytes to said memory (13) representing strings of binary print data signals to control the printer device (21) to print dots at selected positions in a line, each byte representing a string of contiguous binary print data signals to be output on said print data line (29) and having the same binary value; a counter (25); a source (26) of clock signals connected to said counter and to said printer device; control means (24) responsive to thee state of said counter (25) to control output of the clock signals to the printer device (21) such that the number of clock signals is equal in number to the number of binary bits in a string of contiguous bits represented by said data byte; characterised in that said means (10) is a microprocessor (10); said memory (13) stores a plurality of data bytes representing said multi-bit data message; said microprocessor (10) is operable in said printing routine to read said data bytes from said memory and to apply said data bytes serially one at a time to said comparison means (24) in a sequence corresponding to the sequence of binary bits in the data message and to enable the source (26) of clock signals each time a data byte is applied to the comparison means (24); said comparison means (24) being operative in response to a count of clock signals by said counter (25) reaching equality with the value of the data byte applied to the comparison means to disable the source (26) of clock signals and to output to the microprocessor (10) a data line control signal (30); said microprocessor (10) being operative to hold the print data line (29) at one of first and second levels representing binary one and binary zero respectively corresponding to the binary value of bits represented by the data byte applied to the comparison means and in response to said data line control signal (30) to switch the data line to the other of said first and second levels. Apparatus as claimed in claim 3 further characterised in that the level of the print data line (29) initially is held at a predetermined one of the first and second levels. Apparatus as claimed in claim 3 further characterised in that the memory (13) includes a storage location (34) and the microprocessor (10) is operative to store in said location a number corresponding to the number of data bytes comprising the plurality of data bytes written to the memory (13), to decrement the number in the storage location (34) for each data byte applied to the comparison means (24) and to inspect the stored number after each data byte is applied to the comparison means to determine if the multi-bit data message data string has been output to the printer device (21).

Inventors: HERBERT RAYMOND JOHN, HERBERT, RAYMOND JOHN
Applicants: NEOPOST LTD, NEOPOST LIMITED
Application year: 1991
Main classification: G06K15
IPC codes: H04N1, G06K15