Abstract:
A method and apparatus for transmitting print data signals serially to a printing device 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 which receives the output of a counter driven by clock signals. The counter is started when a byte is output and the clock signals clock a data line held at a level representing the value of the bits. When the count equals the byte, the comparator 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:
BACKGROUND OF THE INVENTION 
     This invention relates to a method of data transmission and in particular to a method of outputting data signals to a printing device. 
     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 sensitized 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. Energization 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 energization or non-energization of the corresponding print element. For example print elements associated with stages loaded with binary one will be energized while print elements associated with stages loaded with binary zero will not be energized. 
     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 30 mm. Consequently such a head is provided with 240 energizable 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 2 ms for a line of 240 data bits and hence the load time is only 8.3 us 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 us. 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 energization 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. 
     SUMMARIES OF THE INVENTION 
     According to one aspect of the invention a method of data transmission comprises representing a multi-bit data message as a plurality of bytes, each byte representing a string of contiguous bits of the message having the same binary value; outputting the bits of the message in a succession of cycles corresponding to the respective bytes by generating in each cycle a train of clock signals corresponding in number to the value of the byte corresponding to the current cycle while setting a data line to a binary value corresponding to the value of the string of bits represented by the current byte. 
     According to a second aspect of the invention a method of data transmission comprises the steps of storing a multi-bit data message as a plurality of bytes, each byte representing a string of contiguous bits having the same binary value; setting a data line to a state representing the binary value of the string of bits represented by a first byte; enabling a source of clock signals; driving a counter with said clock signals and clocking the state to which said data line is set to a data receiving device; disabling the clock signals when the state of the counter corresponds to the first byte; carrying out the aforesaid steps of setting the data line, enabling and disabling the clock signals for each of the bytes after said first byte of the plurality. 
     A preferred use of the methods of the invention is for outputting of print data signals to a printhead, and in particular to a thermal dot printhead. The method may be used in a franking machine for output of print data for effecting printing of a franking impression. 
     The invention also envisages apparatus for carrying out the method. 
     According to another aspect of the invention data transmission apparatus includes a data output line; memory means to store a plurality of data bytes, each byte representing a number of contiguous bits having the same binary value in a string of bits to be transmitted on said data output line; a counter; a source of clock signals; clock means operable to input a train of clock signals from said source to said counter; comparison means; means to output said data bytes from said memory means one at a time sequentially to said comparison means; drive means to hold said data output line selectively at first and second levels representing binary zero and binary one respectively to transmit for each clock signal a binary bit represented by the level of the output line; said comparison means being responsive to the data byte output from said memory means and a count output from said counter and being operative in response to said count being equal to said data byte output from said memory to output a control signal to control the drive means to switch the data output line from one of said first and second levels to the other of said first and second levels. 
     According to a further aspect of the invention data transmission apparatus includes a microprocessor for generating print data to be output to a printer device; a print data output line connecting the printer device to the microprocessor; a memory; said microprocessor being operable in a printing routine to write a plurality of data bytes to said memory representing a string of print data signals to control the printer device to print dots at selected positions in a line, each byte representing a group of contiguous print data signals to be output on said print data line having the same binary value; a counter; a source of clock signals connected to said counter and to said printer device; comparison means; said microprocessor being 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 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 input data byte 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 and in response to said data line control signal to switch the other of said first and second levels; said clock signals being effective in combination with the level of the print data line to input print data signals to the printer device. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     An embodiment of the invention will now be described by way of example with reference to the drawings in which: 
     FIG. 1 is block circuit diagram of a postage franking machine, 
     FIG. 2 is a block diagram illustrating output of print data to the printhead, and FIG. 3 is a flow chart illustrating the steps utilized in outputting print data. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENT 
     Referring first to FIG. 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 utilized 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 energization 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 synchronize 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 energize 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 energization of the elements. Output from the tachometer is utilized to synchronize 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 FIG. 2 and the flow chart of FIG. 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 energization of print elements in dependence upon the loaded print data to effect printing of a line of the required impression. The microprocessor sets a 34 count in storage location equal to the number of bytes representing print data for a line. This count is decremented by unity for each loading of a byte into the comparator. Inspection of the count 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 date transmission may be utilized for transmission of date serially to devices other than print heads.