CN109407576A - A kind of plug and play can be by the peripheral module of single-chip microcontroller automatic identification - Google Patents
A kind of plug and play can be by the peripheral module of single-chip microcontroller automatic identification Download PDFInfo
- Publication number
- CN109407576A CN109407576A CN201811147857.0A CN201811147857A CN109407576A CN 109407576 A CN109407576 A CN 109407576A CN 201811147857 A CN201811147857 A CN 201811147857A CN 109407576 A CN109407576 A CN 109407576A
- Authority
- CN
- China
- Prior art keywords
- chip microcontroller
- module
- discrete component
- control center
- overall control
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B19/00—Programme-control systems
- G05B19/02—Programme-control systems electric
- G05B19/04—Programme control other than numerical control, i.e. in sequence controllers or logic controllers
- G05B19/042—Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
- G05B19/0423—Input/output
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B2219/00—Program-control systems
- G05B2219/20—Pc systems
- G05B2219/25—Pc structure of the system
- G05B2219/25257—Microcontroller
Abstract
A kind of plug and play of the present invention can be by the peripheral module of single-chip microcontroller automatic identification, comprising: cell phone client, overall control center and each discrete component.Single-chip microcontroller as overall control center be connected with bluetooth module for and cell phone client communicated and NRF24L01 wireless communication module be used for single-chip microcontroller broadcast number information;NRF24L01 wireless communication module is connected on the single-chip microcontroller being connected directly with discrete component for receiving the number information that overall control center is sent.Further, each discrete component module is equipped with independent register.All single-chip microcontrollers are respectively connected with power supply unit.What user of the present invention needed to do is only that the module that will be used is connected to single-chip microcontroller by fixed interface, turning on the power switch single-chip microcontroller will the automatic identification module, corresponding function can be completed by manipulating cell phone client in user later, thus achievees the effect that plug and play.The invention can be applied to the every field such as smart home, the teaching of single-chip microcontroller introduction, Internet of Things.
Description
Technical field
The present invention is that a kind of plug and play can belong to " single chip application technology " by the peripheral module of single-chip microcontroller automatic identification
Field.
Background technique
The use of single-chip microcontroller at present requires by physics wiring, writes program and compiling downloading process, for connecing for the first time
It touches for personnel or the common non-technical personnel of single-chip microcontroller, not only complicated for operation but also inefficiency.Therefore a kind of fixation
The single-chip microcontroller peripheral module design of interface plug and play seems very necessary.
Summary of the invention
The object of the present invention is to provide a kind of plug and play can be by the peripheral module of single-chip microcontroller automatic identification, to simplify monolithic
The operating process of machine reduces technical threshold, so that layman, writes complicated program without going again.Single-chip microcontroller connects simultaneously
The standardization of mouth allows us to save the wiring process of various complexity, improves working efficiency.It can also even be expanded
Into the household electrical appliance by infrared control, for example TV, air-conditioning etc. recycle integrated element by accessing infrared module
Program library can easily operate the electric appliance of family.In addition, also acting as introduction educational aid of single-chip microcontroller etc..
A kind of plug and play of the present invention can include three parts by the peripheral module of single-chip microcontroller automatic identification altogether: mobile phone visitor
Family end, overall control center and each discrete component module (such as steering engine, relay, stepper motor).Single-chip microcontroller as overall control center
Be connected with bluetooth module for and cell phone client communicated and NRF24L01 wireless communication module for single-chip microcontroller it is wide
Broadcast number information;NRF24L01 wireless communication module is connected on the single-chip microcontroller being connected directly with discrete component for receiving in master control
The number information that the heart is sent.Further, each discrete component module is equipped with independent register.
Wherein, all single-chip microcontrollers are respectively connected with power supply unit.
Wherein, all interfaces and connecting line do standardization processing;It is specific as follows: the monolithic being connected directly with discrete component
It is connected to NRF24L01 wireless communication module on machine for receiving the number information that overall control center is sent, and reserves 2 I2C interfaces
Number information and power supply VCC and GND interface for reading discrete component are used for discrete assembly power supply, 1
Common I/O mouthfuls for sending control signal (can be expanded as needed).Each independent discrete component is equally connected by 5 lines
It connects, wherein 2 are I2C communication line, it is data line there are also 1 that 2, which are power supply line (VCC and GND),.
Cell phone client is sent to overall control center by bluetooth and is instructed, and overall control center is utilized by the way of broadcast
NRF24L01 wireless communication module realizes the communication between discrete component, and wiring schematic diagram is as shown in Fig. 1.Overall control center will
The command broadcast that mobile phone is sent gives each discrete component module, and each discrete component module is equipped with independent register
(wiring illustrates to see attached drawing 2) to record oneself unique number, after each discrete component module receives instruction, by comparison instruction
Number and oneself natural number come judge this instruction whether to one's name, if so, making corresponding response, otherwise ignore
The instruction.User only need to disposably upload the program of all modules to the single-chip microcontroller of connection discrete component when in use, work as insertion
When some peripheral hardware, single-chip microcontroller executes corresponding program after identifying the module by reading register number first again.Simultaneously
By the standardization processing to interface and connecting line, the operation of more convenient user.
The present invention is that a kind of plug and play can be by the peripheral module of single-chip microcontroller automatic identification, advantage and effect: being used
What family needed to do is only that the module that will be used is connected to single-chip microcontroller by fixed interface, and turning on the power switch single-chip microcontroller will be automatic
Identify the module, corresponding function can be completed by manipulating cell phone client in user later, thus achievees the effect that plug and play.
Rather than as tradition, module is replaced every time and requires replacement program, then recompilates downloading, and it also requires by
Complicated wiring process etc..The invention can be applied to the every field such as smart home, the teaching of single-chip microcontroller introduction, Internet of Things.
Detailed description of the invention
Fig. 1: wireless communication module schematic diagram of the present invention.
Fig. 2: register wiring schematic diagram of the present invention.
Fig. 3: totality connection figure of the present invention.
Fig. 4: work flow diagram of the present invention.
Serial number in figure, symbol, meaning representated by code name are as follows:
1:VCC positive pole
2:GND power cathode
3:DATA data line
4:SDA communication
5:SCL communication
I: the interface of standardization, user need the part operated
II: discrete component, user can need to connect different components according to oneself
Specific embodiment
With reference to the accompanying drawings and examples, the following further describes the technical solution of the present invention.
As shown in figure 3, a kind of plug and play can include three parts: hand by the peripheral module of single-chip microcontroller automatic identification altogether
Machine client, SCM system overall control center and each discrete block (such as steering engine, relay, stepper motor).As shown in Figure 1,
Single-chip microcontroller as overall control center be connected with bluetooth module for and cell phone client communicated and NRF24L01 channel radio
Believe that module is used to broadcast number information to single-chip microcontroller;As shown in Fig. 2, being connected on the single-chip microcontroller being connected directly with discrete component
NRF24L01 wireless communication module is for receiving the number information that overall control center is sent.Further, each discrete component module
It is equipped with independent register.Wherein, all single-chip microcontrollers are respectively connected with power supply unit.
Wherein, all interfaces and connecting line do standardization processing;It is specific as follows: the monolithic being connected directly with discrete component
It is connected to NRF24L01 wireless communication module on machine for receiving the number information that overall control center is sent, and reserves 2 I2C interfaces
Number information and power supply VCC and GND interface for reading discrete component are used for discrete assembly power supply, 1
Common I/O mouthfuls for sending control signal (can be expanded as needed).Each independent discrete component is equally connected by 5 lines
It connects, wherein 2 are I2C communication line, it is data line there are also 1 that 2, which are power supply line (VCC and GND),.As shown in Figure 2.
Cell phone client is sent to overall control center by bluetooth and is instructed, and overall control center is utilized by the way of broadcast
NRF24L01 wireless communication module realizes the communication between discrete component, and wiring schematic diagram is as shown in Fig. 1.Overall control center will
The command broadcast that mobile phone is sent gives each discrete component module, and each discrete component module is equipped with independent register
(wiring illustrates to see attached drawing 2) to record oneself unique number, after each discrete component module receives instruction, by comparison instruction
Number and oneself natural number come judge this instruction whether to one's name, if so, making corresponding response, otherwise ignore
The instruction.User only need to disposably upload the program of all modules to the single-chip microcontroller of connection discrete component when in use, work as insertion
When some peripheral hardware, single-chip microcontroller executes corresponding program after identifying the module by reading register number first again.Simultaneously
By the standardization processing to interface and connecting line, the operation of more convenient user.
As shown in figure 4, workflow of the invention are as follows: discrete component is connected to monolithic by standardized interface by user
Machine, overall control center establish connection by bluetooth and mobile phone, constantly detect whether the instruction from mobile phone terminal.If so, then by this
Instruction is sent to each discrete component in the form broadcasted.Every instruction is made of 2 byte datas --- the tables of data of the first byte
Show that the number of instruction destination component, the second byte data indicate the number of the operation needed to be implemented.Each discrete component receives
After instruction, first by the data of first character section judge oneself whether be the instruction send destination, if it is execute
Operation representated by second byte data.Various number meanings used by being instructed in the present invention it is as shown in table 1 below (with control after
For electric appliance, stepper motor and steering engine):
Table 1
Instruction 31 is such as sent by bluetooth in mobile phone terminal, master control will pass through NRF24L01 after receiving blue-teeth data from serial ports
Instruction 31 is broadcasted to all components.After the single-chip microcontroller of control relay receives this instruction, the first character section of the instruction is judged
It is 3, is not inconsistent with the natural number 1 of oneself, therefore ignore this instruction.And after the single-chip microcontroller for controlling steering engine receives this instruction, judgement
The first character section of the instruction is identical as the natural number of oneself, therefore executes operation representated by the second byte data, that is, controls
Steering engine processed rotates clockwise.
Claims (3)
1. a kind of plug and play can be by the peripheral module of single-chip microcontroller automatic identification, it is characterised in that: the peripheral module includes three
Part: cell phone client, overall control center and each discrete component module;Single-chip microcontroller as overall control center is connected with bluetooth module use
In communicated with cell phone client and NRF24L01 wireless communication module be used for single-chip microcontroller broadcast number information;With from
NRF24L01 wireless communication module is connected on the single-chip microcontroller that scattered component is connected directly for receiving the number letter that overall control center is sent
Breath;Further, each discrete component module is equipped with independent register;Wherein, all single-chip microcontrollers are respectively connected with power supply
Device.
2. a kind of plug and play according to claim 1 can be by the peripheral module of single-chip microcontroller automatic identification, it is characterised in that:
All interfaces and connecting line do standardization processing;It is specific as follows: to be connected on the single-chip microcontroller being connected directly with discrete component
NRF24L01 wireless communication module reserves 2 I2C interfaces for reading for receiving the number information that overall control center is sent
The number information and power supply VCC and GND interface of discrete component are used for discrete assembly power supply, 1 common I/O
Mouth is for sending control signal;Each independent discrete component is equally connected by 5 lines, wherein 2 are I2C communication line, 2 are
Power supply line is data line there are also 1.
3. a kind of plug and play according to claim 1 can be by the peripheral module of single-chip microcontroller automatic identification, it is characterised in that:
Cell phone client is sent to overall control center by bluetooth and is instructed, and overall control center utilizes NRF24L01 channel radio by the way of broadcast
Believe that module realizes the communication between discrete component;The command broadcast that overall control center sends mobile phone gives each discrete component mould
Block, each discrete component module are equipped with independent register to record the unique number of oneself, and each discrete component module is received
To after instruction, this instruction is judged by numbering in comparison instruction and the natural number of oneself whether to one's name, if so,
Corresponding response is made, the instruction is otherwise ignored.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811147857.0A CN109407576A (en) | 2018-09-29 | 2018-09-29 | A kind of plug and play can be by the peripheral module of single-chip microcontroller automatic identification |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811147857.0A CN109407576A (en) | 2018-09-29 | 2018-09-29 | A kind of plug and play can be by the peripheral module of single-chip microcontroller automatic identification |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109407576A true CN109407576A (en) | 2019-03-01 |
Family
ID=65466544
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811147857.0A Pending CN109407576A (en) | 2018-09-29 | 2018-09-29 | A kind of plug and play can be by the peripheral module of single-chip microcontroller automatic identification |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109407576A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105938462A (en) * | 2015-06-30 | 2016-09-14 | 知鑫知识产权服务(上海)有限公司 | Sensor-general switching equipment based on Micro USB |
CN106227177A (en) * | 2016-09-05 | 2016-12-14 | 广州途道信息科技有限公司 | A kind of control device based on bus communication |
CN106383502A (en) * | 2016-10-17 | 2017-02-08 | 广州市彰道智能技术有限公司 | Household intelligent control system and control method thereof |
CN206849010U (en) * | 2017-06-23 | 2018-01-05 | 安徽师范大学 | A kind of novel radio bus steering gear system |
CN107977213A (en) * | 2017-12-11 | 2018-05-01 | 江苏树果智能科技有限公司 | A kind of wireless uploading system of inexpensive SCM program |
-
2018
- 2018-09-29 CN CN201811147857.0A patent/CN109407576A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105938462A (en) * | 2015-06-30 | 2016-09-14 | 知鑫知识产权服务(上海)有限公司 | Sensor-general switching equipment based on Micro USB |
CN106227177A (en) * | 2016-09-05 | 2016-12-14 | 广州途道信息科技有限公司 | A kind of control device based on bus communication |
CN106383502A (en) * | 2016-10-17 | 2017-02-08 | 广州市彰道智能技术有限公司 | Household intelligent control system and control method thereof |
CN206849010U (en) * | 2017-06-23 | 2018-01-05 | 安徽师范大学 | A kind of novel radio bus steering gear system |
CN107977213A (en) * | 2017-12-11 | 2018-05-01 | 江苏树果智能科技有限公司 | A kind of wireless uploading system of inexpensive SCM program |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105785958A (en) | Smart factory-based multi-function data acquisition device, acquisition system and method | |
CN105898678A (en) | Pairing method and electronic device | |
CN202394228U (en) | USB (Universal Serial Bus) equipment | |
CN207115402U (en) | Usb circuit | |
CN109407576A (en) | A kind of plug and play can be by the peripheral module of single-chip microcontroller automatic identification | |
CN209044993U (en) | Single-chip microcontroller insertion slot type expansion board and multimode external member for computer programming teaching | |
CN201788900U (en) | Relay board and control system thereof | |
CN201548951U (en) | Analog device for set-top-box interface | |
CN203325205U (en) | Infrared remote controller based on android mobile phone | |
CN107577574B (en) | Debugging switching circuit and debugging circuit board | |
CN207148816U (en) | A kind of program burn writing system and electronic equipment | |
CN101893856B (en) | Relay board and control method and device thereof | |
CN110380719A (en) | Data transmission circuit, control system and the control device of chip | |
CN205897445U (en) | But pluralism plug air purifier | |
CN103294637B (en) | Based on the Magnetic isolation data input/output module of ARM adaptive direction control | |
CN203313471U (en) | Lamp control apparatus | |
CN110032107B (en) | Logic system and control method for controlling on-off of 4 paths of signals by using 3 relays | |
US20090187680A1 (en) | Controller System With Programmable Bi-directional Terminals | |
CN111181818B (en) | Multithreading signal processing system | |
CN205158406U (en) | Wireless upload data's ware circuit of punching card | |
CN203799373U (en) | Difunctional USB equipment | |
CN105259989B (en) | A kind of method of the compatible multi-source of notebook memory on board | |
CN106843035A (en) | A kind of method and system of control smart machine | |
CN105739661B (en) | Voltage conversion circuit | |
CN109240394A (en) | A kind of smart home air environment self-adaption regulation system and its method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20190301 |
|
WD01 | Invention patent application deemed withdrawn after publication |