Electronic dictionary with plug-in module intelligence4218760Abstract A portable electronic dictionary in a hand-held housing which mounts a plurality of alpha-numeric displays and a keyboard. A plug-in module contains a microcomputer and a ROM which stores a plurality of pairs of sequences of alpha-numeric characters and is searched by a central processing unit in the microcomputer under instructions stored as firmware in another ROM forming part of the microcomputer. One sequence of each stored pair is compared with a sequence which is entered into the keyboard and stored in a RAM also forming part of the microcomputer until a match is found. After one or more sequences have been entered into the keyboard and locations of matching pairs are stored in the microcomputer RAM, the pairs of stored sequences can be rolled across the display. Either sequence of each pair can be compared with a sequence entered into the keyboard. Claims What is claimed is: Description The invention relates to a portable, self-contained information storage apparatus into which a sequence of alpha-numerical characters can be entered via a keyboard and an associated stored sequence of characters displayed, e.g., defining a foreign language translation of an entered word.
______________________________________
Designation Function
______________________________________
GND Circuit ground potential.
Vcc + 5V supply voltage.
P0-0-P0-7 (port 0)
8-bit bidirectional port.
P1-0-P1-7 (port 1)
8-bit bidirectional port.
P4-0-P4-7 (port 4)
8-bit bidirectional port.
P5-0-P5-7 (port 5)
8-bit bidirectional port.
RS Input which is used to
initialize a processor.
X1 One side of crystal input
for internal oscillator 240.
X2 Other side of crystal
input.
______________________________________
The read/only memory (ROM) 320 stores the translation or dictionary table which microcomputer 330 searches for a matching entry. Each entry is a pair of alpha-numeric sequences, the first sequence always being called hereinafter the source and the second always being called hereinafter the translation. Both sequences can be displayed following a match as described below. Microcomputer 330 may search either the source sequences or the translation sequences upon an appropriate command, for a match to the entered sequence. In the preferred embodiment, the sequences being searched appear first followed by the other sequences. The source sequences that begin with the same letter, together with the other sequences of the pairs are grouped in adjacent locations in ROM 320. In the preferred embodiment, ROM 320 is the MK 36000 by Mostek, a 65,536 bit read/only memory organized as 8,192.times.8 bits. Any other ROM organized in a manner compatible with the particular microcomputer 330 and containing sufficient memory for the particular purpose may be used. Plug-in module 150 including circuitry 300 and housing 500 is a small assembly which is easily plugged into and removed from hand-held housing 400 by means of connector 214 without the use of tools. The plug-in modules are made easily replaceable since it is contemplated that the unit can be changed from one pair of languages or type of dictionary to another by simply changing the plug-in module, e.g., from English/Spanish to German/Italian. Thus, each language or dictionary table may require a unique plug-in module. As illustrated in FIG. 1 address lines PO-0-P0-6 and P5-0-P5-5 select one of the locations of ROM 320. Line P0-7 enables ROM 320 so that the contents of the location selected on the address lines will appear on lines P1-0-P1-7 to be read by microcomputer 330. Keyboard-display circuitry 200 detailed in FIG. 2 consists of decoders 214 and 217, 16 character, 16 segment alpha-numeric LED displays 212, 33 position keyboard 210, buffer 216, and startup circuitry consisting of resistor 218 and capacitor 220. The RS signal is generated by the RC startup circuit, resistor 218 and capacitor 220, or by depression of clear key 412 of keyboard 210 in FIG. 4. Upon initial energization, capacitor 220 shorts the RS line to ground for a period sufficient to cause the resetting of microcomputer 330. As detailed below, the reset signal on the RS line prepares microcomputer 330 for operation and causes the entry of a given message identifying the contents of plug-in module 150, e.g., English/French, in displays 212. The signals on lines P1-0-P1-5, P4-0-P4-5 and RS are transferred through connector 214 between module circuitry 300 and display-keyboard circuitry 200. Circuitry 200 is entirely controlled by microcomputer 330. Lines P1-0-P1-5 carry the ASC II equivalent of the character to be written in displays 212 from microcomputer 330 in order to update the displayed characters. Displays 212 may be any alpha-numeric displays well known in the art, but in the preferred embodiment, are the 4 character by 16 segment LED displays model DL-1414 manufactured by Litronix. These preferred displays have a built-in memory for storing the characters currently being displayed, a built-in character generator from the ASC II code, and built-in multiplex and LED drive circuitry. Obviously, these functions can be performed by external components within the scope of this invention. The signal on line P1-5 is also inverted in buffer 216 and applied to the display. Buffer 216 may be any hex buffer with at least one buffer enabled by one line and at least four buffers enabled by a second line, but in the preferred embodiment is the CMOS hex buffer Model MM80C97 manufactured by National Semiconductor. This particular chip is a tri-state chip in that the outputs may be made to appear open to the remainder of the circuit. When line P1-5 becomes high, the buffers connected between pins 12 and 13 and between pins 14 and 11 are disabled, so that as a result of resistor 222 connecting terminals 11 and 13 to ground, terminals 11 and 13 appear to be grounded. When P1-5 becomes low, the buffers connecting pin 12 to pin 13 and pin 14 to pin 11 become active, and since pins 12 and 14 are connected to Vcc, the signal on pins 11 and 13 become high. Thus, the voltage on pins 11 and 13 represents the inverted signal on line P1-5. Lines P4-4 and P4-5 select which of ROM 320, displays 212 and keyboard 210 communicates with microcomputer 330. If the signals on both P4-4 and P4-5 are high, ROM 320 may supply data to microcomputer 330. If the signal on line P4-5 is low, microcomputer 330 supplies data on lines P1-0-P1-5 to the displays 212. If the signal on line P4-4 is low, buffer 216 is enabled, and microcomputer 330 accepts data on lines P1-0-P1-5 from the keyboard. Decoders 214 and 217 control this selection process. These may be any BCD to decimal decoders, but in the preferred embodiment are the model MM74C42N CMOS 4 bit BCD to 10 bit decimal decoder manufactured by National Semiconductor. When the signal on line P4-5 is high, the utilized outputs of decoder 214 are high, thus prohibiting the transfer of new data to displays 212. When the signals on line P4-4 is high, the utilized outputs of decoder 216 are high. The selection of the particular display of the four display chips 212 also takes place within decoder 214. Each of the four possible signal level combinations on lines P4-2 and P4-3 enable the the signal on one of the four output lines of decoder 214 to become low, thus enabling the display chip 212 to which it is attached. The signal on lines P4-0 and P4-1 are applied to each of the four display chips 212 and select which character within each display is selected. The 16 characters which are displayed at any one time are stored in a read/write memory in each of display chips 212. Since refresh and character generation functions are accomplished by each display chip 212 internal circuitry, microcomputer 330 need only write new information into display chips 212 when the 16 display characters require modification. The keys on keyboard 210 are selected for interrogation through a row-column technique. The particular row to be interrogated (R0-R7) is selected by the output of decoder 217. For any particular combination of high and low signals on lines P4-0-P4-2, one of the eight utilized output lines of decoder 217 becomes low, thus selecting the particular row to it is attached. As stated above, this row selection takes place upon the occurrence of a low signal on line P4-4. Keyboard columns C0-C3 are transferred through buffer 216 back to microcomputer 330 on lines P1-0 - P1-3. Buffer 216 is also enabled by a low signal on line P4-4. As is illustrated in FIG. 3, keyboard 210 is arranged electrically as a 8.times.4 array with CLEAR key 412 separately generating the RS signal. Sequences of alpha-numeric characters and commands can be entered into the keyboard by sequential key manipulation. A signal is applied from microcomputer 330 on lines P4-0 - P4-2 to select each row in keyboard 210 in turn. If a key in that row is depressed while the row is selected, the signal will be fed back through buffer 216 on one of lines P1-0 - P1-3 to microcomputer 330 for storage in RAM 234. II. DESCRIPTION OF GENERAL OPERATION The firmware for the microcomputer system is a code pattern stored in microcomputer 330 program memory ROM 232 which provides for the intelligence of the unit, such as keyboard handling, display update and control, word translation search, and calculation. The firmware can be divided into three main categories: the interrupt service, the main line program, and the code or translation tables. As mentioned above, the translation table is stored in ROM 320. Each entry in the table is comprised of a pair of alpha-numeric sequences: the first sequence referred to as the source e.g., an English word, and the second sequence referred to as the translation. Each ROM 320 entry may represent either a word or a phrase. The entries having a source beginning with the same letter are grouped adjacently within ROM 320. Each sequence of alpha-numeric characters is followed by a word mark, i.e., both between sequences of one entry and between entries. The end of the translation table is followed by at least two word marks. To look up a source word or phrase, microcomputer 330 sequentially checks each of the words starting with the particular letter. A table in on-chip ROM 232 stores the ROM 320 tanslation table locations whereat entries with sources having a particular first letter begin. Thus, the first character of the entered word is compared to the on-chip ROM 232 table to determine the location in the ROM 320 translation table where source words or phrases beginning with that character first appear. The second character of the entered word is compared to the second character of the first source having the particular first letter. If there is a match, then the next character is checked, etc. If all the characters match, then the ROM 232 translation table location of the source is retrieved and stored within RAM 234 for later accessing. If a character does not match, then microcomputer 330 checks the first character of the next source and continues until a complete match is found or the table is exhausted. If no match is found after the entire table is search, "NOT FOUND" is displayed. One important feature of the present invention is that the dictionary may be reversed, i.e., a foreign word may be typed in, the device will search for that word in the second half or translation of each pair of sequences and if a match is found, the "source" will be displayed. To look up a word when the dictionary is reversed, the system checks each of the bytes of each of the words stored entries in sequence. The first character of the entered word is compared to the first character of the stored translation. If there is a match, then the second character is checked, etc. If all the characters match, then the ROM 232 translation table location of the entry is retrieved and stored in RAM 234 for later accessing. If a character does not match, then the microcomputer 330 checks the first character of the next translation and continues until a complete match is found or the table is exhausted. If no match is found after the entire table is searched a "NOT FOUND" message is displayed. An internal interrupt service controlled by oscillator and internal timer 240 and crystal 310 interrupts microcmputer 330 approximately once every millisecond. At that time, a counter controlling the scrolling feature of the display is decremented and a row of the keyboard is scanned in order to detect the depression of a key in that row. The keyboard is entirely controlled by the firmware program as described above. Each entered key is debounced, translated from a row and column representation into an internal code set and then made available to the main line program. The main line program, permanently stored as firmware in ROM 232, performs the intelligent functions of the system. This program selects the current function, based on the last entered function key, accepts data keys, places data into the display, performs word translation, and scrolls the display. FIG. 4 illustrates suitable arrangement of the alpha-numeric and command keys. Microcomputer 330 is reset by turning on the device or depressing clear key 412. Upon reset, the display, all pointers, all keyboard storage and all flags are cleared. The interrupt timer is started and the title of the module is displayed. Depression of backspace key 414 immediately after reset, reverses the half of the pairs of sequences in ROM 320 which will be searched. This reversal is indicated on the display by a reversal of the title halves. For example, if the display initially reads, "English/Spanish" and backspace key 414 is depressed, the display will read "Spanish/English." When data is being entered into the device, the user may either enter additional data into the display, terminate the word being entered, or select a different mode of operation. Data is entered into the display by indexing the desired keys. The displayed characters will shift one position to the left and the indexed character is inserted on the right. When backspace key 414 of FIG. 4 is entered, the displayed characters are shifted one position to the right, and the right-most character is lost. When space key 416 is operated, a space is entered on the display. When step key 418 is depressed, the displayed word is terminated, and will then be searched for in the ROM 320 translation table. If it is not found, the words "NOT FOUND" will be displayed; otherwise, the ROM 320 location of the match will be stored in the ROM address storage area or word table of RAM 234, and the address storage index in RAM 234 will be incremented The word count points to a location in the RAM 234 word table where either the ROM 320 address of the word curently being retrieved is stored, or the ROM 320 address of the next match will be stored. When definition key 420 is entered, the words previously entered are displayed, followed by their translations in a scrolling fashion. If a word has been entered into the display, it will be processed in a manner similar to if step key 418 had been epressed prior depression of definition key 420. After definition key 420 has been depressed, depression of step key 418 steps the entries and matched translations, in that order, through the display a word or phrase a time. Depression of function key 424 produces a promotional message on the display. Depression of query key 422 opens the dictionary to words or phrases beginning with the displayed entry. Step key 418 may then be depressed to increment the dictionary to the next pair of alpha-numeric sequences having a source beginning with the displayed entry. A second depression of query key 422 causes the translation of the displayed single word or a phrase. If the dictionary search is extensive, "SEARCHING" is displayed. When no entry is made in the device for about 30 seconds, a row of decimal points are displayed across displays 212 in order to converse power. Any entry made after the decimal points appear will recall to the display, entries made after the last depression of step key 418. In operation, upon turning on the device, the title of the module is displayed. Depression of backspace key 41 will cause the dictionary to be reversed. For example, if upon turning on the device "English/Spanish" is displayed, English words may be entered and the equivalent Spanish words will be displayed. Depression of the backspace key 414 will cause "Spanish/English" to appear in the display. Spanish words may then be entered and their English equivalents will be displayed. In order to correct an entry, backspace key 414 may be depressed until the error is removed from the right side of the display. The proper entry may then be typed. The entire word or phrase to be translated need not be entered in its entirety. For example, the first few letters of the first word may be entered. Depression of query key 422 opens the dictionary to words or phrases beginning with those few letters. Depression of step key 418 displays the next word in ROM 320 which begins with the same letters. Further depression of step key 418 produces the succeeding entries in ROM 320 which begin with the same letters. A second depression of query key 422 causes the displayed word or phrase to be translated. If the translation is not found, "NOT FOUND" is displayed after the search. As indicated above, phrases not stored as a single ROM 320 data table entry may be translated. After entry of a word or phrase, step key 418 is depressed, causing that particular word or phrase to be searched. If a match is found, the TOM 320 location of the match in is stored in the word table of RAM 234. The next word or phrase is then entered and the step key is again depressed causing this word or phrase to be searched. The query function may also be utilized in this translation process. The first few letters of a word may be entered, after which query key 422 may be depressed. Step key 418 may then be depressed until the desired word appears in the display. The next word in the phrase to be translated may then be entered. After the last word in the phrase is entered, definition key 420 is depressed, causing the entire entered phrase and its translation to scroll through to the display. That is, the display will be constantly moving, similar to a theatre marquee, with the entire source and then the entire translation entering from the right and exiting from the left. Definition key 420 may again be depressed in order to scroll the source sentence and its translation through the display. Depression of step key 418 will cause one word at a time from first the source and then the translation to shift into the display as the previous contents are shifted out. III. FIRMWARE DESCRIPTION FIGS. 5 through 13b represent the steps that microcomputer 330 takes to carry out the functions of the electronic dictionary. FIG. 5 represent the INTERRUPT subroutine that controls the scrolling mode and services the keyboard. Upon the occurrence of an interrupt signal from oscillator and interrupt timer 240 (which occurs approximately once every millisecond) the INTERRUPT subroutine is entered. The current state of microcomputer 330 is saved so that microcomputer 330 may go back to what it had been doing before the interrupt. A location in RAM 234 of microcomputer 330 called "tikker" stores a count. This count is decremented with each interrupt. As will become clear below, this count called "tikker" controls the scrolling and the display power saving functions. After tikker is decremented, the keyboard flag is retrieved from the appropriate location in RAM 234. The keyboard flag indicates whether a key was detected as being held down during any one of the last eight INTERRUPT subroutines. If the keyboard flag does not indicate that the keyboard is active, the keys are read in the row next to the row that was most recently read. CPU 238 then determines whether any of the keys in that row are depressed. If none of the keys are depressed, the state of microcomputer 330 is restored and the INTERRUPT subroutine is left. If a key is depressed, the row in which the key is located is stored in a location in RAM 234, and the particular key is translated by means of the row and column lines indicated as active. This particular key is saved in a location in RAM 234 called "buffer". The keyboard flag is also set active, the state of microcomputer 330 is restored and the INTERRUPT subroutine ends. If the keyboard flag was active, the active row is retrieved from RAM 234. CPU 238 then determines whether the row about to be read is indeed the row that was previously active. Obviously, this will not occur until the seven rows after the active row have been read. Thus, the row which was active will not be the row presently being read until eight INTERRUPT routines after the particular row was determined as being active. If the current row being considered is not the row that was previously active, the state of microcomputer 330 is restored and the INTERRUPT subroutine ends. If the row being considered is the row that was previously active, microcomputer 330 determines whether the key that was stored in "buffer" is still depressed. If it is, the state of microcomputer 330 is restored and the INTERRUPT subroutine is exited. If the key is still depressed, it would be improper to enter that same character again (or any other character) so that two characters would be displayed. If the key has been released, the keyboard flag is reset to indicate the key has been released and the keyboard is inactive, the state of microcomputer 330 is restored and the INTERRUPT subroutine is exited. FIG. 6 represents the CLEAR subroutine which is entered whenever microcomputer 330 is reset. This happens whenever clear switch 412 is depressed or whenever the unit is turned on. Upon entry into the CLEAR subroutine, the interrupt service is disabled. The RAM 234 word table wherein ROM 320 locations of matches are stored is cleared. The location in RAM 234 that stores the number of characters currently being displayed, i.e., the character count, the display and the buffer, which stores keyboard entries, are cleared. Furthermore, all of the flags to be discussed below are cleared, except the source flag which indicates which half of each pair of sequences is to be searched. For example, with the English/Spanish plug-in module, if one has reversed the dictionary so that Spanish words are being searched, it has been found undesirable that this should revert back so that English is being searched upon depression of the clear key. Thus, the source flag is not reversed. Next, oscillator and interrupt timer 240 is loaded and started so that the first interrupt will occur approximately one millisecond therefrom. The title of the particular plug-in module is then displayed. As indicated above, the source flag determines which of the pair of alpha-numeric sequences is searched. If the source flag is "0", the first portion of each pair of sequences is searched, but if the source flag is "1" the second half of each pair of sequences is searched. If CPU 238 determines that the source flag is equal to "1", the two portions of the title are reversed. That is, if the title is "English/Spanish", the portions of the title are swapped so that the display reads "Spanish/English". If the source flag is not "1", obviously the portions of the title are not reversed. As mentioned above, if an entry is not made in approximately 30 seconds, a series of decimal points appear across the display. The time at which this occurs is controlled by a location in RAM 234 storing a count called "delay". At this point in the CLEAR subroutine, the delay counter is loaded. As will be described below, at particular instances, the counter is decremented. When the delay counter is decremented to "0", the display is cleared and the decimal points appear. After delay is loaded, microcomputer 330 returns to the MAIN subroutine. The MAIN subroutine, illustrated in FIGS. 7a, 7b, and 7c, controls the operation of microcomputer 330 when a key is depressed, and also controls the scrolling action of the display. As indicated in FIG. 7a, when the MAIN subroutine is entered, CPU 238 retrieves the contents of the keyboard buffer location in RAM 234 to determine if a new key has been pressed. If a new key has not been pressed, CPU 238 then determines whether the scroll flag is set. The scroll flag is set while the display is scrolling. If the scroll flag is not set, CPU 238 then determines whether tikker equals "0". As indicated above, tikker is a counter utilized to increment the scrolling function. Tikker counts down to "0" approximately four times a second at which time the display is shifted. If tikker does not equal "0", CPU 238 returns to the beginning of the MAIN subroutine. If tikker does equal "0", CPU 238 then decrements delay. As indicated above, delay is a location in RAM 234 which contains a count, which when decremented to "0", causes the display to be cleared and decimal points to appear to save power. As is evident from this portion of the flow chart, the delay is decremented each time tikker equals "0" and the scroll flag is not set. After delay is decremented, CPU 238 then determines whether delay is "0". If it is not, CPU 238 returns to the beginning of the MAIN subroutine. If delay is "0", the display is cleared and decimal points appear across it. CPU 238 then returns to the beginning of the MAIN subroutine. If the scroll flag has been set, such as when the device is scrolling, CPU 238 determines whether tikker is "0". If tikker is not "0", the characters are not ready to be shifted to the next display position, and CPU 238 returns to the beginning of the MAIN subroutine. If tikker is "0", the characters are ready to be shifted and the next character to be displayed is obtained. CPU 238 then determines whether this character is a word mark. If it is not, this next character is shifted into the display and CPU 238 returns to the beginning of the MAIN subroutine. If the next character is a word mark, a space is shifted into the display. CPU 238 then determines whether there are any more words to be displayed. As will be recalled, a pointer in RAM 234 called word count points to another location in RAM 234 which stores the location in ROM 320 where the translation for that particular word was found. As words are entered, word count is incremented to the next RAM 234 word table location which will store the ROM 320 location of a match. As the matches are scrolled through the display, word count indicates the RAM 234 word table location storing the ROM 320 location from which the word currently being displayed was retrieved. CPU 238 compares the number of words that have already been displayed with the maximum word count while words were being entered. If there is a difference then there are more words to be displayed. If the difference is not "0", CPU 238 causes word count to point to the next RAM 234 word table location to determine the next character to be displayed and that address is loaded. In addition, CPU 238 determines whether the source flag is "1", i.e., whether the second half of each pair of sequences is being searched. If the source flag is not "1", the first half of each pair of sequences is being displayed and CPU 238 returns to the MAIN subroutine. If the source flag is "1", then the second half of each pair of sequences is being displayed, so that CPU 238 scans past the word mark separating the two halves of the next matching pair of sequences (as indicated by word count) in order to reach the beginning of the second half of the sequence. CPU 238 then returns to the beginning of the MAIN subroutine. If there are no more words to be displayed, the pass and source flags are complemented. Initially, the pass flag is "0". After the end of all the words of a given language, the pass flag is complemented or made equal to "1". After all the words of the second language have been displayed, the pass flag again is complemented so that it equals "0". Thus, the pass flag is "0" only after both halves of the pairs of matching sequences have been displayed. After the pass and source flags have been complemented, CPU 238 determines whether the pass flag is "0". If it is not, indicating that only the entered words have been displayed, an equal sign and a space are shifted into the display and CPU 238 again determines whether the source flag is "1". If the source flag is not "1", the first half of each pair of sequences are being displayed, so that CPU 238 may return to the beginning of the MAIN subroutine with no further action. If source does equal "1", the second half of the pairs of matching sequences are being displayed, and CPU 238 scans past the intermediate word mark between each sequence of a pair in order to arrive at the characters to be displayed. CPU 238 then returns to the beginning of the MAIN subroutine. If the pass flag was "0", the scrolling of the entered words followed by their translation has been complete. The scroll flag is reset indicating the end of a scroll function, and CPU 238 returns to the beginning of the MAIN subroutine. The above description relates to the case where no new key was pressed. If CPU 238 determines that a key code has been placed in keyboard buffer in RAM 234, the scroll flag is reset as illustrated in FIG. 7b. The scroll function automatically ends upon the depression of a key. Delay is reloaded, since a key has been depressed and the 30 second time period begins to run again. CPU 238 then transfers the key code from keyboard buffer in RAM 234 to a different location in RAM 234. CPU 234 then determines if the key pressed is backspace key 414. If it is, CPU 238 then determines whether the cleared flag is set. If it is set, then, as discussed above, the dictionary is reversed by means of the second half of the CLEAR subroutine in FIG. 6. The source flag is complemented, the title is displayed, and if the source flag equals "1", the ends of the titles are switched. Delay is loaded and CPU 238 returns to the MAIN subroutine illustrated in FIG. 7a. If the cleared flag was not set, CPU 238 enters the BACKSPACE subroutine as illustrated in FIG. 10 and discussed below. If the backspace key was not pressed, then since another key has been entered, the cleared flag is reset. CPU 238 then determines whether function key 424 has been depressed. If it has, the FUNCTION subroutine, illustrated in FIG. 8 and as discussed below, is entered. If function key 424 was not depressed, CPU 238 then determines whether definition key 420 has been depressed. If it has, the TRANSLATE subroutine, illustrated in FIG. 12 and discussed below, is entered. If definition key 420 was not depressed, CPU 238 then determines whether step key 418 has been depressed. If it has, the STEP subroutine, illustrated in FIGS. 11a and 11b and discussed below is entered. If step key 418 has not been depressed, CPU 238 then determines whether the translation flag is set. The translation flag is set when definition key 420 is depressed. If the translation flag is set, CPU 238 returns to the main subroutine. If CPU 238 reaches this portion of the MAIN subroutine, only query key 422 or one of the alpha-numeric keys could have been depressed. Once definition key 420 is depressed, it is not desirable that any more data or that the query mode be entered. Therefore, CPU 238 basically ignores the key that was depressed and returns to the beginning of the MAIN subroutine. If the translation flag was not set, CPU 238 then determines whether query key 422 has been depressed. If it has, the QUERY subroutine, illustrated in FIG. 9 and discussed below, is entered. If the query key 422 has not been depressed, one of the alpha-numeric keys must have been depressed. As illustrated in FIG. 7c, CPU 238 first determines whether the query flag is set. As discussed above, to utilize the query feature of the device, a portion of a word or phrase is entered and query key 422 is depressed, thus setting the query flag. Step key 418 is then depressed repeatedly until the desired word appears. In order to continue building a sentence to be translated, the next word is then simply entered, without the depression of any key after the last depression of step key 418. Thus, entry of a character when the query flag is set indicates that a new word is being entered and that the query mode is being left. Thus, if the query flag is set, CPU 23B first determines whether eight words have already been entered. In the preferred embodiment, a maximum of eight words may be translated at one time. If eight words have been entered, "SENTENCE FULL" is displayed, and CPU 238 returns to the beginning of the MAIN subroutine without entering or displaying the new character. If eight words have not already been entered, word count, which points to the place in RAM 234 word table where the next ROM 320 address of the next match will be stored, is incremented to point to the next word table location to be filled with a ROM 320 address. The character count and the display are then cleared. CPU 238 then continues as if the query flag has not been set. The character count is obtained, and CPU 238 determines whether the count is "0", thus indicating that this is the first character of a word being entered. If the character count is not "0", CPU 238 then determines whether the character count is 16, or whether the display is full. If the character count does equal 16, the new character is shifted into the display, thus losing the lefthand character, and CPU 238 returns to the beginning of the MAIN subroutine. If the character count is not 16, the character count is incremented, the character is shifted into the right side of the display, and CPU 238 returns to the beginning of the MAIN subroutine. If the character count is "0", the entered character is the first letter of a new word. The display, translation flag and query flag are cleared, the character count is incremented, and the new character is shifted into the righthand side of the display. CPU 238 then returns to the beginning of the MAIN subroutine. FIG. 8 illustrates the steps taken by CPU 238 when the FUNCTION subroutine is entered by depression of function key 424. Quite simply, a promotional message is displayed and CPU 238 returns to the MAIN subroutine illustrated in FIG. 7a. FIG. 9 illustrates the QUERY subroutine, entered when query key 422 is depressed. CPU 238 first determines whether the query flag has already been set. If it has not, the query flag is set and CPU 238 jumps to the middle of the STEP subroutine to be described below and as is illustrated in FIG. 11b. In this portion of the STEP subroutine, a search is performed for the entered characters by entering the SEARCH subroutine illustrated in FIG. 13a and if a match is found it is displayed. If the query flag has already been set, query key 422 has been depressed a second time within the same query mode. As was related above, if the query flag is set and query key 422 is depressed a second time, a translation is displayed of the word found in the search. Thus, the pass flag is complemented to indicate that the other sequence of the matching pair will be displayed, that particular sequence of the matching pair is displayed, and the pass flag is again complemented so that normal operation may resume. CPU 238 then returns to the MAIN subroutine illustrated in FIG. 7a. FIG. 10 illustrates the BACKSPACE subroutine which is entered by depression of backspace key 414 when the key most recently depressed was not clear key 412. A space is entered on the left side of the display, and the characters in the display are shifted one space to the right so that the righthand character originally on the far right is lost. The character count is obtained and if it is not "0", it is decremented. CPU 238 then returns to the MAIN subroutine illustrated in FIG. 7a. If the character count is equal to "0", no characters are in the display, so that the character count need not be decremented and CPU 238 returns directly to the MAIN subroutine illustrated in FIG. 7a. Step key 418 is a multifunction key. The particular function it performs depends on the state of the device. First, when a word or phrase is being entered into the device, step key 418 is depressed to indicate the end of the particular word or phrase. That particular word or phrase is then searched in ROM 320 translation table. Second, after a sentence has been entered and definition key 420 depressed, the entry and the translation will scroll through to the display. Depression of step key 418 will cause the scrolling mode to be ended and the next word to be displayed in the sequence will flash on the display. Further depression of step key 418 will cause the succeeding words of the entry and translation to be stepped through the display. Third, after query key 422 has been depressed, depression of step key 418 will cause the ROM 320 translation table to be searched for the next entry which matches the letters that have been entered. Upon finding a match, it is displayed. The STEP subroutine illustrated in FIGS. 11a and 11b perform these three functions when step key 418 is depressed. As illustrated in FIG. 11a, CPU 238 first determines whether the translation flag is set, thus indicating that step key 418 is to perform the second function detailed above. As illustrated in FIG. 11b, if the translate flag is set, word count is obtained. As will be recalled, word count is a pointer to RAM 234 word table locations storing ROM 320 locations with previous matches. As the entries and their matches are being displayed, the word count points to the table location storing the ROM 320 location whose contents are currently being displayed. CPU 238 determines from word count whether the last word table location storing a ROM 320 location is being pointed to by word count. If it is, all of the words of either the entry or the translation have been displayed, and the other of either the entry or the translation must be displayed. Accordingly, CPU 238 clears word count so that the first word table location is being pointed to, and the pass flag is complemented to indicate that the other halves of the pairs of sequences are to be displayed. The word stored in ROM 320 at the location indicated by the RAM 234 location pointed to by word count is displayed, delay is loaded and CPU 238 returns to the MAIN subroutine indicated in FIG. 7a. If the last RAM 234 location is not being pointed to by word count, word count is incremented and the word stored in the ROM 320 location indicated at the word table location pointed to by word count is displayed, delay is loaded and CPU 238 returns to the MAIN subroutine indicated in FIG. 7a. As indicated in FIG. 11a, if the translation flag is not set, CPU 238 then determines whether the query flag is set. If it is, step key 418 has been depressed to accomplish the third function defined above--namely, to search for and display words beginning with the letters entered. Thus, as illustrated in FIG. 11b, if the query flag is set, CPU 238 searches the ROM 320 data table by entering the SEARCH subroutine illustrated in FIG. 13a. This searching step is also the first step performed by CPU 238 in the QUERY subroutine after the query flag is set if the query flag had not previously been set. If a match is not found, there are no more matches in ROM 320, thus the query mode has been finished unsuccessfully. "NOT FOUND" is displayed, the query flag is reset and CPU 238 returns to the MAIN subroutine illustrated in FIG. 7a. If a match is found, the location of the match in ROM 320 is stored in the word table located in RAM 234 pointed to by word count. The display is cleared, and the word that has been found is displayed. CPU 238 then returns to the MAIN subroutine illustrated in FIG. 7a. If neither the translation flag nor the query flag have been set, step key 418 has been depressed to perform the first function set out above--namely, to indicate the end of a word or phrase and to cause a search to be performed for that word or phrase. As indicated in FIG. 11a, CPU 238 first determines whether the character count is "0". If it is, there are no characters in the display so that there is nothing to search. "NOT FOUND" is displayed, the character count is cleared and CPU 238 returns to the MAIN subroutine in FIG. 7a. If the character count is not "0", a search is performed by entry into the SEARCH subroutine illustrated in FIG. 13a. If a match is not found, "NOT FOUND" is displayed, the display and the character count are cleared and CPU 238 returns to the MAIN subroutine in FIG. 7a. If a match is found, the ROM 320 address of the match is stored in the RAM 234 word table location indicated by word count. Word count is then obtained by CPU 238 which determines whether the ROM 320 location of eight matches (including the most recent match) have been stored. If there have been "FULL SENTENCE" is displayed, the character count and the display are cleared and CPU 238 returns to the MAIN subroutine in FIG. 7a to determine if another key has been depressed--typically definition key 420. If eight ROM 320 addresses have not already been entered in the word table, word count is incremented to point to the next word table location table which will store the ROM 320 address of the next match, the character count and the display are cleared, and CPU 238 returns to the MAIN subroutine of FIG. 7a to determine if a new key has been depressed. In this case, the next key is typically either an alpha-numeric character or definition key 420. The TRANSLATE subroutine illustrated in FIG. 12 is entered by depression of definition key 420. Upon entry into this subroutine, CPU 238 first determines whether the translation flag is set, indicating that definition key 420 was the key most recently pressed. A user would press definition key 420 a second time in order to have the entered sentence and its translation scrolled again through the display. Thus, if the translation flag is set, CPU 238 sets the scroll flag and returns to the MAIN subroutine of FIG. 7a. If the translation flag is not set, CPU 238 sets the scroll flag, determines if the character count is "0". As will be recalled from above, in the process of entering a sentence for translation, step key 418 is depressed after the entry of each unit to be searched. Step key 418 may be depressed after the last word is entered and before definition key 420 is depressed. As discussed above, with respect to the STEP subroutine illustrated in FIG. 11a, the display and character count are cleared by depression of step key 418. Therefore, if translation key 420 is then pressed, there are no characters in the display and the character count would be "0". In this instance, CPU 238 sets the translation flag, clears word count so that it points to the RAM 234 location in which is stored the ROM 320 address of the first match, and returns to the MAIN subroutine illustrated in FIG. 7a. As related above, after the entry of the last word to be translated, step key 418 need not be depressed. Translation key 420 may be depressed immediately after entry of the last word. In this situation, the character count does not equal "0". Upon this determination, CPU 238 performs a search for the displayed word by entering the SEARCH subroutine illustrated in FIG. 13a. If a match is not found, "NOT FOUND" is displayed, the character count is cleared and CPU 238 returns to the MAIN subroutine in FIG. 7a. If a match is found, the ROM 320 address of the match is saved in the word table portion of RAM 234 pointed to by word count. The translation flag is set and word count is cleared so that the word table location of the ROM 320 address of the first match is pointed to so that CPU 238 may immediately obtain the contents of the ROM 320 address in the first word table location so that the first word to be matched may be displayed in the scroll mode. CPU 238 then returns to the MAIN subroutine in FIG. 7a. FIGS. 13 and 13b illustrate the SEARCH subroutine which may be entered from either the STEP subroutine or the TRANSLATE subroutine. As illustrated in FIG. 13a, upon entry of the SEARCH subroutine, "SEARCHING" is displayed, and count and ports are loaded. Count is a location in RAM 234 which stores the number of characters in the word being searched. This is a copy of character count. During the SEARCH subroutine, count points to the character which is currently being compared with a similarly positioned character in the word stored in the ROM 320 location currently being accessed. Ports is a location in RAM 234 which stores the ROM 320 address at which the search will start. As indicated above, ROM 320 is organized in such a way that all pairs of sequences having a first sequence which begins with the same letter are grouped together in ROM 320. A table is stored in on-chip ROM 232 of the addresses at which entries stored in ROM 320 having a first sequence which begins with a given character begin. Thus, if English is the language of the first half of each pair of sequences, the table in on-chip chip ROM 232 stores the location in ROM 320 where the English words beginning with "A" and their translations begin, etc. Thus, if the source flag is "0", indicating that the first half of each pair of sequences are being searched, an address is put in ports which indicates the ROM 320 address of the first word beginning with the same letter as the first letter of the image. Obviously, the second half of each pair of sequences cannot be organized in a similar fashion if the first half of each pair of sequences are so organized. Therefore, if the source flag is "1" indicating that the second half of each pair of sequences is being searched, ports is loaded with "0" so that the search begins at the beginning of the ROM translation 320 table. CPU 230 then reaches the first decision point, namely, whether the source flag is "1". The situation where the source flag is "0" will be discussed first. If the source flag is not equal "1", the next character stored in ROM 320 (initially, the first letter of the word) is retrieved from ROM 320 and its address is saved. CPU then determines whether the first character of the stored word is the same as the first character in the image. The image is the word that has been entered and is being searched. If it is not, since all words starting with the same letter are grouped together, there can be no other locations to find a match. Thus, the SEARCH subroutine is exited and CPU 238 returns to the position from which it left to enter the SEARCH subroutine. If the first ROM character does match the first image character, as illustrated in FIG. 13b, CPU 238 then determines whether the character is a word mark, indicating the end of either a source word or its translation. If the character is a word mark, there can be no match since the word in the ROM 320 table currently being examined is shorter than the word in the display being searched. Therefore, as indicated in FIG. 13a, CPU 238 again determines whether the source flag is "1". If it is not, CPU 238 scans (in the ROM 320 translation table) past the next word mark, i.e., past the end of the translation of the source word just rejected. Count is reloaded, the first character of the next source word in the ROM 320 translation table is obtained and the address is saved. Returning to FIG. 13b, if the next ROM character was not a word mark, CPU 238 then determines whether the ROM character is equal to the similarly positioned character in the image. If it is not, there is no match. As indicated in FIG. 13a, CPU 238 then scans past the next word mark, i.e., the end of the source word that did not match. CPU 238 again determines whether the source flag is "1". If it does not, CPU 238 scans past the next word mark, i.e., the word mark after the translation of the source word which has just been rejected. Count is loaded, the next ROM character, i.e., the first character in the next source word, is retrieved from the ROM 320 translation table and its address is saved. Returning to FIG. 13b, if the character obtained from ROM 320 is equal to the equivalent character in the image, count is decremented. CPU 238 then determines whether count is "0". If it is not, more characters in the image must be compared to the equivalent characters in the ROM. CPU 238 then gets the next ROM 320 character from the ROM 320 translation table and again determines whether this character is a word mark. This process continues until a match is found, i.e., until, for all the letters of a given ROM 320 entry, no word mark is found, all of the ROM 320 characters match the corresponding image characters and the count is decremented to "0". When count is decremented to "0", all the characters in the image match the corresponding characters in the ROM word being accessed. However, the ROM word may have more characters than the image word. As related above, in the query mode, one or more letters may be entered in the display and the device will find all of the words that begin with these letters. Thus, the ROM word would most likely be longer than the entered word. However, when the device is translating, or trying to determine a definition, the number of characters in the ROM word must not exceed the number of characters in the image. Therefore, CPU 238 determines whether the query flag is set. If the query flag is set, the match flag is set, indicating that a match has been found, and CPU 238 scans past the next word mark in ROM data table 320, i.e., past the end of the word that has been found to match. CPU 238 then determines whether the source flag is "1". If it is not, CPU 238 then scans past the next word mark, i.e., past the translation of the source word that has been found to match in order to arrive at the beginning of the next word that should be compared if further words are desired which begin with the given letters. This address is entered in ports, which address is the ROM address at which the next search should start. CPU 238 then returns to the point from which it left to enter the SEARCH subroutine. If the query flag is not set, the next ROM character is retrieved. CPU 238 then determines whether this character is a word mark. Remember that a determination has been made that the device is not in the query mode, and therefore must be in the definition mode. In order for a match to exist, the ROM word must precisely match the image word with no extra characters. If there are no extra characters, the character after the count ha been decremented to "0" should be a word mark. If it is a word mark, CPU 238 sets the match flag indicating a match, and determines whether the source flag is "1". If it is not, CPU 238 then scans past the next word mark, i.e., the end of the translation of the matching source word. This address, i.e., the address of the next source word after the match is loaded into ports and CPU 238 returns to the point from which it left to enter the SEARCH subroutine. If the next character from ROM data table 320 was not a word mark, there is no match. As indicated in FIG. 13a, CPU 238 scans past the next word mark at the end of the word that was determined not to be a match, and CPU 238 determines whether source equals "1". If it does not, CPU 238 scans past the next word mark, i.e., at the end of the translation of the word that does not match, and count is reloaded. The next ROM character, i.e., the first character of the next English word is retrieved from ROM table 320 and its address is saved. The subroutine then proceeds as discussed above. If the source flag is "1", i.e., the second half of each pair of alpha-numeric sequences are being searched, after count and ports are loaded, the next ROM character is obtained and its address is saved. If a word mark is found at this point, it indicates the end of the ROM 320 translation table so that no match exists. Therefore, CPU 238 returns to the point from which it left to enter the SEARCH subroutine. If the character is not a word mark, CPU 238 scans past the next word mark, i.e., past the end of the source word to the beginning of the translation word to be searched. As indicated in FIG. 13b, CPU 238 then determines whether the next character is a word mark. Obviously, in the first pass through this loop, the next character will not be a word mark since the previous word mark was just passed. CPU 238 then determines whether the ROM 320 character is the same as the corresponding character in the image. If it is not, there is no match and, as indicated in FIG. 13a, CPU 238 scans past the next word mark, i.e., past the end of the word that is not a match. CPU 238 then determines whether the source flag is "1". If it is, count is reloaded and the next ROM character is obtained and its address is saved. As indicated in FIGS. 13b, if the ROM character was the same as the corresponding image character, count is decremented and CPU 238 determines whether count then equals "0". If it does not, indicating that there are further characters in the image to be compared, the next ROM character is obtained. CPU 238 then determines whether the next character is a word mark. If it is, it indicates there is no match because the word in the dictionary is shorter than the word being searched. In such a case, as shown in FIG. 13a, CPU 238 then determines whether the source flag is "1". If it is, count is loaded and the next ROM character is obtained with its address being saved. Ideally, a match is eventually found. This happens when the ROM character being displayed is not a word mark, the character is equal to the similarly positioned character in the image and after decrementation, count equals "0" (see FIG. 13b). The subroutine then continues as described above, except that after the match flag has been set, it is necessary to load in ports the address of the first character of the first half of the next pair of alpha-numeric sequences in ROM 320. Therefore, CPU 238 determines whether the source flag is "1". If it does, the word mark that was most recently scanned past represented the end of the translation so that the address currently being accessed in ROM 320 is the first letter of the first half of the next word in the ROM 320 translation table. CPU 238 then exits the SEARCH subroutine and returns to the subroutine from which it previsously left. Referring to FIG. 4, circuitry 200, keyboard 210 and display 212 are mounted on or in housing 400 which may be of any suitable material, e.g., a hard plastic. The unique apparatus of this invention finds particularly utility as a hand-held unit. For example, the unit can be 6".times.3".times.11/4" thick. Module 150, containing microcomputer 330 and ROM 320 is mounted in housing 500 made of any suitable material such as hard plastic. A low-insertion force edge connector 214 is utilized to electrically and mechanically connect keyboard-display unit 100 with plug-in module 150. The basic unit can, if desired, be built into or temporarily coupled with a portable desk unit which can contain a magnetic tape cartridge drive and/or a small thermal printer and/or an accoustic coupler. In this mode, keyboard-display unit 100 may act as a remote terminal for a computer. With a system of this type, up to 500,000 characters of storage could be used to allow for storage of large dictionaries, phone directories, sections of legal or medical information and books of facts. A print capability would then allow for hard copy recording of retrieved information. Telephone interface capability would permit sending and receiving of stored information to and from a remotely located computer. This unit is preferably powered by rechargeable batteries and may include, as an accessory, a compact battery charge unit capable of fully recharging the unit within 16 hours. IV. DETAILED PROGRAM LISTINGS The following lists all of the specific steps for carrying out the functions described above using the instructions in the above-mentioned "Single-Chip Microcomputer M3870" publication. ##SPC1## ##SPC2## ##SPC3## ##SPC4## Other capabilities such as a digital clock and a calendar or providing a game, can of course, be incorporated without departing from the scope of the invention. Many other changes and modifications in the above-described embodiment of the invention can, of course, be carried out without departing from the scope thereof. Accordingly, that scope is intended to be limited only by the scope of the appended claims.
|
Same subclass Same class Consider this |
||||||||||
