Built-in can the repeatedly learning-oriented remote-control circuit structure of programmable memory and learning method
Technical field
The present invention relates to remote pilot technical field, particularly relate to learning-oriented remote pilot technical field, specifically refer to a kind of built-in can the repeatedly learning-oriented remote-control circuit structure of programmable memory and learning method.
Background technology
Most employing MCU (MicroControllerUnit in prior art, microcontroller) governor circuit and an EEPROM (ElectricallyErasableProgrammableRead-OnlyMemory, electrically erasable read-only memory) circuit, communicated by two I/O ports; The keyboard-coding data learnt are stored in eeprom circuit, read in governor circuit during signaling from eeprom circuit again;
Eeprom circuit and MCU governor circuit are encapsulated in same plastic-sealed body by another kind of newer scheme, and serial data communication mouth to be linked together reduction scheme cost by binding line, learns identical with a same technical scheme mentioned of the process of signaling.
The total shortcoming of above two kinds of modes:
1, both employ two circuit, peripheral relative complex, add the cost (circuit cost, packaging cost, welding cost etc.) of whole telepilot;
2, be communicated to mutually between two circuit that I haven't seen you for ages takies two I/O ports, make under equal conditions attainablely to reduce by bond number;
3, data write or read and all use serial mode, make cycle of reading or writing elongated, low, the consuming time length of efficiency.
Summary of the invention
The object of the invention is the shortcoming overcoming above-mentioned prior art, provide a kind of can realize by built-in can repeatedly program read-only memory replaces external eeprom circuit, saves cost, the built-in of simplification process, raising efficiency, increase number of keys can the repeatedly learning-oriented remote-control circuit structure of programmable memory and learning method.
To achieve these goals, of the present invention built-inly repeatedly the learning-oriented remote-control circuit structure of programmable memory and learning method can have following formation:
This built-in can the learning-oriented remote-control circuit structure of repeatedly programmable memory, its principal feature is, described circuit structure comprises:
Micro controller module, in order to produce corresponding control signal and sequential and to perform corresponding control action according to Instruction decoding;
Can one-time programming ROM module, in order to storage program and fixing pattern data;
Can repeatedly program read-only memory module, in order to store the pattern data learning to arrive;
Can repeatedly programmable memory control module, in order to store described can repeatedly program read-only memory module address, described can repeatedly the read-write of program read-only memory module value and described can the control signal of repeatedly program read-only memory module;
Signal transmitting and receiving module, in order to transmission and the receipt decoding of remote signal;
Hardware scanning module, the button be pressed in order to scanning also judges push-button type.
Preferably, described can program read-only memory be repeatedly can repeatedly program read-only memory or flash ROM.
Preferably, described signal transmitting and receiving module is infrared module.
Preferably, describedly can repeatedly programmable memory control module to comprise:
Address register, in order to store described can the address of repeatedly program read-only memory module;
Read-write numerical register, in order to store described can the value of repeatedly program read-only memory module read-write;
Control signal register, in order to store described can the control signal of repeatedly program read-only memory module.
Preferably, described micro controller module and can program read-only memory module be repeatedly parallel communications.
The invention still further relates to a kind of based on described built-in can the learning method of the repeatedly learning-oriented remote-control circuit structure of programmable memory, it is characterized in that, described method comprises the following steps:
(1) after specifying button to be learned, described microcontroller by the button of study in described space erasing that can be repeatedly corresponding in program read-only memory module;
(2) the signal transmitting and receiving module described in receives pattern data to be learned and decodes;
(3) micro controller module described in control by described in decoded pattern data write can be repeatedly corresponding in program read-only memory module space.
Preferably, described repeatedly programmable memory control module can comprise address register, read-write numerical register and control signal register, described by the button of study in described space erasing that can be repeatedly corresponding in program read-only memory module, comprise the following steps:
(11) by described can repeatedly program read-only memory module need the sector of erasing first address write described in address register in;
(12) by the erasing position in the enable described control signal register of described micro controller module.
Preferably, after described step (3), further comprising the steps of:
(4) when button is pressed, the pattern data corresponding to this button are launched by described signal transmitting and receiving module.
More preferably, the pattern data corresponding to this button are launched by described signal transmitting and receiving module, comprise the following steps:
(41) the hardware scanning module described in is carried out scanning and is judged the push-button type that is pressed, if common key-press, then continues step (42), if study button, then continues step (43);
(42) micro controller module described in reads and is stored in the described corresponding pattern data of this button that can store in one-time programming ROM module, then continues step (44);
(43) micro controller module described in reads and is stored in the described corresponding pattern data of this button that can repeatedly store in program read-only memory module, then continues step (44);
(44) the pattern data after described micro controller module process are launched by the signal transmitting and receiving module described in.
Further, described repeatedly programmable memory control module can comprise address register, read-write numerical register and control signal register, described reading is stored in the described corresponding pattern data of this button that can repeatedly store in program read-only memory module, comprises the following steps:
(431) can write in described address register in the address repeatedly in program read-only memory module by what need to read;
(432) by the reading position in the enable described control signal register of described micro controller module;
(433) by the read-write numerical register described in pattern data write that is corresponding for this button of reading.
To have employed in this invention built-in can the repeatedly learning-oriented remote-control circuit structure of programmable memory and learning method, has following beneficial effect:
1, reduce use circuit, and simplify peripheral circuit, telepilot holistic cost is declined;
2, many two common I/O ports under equal conditions, make supportedly to increase by bond number;
3, inner parallel communications improves the read or write speed of storer, simplifies programming complexity.
Accompanying drawing explanation
Fig. 1 be of the present invention built-in can the structural representation of the repeatedly learning-oriented remote-control circuit structure of programmable memory.
Fig. 2 be of the present invention built-in can the process flow diagram of the repeatedly learning method of the learning-oriented remote-control circuit structure of programmable memory.
Fig. 3 be of the present invention built-in can the process flow diagram of the repeatedly signaling process of the learning-oriented remote-control circuit structure of programmable memory.
Fig. 4 be of the present invention to can repeatedly program read-only memory erasing process flow diagram.
Fig. 5 be of the present invention to can repeatedly program read-only memory write process flow diagram.
Fig. 6 be of the present invention to can repeatedly program read-only memory read process flow diagram.
Embodiment
In order to more clearly describe technology contents of the present invention, conduct further description below in conjunction with specific embodiment.
The present invention is primarily of micro controller module (MCU), OTPROM (One-TimeProgrammableROM, can one-time programming ROM (read-only memory)) module, MTPROM (Multiple-TimeProgrammableROM, can repeatedly program read-only memory) module, MTP control circuit module can repeatedly programmable memory control module, and infrared module and signal transmitting and receiving module and hardware scanning module etc. form (as shown in Figure 1).
Micro controller module major function is by Instruction decoding, the process such as deposits, and produces corresponding control signal and sequential, the function that the program that completes is corresponding.
OTPROM module is mainly used in storage program and some fixing pattern data, and it is the ROM (read-only memory) supporting write-once.
MTPROM module is mainly used in storing the pattern data learning to arrive, and it is the ROM (read-only memory) supporting repeatedly to write.
MTP control circuit module mainly comprises MTP_ADR (address register), MTP_DAT (read and write data register), MTP_CON (control register) three groups of registers, be respectively used to the address of store M TP, MTP write or the value read, and the control signal of MTP.The value being controlled these three groups of registers by MCU can be completed processes such as MTPROM write, reading or erasings.
Infrared module is mainly used in transmitting and the receipt decoding process of remote signal.
Hardware scanning module is mainly used in coordinating software to complete waking up and determining effective button system.
The process (as shown in Figure 2) of study:
1, enter learning state by peripheral button, and specify the button of study;
2, after determining learning key, by space erasing corresponding in MTP for this key;
3, extraneous by the remote signal that learns by infrared module receipt decoding, form pattern data according to " 0 " (low level), " 1 " (high level), level width and carrier frequency etc.;
4, by corresponding program, MCU is made to complete the write of relevant pattern data to control MTP.
The process (as shown in Figure 3) of signaling:
1, certain button pressed by telepilot, judges which button is pressed by hardware scanning module and software;
2 if common key-press, then read the corresponding pattern data be stored in OTP; If study button, then read in the corresponding pattern data in MTP;
3, by the process by MCU of the pattern data read, then launch via infrared module.
In the present invention, according to the capacity of MTPROM and the space that stores needed for pattern data, MTPROM is divided into 16 sectors, the pattern data of each sector storage button, therefore can support at most 16 learning-oriented buttons.
Process (as shown in Figure 4) to MTPROM erasing:
1, will need in the first address write MTP_ADR register of the sector of erasing;
2, by the erasing position in the enable MTP_CON register of MCU, MTPROM starts to carry out erase process;
3, after 65ms, the erasing move to designated sector is completed.
Process (as shown in Figure 5) to MTPROM write:
1, will the address of write be needed to write in MTP_ADR register;
2, will the data of write be needed to write in MTP_DAT register;
3, by the write position in the enable MTP_CON register of MCU module, MTPROM starts to carry out ablation process;
4, after 150 μ s, the write activity to assigned address, specific data is completed.
Process (as shown in Figure 6) to MTPROM reads:
1, will the address read be needed to write in MTP_ADR register;
2, by the reading position in the enable MTP_CON register of MCU module, MTPROM starts to carry out readout;
3, after 10 μ s, complete the reading operation to assigned address, the value of reading is stored in MTP_DAT register.
Common study remote controller adopts the study of MCU governor circuit and signaling, and external eeprom circuit stores the pattern data of study, owing to using two circuit, scheme cost is high, the present invention is built-in MTPROM in MCU governor circuit, for substituting external eeprom circuit, reduces scheme cost;
Common study remote controller MCU with EEPROM communicates and at least takies two I/O ports, and the present invention can reduce and takies two I/O ports, MCU is programmed more flexible;
Common study remote controller MCU and EEPROM adopts serial communication, and data throughout is little, and parallel communications between MCU and MTP in the present invention, data throughout is large.
Built-in MTPROM can replace to built-in FlashROM (flash ROM) etc., but the cost of the latter meeting height a bit.
To have employed in this invention built-in can the repeatedly learning-oriented remote-control circuit structure of programmable memory and learning method, has following beneficial effect:
1, reduce use circuit, and simplify peripheral circuit, telepilot holistic cost is declined;
2, many two common I/O ports under equal conditions, make supportedly to increase by bond number;
3, inner parallel communications improves the read or write speed of storer, simplifies programming complexity.
In this description, the present invention is described with reference to its specific embodiment.But, still can make various amendment and conversion obviously and not deviate from the spirit and scope of the present invention.Therefore, instructions and accompanying drawing are regarded in an illustrative, rather than a restrictive.