CN204695024U - A kind of microcontroller for water proof switch - Google Patents

A kind of microcontroller for water proof switch Download PDF

Info

Publication number
CN204695024U
CN204695024U CN201520367087.6U CN201520367087U CN204695024U CN 204695024 U CN204695024 U CN 204695024U CN 201520367087 U CN201520367087 U CN 201520367087U CN 204695024 U CN204695024 U CN 204695024U
Authority
CN
China
Prior art keywords
module
timer
unit
microcontroller
connects
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201520367087.6U
Other languages
Chinese (zh)
Inventor
沈怿皓
于涛
林茂
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai sinomicon electronics Limited by Share Ltd
Original Assignee
SHANGHAI SINOMICON ELECTRONICS Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by SHANGHAI SINOMICON ELECTRONICS Co Ltd filed Critical SHANGHAI SINOMICON ELECTRONICS Co Ltd
Priority to CN201520367087.6U priority Critical patent/CN204695024U/en
Application granted granted Critical
Publication of CN204695024U publication Critical patent/CN204695024U/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Control By Computers (AREA)

Abstract

The utility model discloses a kind of microcontroller for water proof switch, it relates to a kind of single-chip microcomputer.It comprises arithmetic logic unit, work register, system break unit, system reset unit, level Four storehouse, programmable counter, program storage, command decoder, user data area, IO Port control unit, low voltage detecting module, D/A converter module, 0.3V button, timer, work register, command decoder all connects arithmetic logic unit, programmable counter connects level Four storehouse respectively, program storage, program storage connects command decoder, connect arithmetic logic unit, work register, system break unit, system reset unit, programmable counter, user data area, IO Port control unit, low voltage detecting module, D/A converter module, 0.3V button, first timer is all connected with bus with second timer.The utility model production cost is low, strong anti-interference performance, and output signal accuracy is high, reduces power consumption, practical.

Description

A kind of microcontroller for water proof switch
Technical field
The utility model relates to a kind of single-chip microcomputer, be specifically related to a kind of microcontroller for water proof switch.
Background technology
Microcontroller is by integrated for the major part of microcomputer one-chip microcomputer on a single die, through this development in several years, its performance from strength to strength, it is made to apply ubiquitous, throughout every field, such as Electric Machine Control, game station, phone, building safety and access control, Industry Control and robotization etc., and in the practical application area of water proof switch, there is interference free performance difference in microcontroller, output signal accuracy is not high, power consumption is high, the problem of high cost, and regular tap is exposed in water, due to water conduction, single-chip microcomputer thinks that switch is conducting, think and have button to press down, cause misoperation, based on this, design a kind of microcontroller for water proof switch or necessary.
Utility model content
For the deficiency that prior art exists, the utility model object is to provide a kind of microcontroller for water proof switch, and structure is simple, reasonable in design, reduce production cost, there is very high interference free performance, output signal accuracy is high, reduces power consumption, practical.
To achieve these goals, the utility model realizes by the following technical solutions: a kind of microcontroller for water proof switch, comprise arithmetic logic unit, work register, system break unit, system reset unit, level Four storehouse, programmable counter, program storage, command decoder, user data area, IO Port control unit, low voltage detecting module, D/A converter module, 0.3V button, first timer and second timer, work register, command decoder all connects arithmetic logic unit, programmable counter connects level Four storehouse respectively, program storage, program storage connects command decoder, connect arithmetic logic unit, work register, system break unit, system reset unit, programmable counter, user data area, IO Port control unit, low voltage detecting module, D/A converter module, 0.3V button, first timer is all connected with bus with second timer.
As preferably, described system break unit is changed interrupt module by external interrupt module, low-voltage interrupt module, keyboard interrupt module, timer interruption module and ADC and is connected, low-voltage interrupt module, keyboard interrupt module, ADC are changed interrupt module and are connected with low voltage detecting module, 0.3V button, D/A converter module respectively by bus, and timer interruption module is connected with first timer and second timer by bus.
As preferably, described system reset unit is made up of electrification reset module, under-voltage reset module, external reset module, house dog, when any one resets and occurs, system will perform instruction again from the place of 0000H address, and all registers also can be reset to acquiescence initial value by system in addition.
As preferably, the P03 mouth of described microcontroller is the detection mouth of 0.3V button, P03 mouth external 1K Ω resistance to earth does not trigger, external 500 Ω resistance to earth trigger, and this function triggers can wake stop state up, and this function need be just effective when system clock is cut to low-frequency clock, 0.3V button can judge the resistance sizes of this conducting, if water resistance, then neglect, prevent maloperation.
The beneficial effects of the utility model: production cost is low, have very high interference free performance, output signal accuracy is high, reduces power consumption, practical, has a extensive future.
Accompanying drawing explanation
The utility model is described in detail below in conjunction with the drawings and specific embodiments;
Fig. 1 is system chart of the present utility model.
Embodiment
The technological means realized for making the utility model, creation characteristic, reaching object and effect is easy to understand, below in conjunction with embodiment, setting forth the utility model further.
With reference to Fig. 1, this embodiment is by the following technical solutions: a kind of microcontroller for water proof switch, comprise arithmetic logic unit 1, work register 2, system break unit 3, system reset unit 4, level Four storehouse 5, programmable counter 6, program storage 7, command decoder 8, user data area 9, IO Port control unit 10, low voltage detecting module 11, D/A converter module 12, 0.3V button 13, first timer 14 and second timer 15, work register 2, command decoder 8 all connects arithmetic logic unit 1, programmable counter 6 connects level Four storehouse 5 respectively, program storage 7, program storage 7 connects command decoder 8, connect arithmetic logic unit 1, work register 2, system break unit 3, system reset unit 4, programmable counter 6, user data area 9, IO Port control unit 10, low voltage detecting module 11, D/A converter module 12, 0.3V button 13, first timer 14 is all connected with bus with second timer 15.
It should be noted that, described system reset unit 4 is made up of electrification reset module 401, under-voltage reset module 402, external reset module 403, house dog 404, when any one resets and occurs, system will perform instruction again from the place of 0000H address, and all registers also can be reset to acquiescence initial value by system in addition; The oscillator of electrification reset module 401 and under-voltage reset module 402 meeting shutdown system major clock, reset after removing and just reopen oscillator, because oscillator starting of oscillation needs the regular hour, so system can start to rework after 1024 clock period with stable; External reset module 403, house dog 404 can not shutdown system main clock oscillators, thus reset remove latter two clock period after namely start working.
In addition, described system break unit 3 is by external interrupt module 301, low-voltage interrupt module 302, keyboard interrupt module 303, timer interruption module 304 and ADC change interrupt module 305 and are connected, low-voltage interrupt module 302, keyboard interrupt module 303, ADC change interrupt module 305 by bus respectively with low voltage detecting module 11, 0.3V button 13, D/A converter module 12 connects, timer interruption module 304 is connected external interrupt by bus with first timer 14 and second timer 15, keyboard interrupt, timer interruption etc. can by the GIE bit mask of CPU status register MCR, interrupt response process is as follows:
(1) when there is interrupt request, the address pop down of next instruction that will perform relevant is preserved (totalizer A and status register need software protection) by CPU, to interrupt mask bit GIE clear 0, disabled interrupt responds, different from reset, hardware interrupts does not stop the execution of present instruction, but temporary suspension interrupts until present instruction is complete;
(2) when CPU performs and interrupts, program jumps to interrupt vector 0008H address and starts to perform interruption code, and interruption code should first preserve totalizer A and status register, then judges it is which interrupt response;
(3) totalizer A and status register should be recovered after performing interruption content, then perform RETIE and return master routine, at this moment, take out the value of PC from storehouse, then perform from the rear instruction continuation of that instruction interrupted when occurring.
The P03 mouth of the corresponding microcontroller of detection mouth of this embodiment 0.3V button 13, P03 mouth external 1K Ω resistance to earth does not trigger, external 500 Ω resistance to earth trigger, this function triggers can wake stop state up, and this function need be just effective when system clock is cut to low-frequency clock, the analog input channel of P03 mouth is needed to open when this function uses, 0.3V button 13 is exposed in water for switch and designs, because water itself is conductor, there is certain resistance value, regular tap is exposed in water, due to water conduction, single-chip microcomputer thinks that switch is conducting, think and have button to press down, cause misoperation, and 0.3V button 13 can judge the resistance sizes of this conducting, if water resistance, then neglect, effectively prevent maloperation.
This embodiment is 8 bit CPU kernels, reduced instruction set computer, and under high frequency mode, 2T/4T/8T/16T can establish; Be 2T under low frequency operating mode; Storer is 4K*16 program memory space, 128 byte general-purpose data register space (4K patterns: 0000H-0FDFH, 2K pattern: 0000H-07DFH, 1K pattern: 0000H-03DFH) indirectly read by INDF3, support 4 1K*16 burnings, 2 2K*16 burnings; 4 grades of degree of depth hardware stacks, when program response interruption or execution subroutine call instruction, CPU can by automatic for PC pop down, and when runtime subroutine link order, stack top data gives PC; Work register 2 is divided into three districts: Universal-purpose quick register district GPR (128Byte space), special function register district SFR and extended register district, must use indirect addressing mode to carry out addressing.
IO Port control unit 10 is provided with one group of 8 configurable input/output port P0.P06, P00 are multiplexing with analog channel AN6, AN60 respectively, P04/P05 can be used as ADC internal reference and exports, also can be used as the input of outside positive and negative terminal reference source, when P02 and P01 is set to input port, can be configured to the external clock input of first timer 14 and second timer 15, also can be used as the external interrupt input port of INT0 and INT1; P07 can be used as keypad entries, and whether port selects this function to arrange separately by KBCR.
This embodiment supports high-speed operation mode, local-speed mode of operation, park mode, HOLD pattern 1 and the total nothing of HOLD pattern 2 plant mode of operation, wherein park mode, HOLD pattern 1 and HOLD pattern 2 are low power mode of operation, low power mode of operation is less than 1Ua at dormancy power consumption, HOLD pattern is less than 10Ua, enter under the enable power consumption of 0.3V button is less than the condition of 50Ua, can switch in various different mode of operation according to user demand, STOP instruction can make MCU enter low-power consumption mode, can have an impact to MCU: stop respective oscillator vibration according to different mode simultaneously, RAM content remains unchanged, all input/output port remain unchanged, timer is according to its mode of operation, can maintenance work, and following situation can make MCU exit low-power consumption mode: have external interrupt request generation, the interrupt request generation of timer spilling and reset, wait for that (external low frequency crystal oscillator waits for 1024 cycles, and internal high frequency waits for 32 cycles, and internal low-frequency waits for 4 cycles) then starts working through vibration after MCU exits low-power consumption mode.
This embodiment production cost is low, and have very high interference free performance, output signal accuracy is high, effectively reduces power consumption, and practicality is stronger, has wide market application foreground.
More than show and describe ultimate principle of the present utility model and principal character and advantage of the present utility model.The technician of the industry should understand; the utility model is not restricted to the described embodiments; what describe in above-described embodiment and instructions just illustrates principle of the present utility model; under the prerequisite not departing from the utility model spirit and scope; the utility model also has various changes and modifications, and these changes and improvements all fall within the scope of claimed the utility model.The claimed scope of the utility model is defined by appending claims and equivalent thereof.

Claims (4)

1. for a microcontroller for water proof switch, it is characterized in that, comprise arithmetic logic unit (1), work register (2), system break unit (3), system reset unit (4), level Four storehouse (5), programmable counter (6), program storage (7), command decoder (8), user data area (9), IO Port control unit (10), low voltage detecting module (11), D/A converter module (12), 0.3V button (13), first timer (14) and second timer (15), work register (2), command decoder (8) all connects arithmetic logic unit (1), and programmable counter (6) connects level Four storehouse (5) respectively, program storage (7), program storage (7) connects command decoder (8), connects arithmetic logic unit (1), work register (2), system break unit (3), system reset unit (4), programmable counter (6), user data area (9), IO Port control unit (10), low voltage detecting module (11), D/A converter module (12), 0.3V button (13), first timer (14) is all connected with bus with second timer (15).
2. a kind of microcontroller for water proof switch according to claim 1, it is characterized in that, described system reset unit (4) is made up of electrification reset module (401), under-voltage reset module (402), external reset module (403), house dog (404).
3. a kind of microcontroller for water proof switch according to claim 1, it is characterized in that, described system break unit (3) is by external interrupt module (301), low-voltage interrupt module (302), keyboard interrupt module (303), timer interruption module (304) and ADC change interrupt module (305) and are connected, low-voltage interrupt module (302), keyboard interrupt module (303), ADC change interrupt module (305) by bus respectively with low voltage detecting module (11), 0.3V button (13), D/A converter module (12) connects, timer interruption module (304) is connected with first timer (14) and second timer (15) by bus.
4. a kind of microcontroller for water proof switch according to claim 1, it is characterized in that, the P03 mouth of described microcontroller is the detection mouth of 0.3V button (13), and P03 mouth external 1K Ω resistance to earth does not trigger, and external 500 Ω resistance to earth trigger.
CN201520367087.6U 2015-06-01 2015-06-01 A kind of microcontroller for water proof switch Active CN204695024U (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201520367087.6U CN204695024U (en) 2015-06-01 2015-06-01 A kind of microcontroller for water proof switch

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201520367087.6U CN204695024U (en) 2015-06-01 2015-06-01 A kind of microcontroller for water proof switch

Publications (1)

Publication Number Publication Date
CN204695024U true CN204695024U (en) 2015-10-07

Family

ID=54235299

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201520367087.6U Active CN204695024U (en) 2015-06-01 2015-06-01 A kind of microcontroller for water proof switch

Country Status (1)

Country Link
CN (1) CN204695024U (en)

Similar Documents

Publication Publication Date Title
TWI475368B (en) Power control system and method thereof
CN201867678U (en) Mainboard of computer capable of reducing power consumption during sleep
CN109992085A (en) A kind of computer electric power management system, method and terminating machine
CN203858624U (en) Dual-backup type bus watchdog circuit
CN104698941A (en) FPGA-based (field programmable gate array-based) embedded dual-core relay protecting system
CN200990088Y (en) Eight-bit RISC micro controller constitution
WO2008124988A1 (en) A cordwood computer and operating system
CN200997136Y (en) Micro-controller structure of built-in comparater
CN104090506B (en) A kind of digital input module of adjustment electronic instrument show value
CN204695024U (en) A kind of microcontroller for water proof switch
CN204759085U (en) A novel controller for waterproof switch
CN201673429U (en) Integrated circuit used for wave beam control
CN200997135Y (en) Micro-controller structure of universal built-in synchronizing/asynchronizing transceiver
CN203386208U (en) Master control board circuit based on DSP chip
CN107680001A (en) Signal processing system and its double-core exchange method based on double-core embedded type processor
CN204117091U (en) A kind of computing machine uninterrupted power supply mechanism
Zhang et al. Design and development of smart socket based on STM32
CN104102162A (en) Embedded logic controller
CN2763043Y (en) Pneumatic marking device
CN203982134U (en) A kind of embedded logic controller
CN202838091U (en) Double bridge piece mainboard supporting SR 5690 redundancy design
CN108509011A (en) Portable energy-storing system control method
CN202948360U (en) Double-bridge sheet main board for supporting RS780E redundancy design
CN201788460U (en) Reset circuit
CN201075218Y (en) Eight bit compaction instruction set microcontroller

Legal Events

Date Code Title Description
C14 Grant of patent or utility model
GR01 Patent grant
C56 Change in the name or address of the patentee
CP01 Change in the name or title of a patent holder

Address after: 201206 Shanghai city Pudong New Area Jin Road No. 58 Yinqiao building room 1911

Patentee after: Shanghai sinomicon electronics Limited by Share Ltd

Address before: 201206 Shanghai city Pudong New Area Jin Road No. 58 Yinqiao building room 1911

Patentee before: SHANGHAI SINOMICON ELECTRONICS CO., LTD.