Abstract:
A method is disclosed in which all patterns to be sewn by an electronic sewing machine are divided into individual unit patterns. Stitch data characteristic of common unit patterns which find application in more than one pattern to be sewn is stored only once in a read-only memory. As a result, wasted space in a read-only memory caused by unnecessary repeated storage of the same stitch data pertaining to common unit patterns is eliminated. This method makes it possible to store more patterns within a read-only memory of a given size and further enables more complicated patterns to be sewn.

Description:
This is a continuation of application Ser. No. 070,048, filed Aug. 27, 1979, now abandoned. 
    
    
     BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     This invention reduces wasted memory in a sewing machine to enable more stitch data to be stored in a smaller memory. 
     2. Description of the Prior Art 
     In a conventional electronic sewing machine which stores stitch data in an electronic memory to produce stitch patterns, and the data are stored in groups, with each group corresponding to one of the patterns. Therefore, even if stitches common to more than one pattern are present, corresponding data are all repeatedly stored in different positions in the memory. This is a waste of memory space. 
     SUMMARY OF THE INVENTION 
     The present invention has been devised to eliminate this defect of the prior art. It is a primary object of the invention to make it possible to store more stitch data in a smaller memory. 
     It is another object of the invention to divide the stitch groups in a specific pattern into a predetermined number of units so that such stitch units may be utilized in a wider scope of patterns. 
     These objects, among others which will appear hereinafter, are achieved by storing stitch data relating to stitches which are common to more than one pattern only once, rather than repeatedly, for use as required. This saves memory space, and allows a greater number of patterns to be produced. 
     The other features and advantages of the invention will be apparent from the following description of the invention with reference to the preferred embodiment as shown in the attached drawings. 
    
    
     BRIEF DESCRIPTION OF THE DRAWING 
     FIG. 1 is a block diagram of the control system in a sewing machine according to the invention; 
     FIG. 2 is a flow chart for explaining the operation of the control system; 
     FIGS. 3a-h are pattern examples; 
     FIGS. 4 and 6 show the relationship between addresses in RAM and the contents thereof; and 
     FIG. 5 shows the relationship between the addresses in ROM and the contents thereof. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     In FIG. 1, ROM is a read-only memory which stores stitch data associated with stitch patterns in first groups and second groups. First groups contain stitch data for stitches used in at least two patterns, and second groups contain stitch data for stitches not so used. ROM further stores program control signals for carrying out later-mentioned programs. CPU is a central processing unit for executing each of the programs. RAM is a random access memory which temporarily stores a process or a result of each program. I/C is an input-output port. PS is a pattern selector which, when a desired pattern is selected by user&#39;s operation of a pattern selecting switch (not shown) on a sewing machine (not shown), latches appropriate information into latch circuit L, which transfers it to central processing unit CPU. PG is a pulse generator which is synchronized with rotation of an upper shaft (not shown) of the sewing machine, and is thus synchronized with vertical movement of a needle bar (not shown). Pulse generator P6 issues pulses at fixed phases (here, the upper dead point and lower dead point of the needle bar) and delivers these pulses to central processing unit CPU so as to read out stitch data stored in read-only memory ROM. LED is a display, and when a pattern is selected by pattern selector PS, central processing unit CPU lights a corresponding light-emitting diode (not shown) in display LED to indicate that pattern selection has taken place. DV is an electric driver for controlling needle swing amplitude and fabric feed, and is usually composed of an electromagnetic device such as a servo-motor and a driving circuit. Driver DV is controlled by stitching signals from central processing unit CPU, which combines some stitch data groups in read-only memory ROM in response to the patterns selected, and which reads out the combined signals from read-only memory ROM in a required sequence. 
     An explanation of the operation of central processing unit CPU will take place with reference to the flow chart shown in FIG. 2 and the pattern examples in FIG. 3. When a power source (not shown) is turned on, a program is started. A flag (or discriminating signal) NX determines if a part of a pattern (such as is shown in FIG. 3-g) is a complete pattern such as is shown in FIG. 3-f (called an A region hereinafter) or is an incomplete pattern such as one shown in FIGS. 3-a-e (called a B region hereinafter). Flag NX is logically high if the pattern is complete, or an A pattern, and is logically low if the pattern is incomplete, or a B pattern. In order to ascertain which pattern has been selected by operation of pattern selector PS, a key matrix (Key) is read out where the pattern selected requires a specific combination of patterns. Then, this combination (namely, the initial address specific to the selected pattern) is designated and is temporarily stored, and its contents (at this initial address) are read out. Namely, assuming as an example that the pattern shown in FIG. 3-g is selected, the initial address designation is an initial address containing stitch data pertaining to repeating signal RET of FIGS. 3-a, b, c, and stitch data representing unit pattern (a) is first read out. As this corresponds to a B pattern and is not a repeating signal RET, the stitch data of (a) stored at the initial address is stored at an appropriate location (Mn) in RAM. Then, stitch data of (c) at an address immediately following the initial address is read out and is stored at location (Mn+1) in RAM. When stitch data of (b) is read out and is stored at RAM location (Mn+2), the stitch data stored at the next address is the repeating signal RET and flag NX is low. Therefore, repeating signal RET is stored at location (MN+3) in RAM. Thus, the table shown in FIG. 4 is created. Stitch data of (a) at location (Mn) in RAM is then stored for subsequent read-out. Stitch data of (a) corresponds to the data controlling needle swing amplitude for producing the first stitching signal 1 in FIG. 3-a. Assume the data to be &#34;al&#34;. Read-only memory ROM stores, as shown in FIG. 5, needle swing amplitude data and fabric feed data alternately with respect to the unit pattern (a) as the initial address of said data (al). It also stores a repeating signal RET&#39;  last. When the initial needle swing amplitude data is read out, it activates needle-swing drive mechanism DV B  upon receipt of a pulse from pulse generator P6, which pulse is issued when the needle is positioned at its upper dead point. Then, N (which is the address of stitch data common to unit patterns a-3) is increased by 1, and the fabric feed data for stitching signal 2 is read out to activate the fabric-feed drive mechanism DV F  when the needle is positioned at its lower dead point. Thus, address N is successively incremented by 1 so as to alternately control needle swing amplitude and fabric feed. When repeating signal RET&#39; is reached, the stitch data of (c) at RAM address (Mn+1) in FIG. 4 is read out. Although stitch data of (c) is not shown there, this stitch data contains that needle swing amplitude data and that fabric feed data (alternately stored in ROM) which will create unit pattern (c). The initial address will contain data for needle swing amplitude (designated by c 1 ) of the stitch No. 1 in FIG. 3-c, and the last address will contain repeating signal RET&#39; in the same manner as in unit pattern (a). The unit pattern (c) is read out in the same fashion as shown in FIG. 5, and the stitches to unit pattern (c) are successively formed. Finally, when repeating signal RET&#39; is reached, unit pattern (b) is read out. When the stitch data of unit pattern part (b) are all read out, the pattern shown in FIG. 3-g is completed. When repeating signal RET&#39; is read out, data at RAM location (Mn+3) in FIG. 4 is read out. Since this data is repeating signal RET, the stitch data of (a) at RAM location (Mn) is read once more, and the pattern in FIG. 3-g is repeatedly formed. The stitch data of (c) in FIG. 4 may be replaced by stitch data of the pattern in FIG. 3-d or 3-e, to produce different patterns by the same method. 
     In this connection, it is possible to produce a pattern such as is shown in FIG. 3-h by a combination of the pattern in FIGS. 3-f and 3-g. The pattern in FIG. 3-f is complete in itself and may be divided into unit patterns. Assume that the pattern in FIG. 3-f is composed of unit patterns (i) and (j), though they are not shown. The initial address in RAM contains repeating signal RET of the patterns shown in FIGS. 3-a, 3-c, 3-f, and 3-b, and stitch data representing unit patterns (a) and (c) are read out in the same fashion as mentioned above and are stored at addresses (Mn) and (Mn+1) of RAM, while stitch data representing pattern (f) is read out. Since pattern (f) is an A-region, its initial address, i.e., location (Mn+1) in RAM is itself stored as (Y). Thus, the stored data [representing pattern (f)] at this initial address is used as a new initial address to bring flag logically low. When stitch data of (i) at said initial address [representing pattern (f)] is read out the stitch data of (i) is stored at RAM location (Mn+2) since it corresponds to a B-region, and when stitch data of (j) is similarly stored at RAM location (Mn+3), repeating signal RET is subsequently read out. Since flag NX is now high address (Y) is incremented in order to read out and store unit pattern (b), and this incremented address (Y) is then used as an initial address. Flag NX is brought low to read out stitch data of (b) and to store it at RAM location (Mn+4). The subsequent RAM address contains repeating signal RET, and since flag NX is low, repeating signal RET is stored at RAM location (Mn+5). Thus a table shown in FIG. 6 is created in RAM and pattern in FIG. 3-h is repeatedly stitched in the same manner as was discussed in connected with FIG. 5. Although the pattern (f) in FIG. 3-h here intervenes between unit patterns (a), (c) and (b), it may be positioned last. In this latter case, it is sufficient to store a repeating signal RET after stitch data of (i), (j) and RET, which last is the initial address of the code representing pattern (f). Since flag NX is high while repreating signal RET is read out, Y is incremented. When the former repeating signal RET is read out, flag NX is low and signal RET is, therefore, stored in RAM. It is, therefore, possible to form a pattern with pattern (f) last. 
     Since each of the unit patterns for composing the pattern in FIG. 3-g can be read out from the same location in ROM in order to produce the pattern in FIG. 3-h, utilization of space in ROM is increased. It is thus possible to form more patterns using a smaller ROM and pattern control is easy. Data stored in ROM need not be limited to the pattern formed by the signals controlling needle swing amplitude and fabric feed, and could be machine control signals utilized to produce more complicated patterns by moving and controlling an embroidering frame, to thereby enable one to combine far greater numbers of unit patterns. 
     It will be understood that each of the elements described above, or two or more together, may also find a useful application in other types of constructions differing from the types described above. 
     While the invention has been illustrated and described as embodied in a method of storing stitch data in and producing stitches from an electronic sewing machine, is it not intended to be limited to the details shown, since various modifications and structural changes may be made without departing in any way from the spirit of the present invention. 
     Without further analysis, the foregoing will so fully reveal the gist of the present invention that others can, by applying current knowledge, readily adapt it for various applications without omitting features that, from the standpoint of prior art, fairly constitute essential characteristics of the generic or specific aspects of this invention.