CN101629847A - Method for detecting environmental light and system thereof - Google Patents
Method for detecting environmental light and system thereof Download PDFInfo
- Publication number
- CN101629847A CN101629847A CN200910090535A CN200910090535A CN101629847A CN 101629847 A CN101629847 A CN 101629847A CN 200910090535 A CN200910090535 A CN 200910090535A CN 200910090535 A CN200910090535 A CN 200910090535A CN 101629847 A CN101629847 A CN 101629847A
- Authority
- CN
- China
- Prior art keywords
- light
- data
- dma
- fifo buffer
- control module
- 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.)
- Granted
Links
Images
Landscapes
- Optical Communication System (AREA)
Abstract
The invention provides a method for detecting environmental light and a system thereof. The invention skillfully combines a CPU chip with an analog voice signal input interface with a light detecting device, completely uses an idle interface of the existing CPU chip with the analog voice signal input interface, does not need to change the original structure opening parameters, and the like, of the CPU chip, and replaces a special analog-to-digital conventer (ADC) with the existing hardware resource, thereby preventing a special bus which aims at an access interface from being specially designed, and reducing the design complexity and the cost of the system.
Description
Technical field
The present invention relates to signal processing technology, the method and system that particularly a kind of surround lighting detects.
Background technology
Along with the minimizing day by day of resource, the energy-conservation technological development direction that has become various electronic equipments, automatic control equipment etc.The surround lighting detection technique is answered energy-conservation demand and is widely used, make with the equipment backlight equipment of LCD and light emitting diode indicator (for example with) can according to the environment light intensity that detects regulate backlight illumination automatically or close backlight, thereby reach purpose of energy saving.
In existing surround lighting detection technique, optical detection device and analog to digital converter (ADC) the composition device that is absolutely necessary, wherein, optical detection device mainly is made up of photodiode, be used to obtain surround lighting and detect data, light intensity signal for example, these data are simulating signal.The surround lighting detection data that ADC is used for that optical detection device is obtained are carried out analog to digital conversion and are obtained digital signal, and provide system's access interface to read for control system, as shown in Figure 1.But, the ADC of available technology adopting is the special ADC chip, system's access interface that it provides is private buss such as local bus (Local Bus) or I2C bus, this just needs control system when the surround lighting detection data to ADC output read, need ad hoc design at private buss such as local bus or I2C buses, increase the complexity and the system cost of system design.
Summary of the invention
In view of this, the invention provides the method and system that a kind of surround lighting detects, so that reduce the complexity and the system cost of system design.
The system that a kind of surround lighting detects, this system comprises: the dedicated cpu chip and the optical detection device that have the analog voice signal input interface;
Described optical detection device is used for the light detecting signal that obtains is exported to described dedicated cpu chip;
Described dedicated cpu chip comprises: control module, AD conversion unit, bus conversion unit, first-in first-out FIFO buffer memory, direct memory visit DMA unit and internal memory;
Described control module is used for controlling the light detection data of analog voice input interface reception from optical detection device according to being provided with of user, and opens DMA; After closing DMA, from described internal memory, read light and detect data, and this light is detected data carry out analyzing and processing;
Described AD conversion unit, the light that is used for that the analog voice input interface is received detect data and carry out offering described bus conversion unit after the analog to digital conversion;
Described bus conversion unit after the light detection data that are used for receiving are serial data mode from the parallel data mode switch, is sent into described FIFO buffer memory;
Described DMA unit when being used to open, reading light and detects data and write described internal memory from described FIFO buffer memory; When closing, stop from described FIFO buffer memory, to read light and detect data.
The method that a kind of surround lighting detects, optical detection device is connected with the idle analog voice signal input interface of the dedicated cpu chip that has the analog voice signal input interface, comprises control module, AD conversion unit, bus conversion unit, FIFO buffer memory, DMA unit and internal memory in this dedicated cpu chip; This method comprises:
The analog voice signal input interface that is connected with optical detection device is under the control of control module, and the light that receives from described optical detection device detects data; Described analog-converted unit detects data with this light to carry out offering described bus conversion unit after the analog to digital conversion; After the light detection data that described bus conversion unit will receive are serial data mode from the parallel data mode switch, send into described FIFO buffer memory;
When described DMA unit is opened under the control of described control module, from described FIFO buffer memory, read light and detect data and write described internal memory, when under the control of described control module, closing, stop from described FIFO buffer memory, to read light and detect data; Described control module reads light and detects data and carry out analyzing and processing after closing described DMA from described internal memory.
As can be seen from the above technical solutions, method and system provided by the invention, the cpu chip that will have the analog voice signal input interface dexterously combines with optical detection device, made full use of the idle interface of the cpu chip of existing band analog voice signal input interface, need not the original structure of cpu chip and parameter etc. are changed, adopt existing hardware resource to come the ADC of instead of dedicated, avoided carrying out special design at the private bus of access interface, reduce the complexity of system design, also reduced system cost.
Description of drawings
Fig. 1 is an environment optical detection system structural drawing of the prior art;
The system construction drawing that Fig. 2 provides for the embodiment of the invention.
Embodiment
In order to make the purpose, technical solutions and advantages of the present invention clearer, describe the present invention below in conjunction with the drawings and specific embodiments.
Carry out complicated design for fear of the private bus that provides at special ADC, the inventor notices the cpu chip that has the analog voice signal input interface many, its analog input interface often is not fully used, for example in the dedicated cpu chip of IP phone terminal, integrated multi-channel analog voice signal input interface, but multiple signals input interface not absorb usually in actual applications.And, these cpu chip inside have all possessed ADC, buffer memory, bus even the direct memory visit hardware resources such as (DMA) that simulating signal is carried out special processing, possesses high processing speed, therefore, inventor's cpu chip of proposing these can be had the multichannel analog signals input interface directly combines with optical detection device and is used for environment optical detection system.
Utilizing the dedicated cpu chip that has multi-channel analog voice signal input interface in the IP phone terminal (IPPHONE) to carry out the surround lighting detection below is described in detail, idle analog voice signal input interface in this dedicated cpu chip directly is connected with pick-up unit, as shown in Figure 2, this dedicated cpu chip is former to be used for the analog voice signal of input is handled, the present invention need not the structure of this dedicated cpu chip is done any change, also need not the parameter of DMA is changed, only need detect data at the light of input and carry out the modification of control strategy at the control module place.
Optical detection device is exported to the dedicated cpu chip with the light detecting signal that obtains.
Control module detects data and opens DMA according to user's the light that control analog input interface receives from optical detection device that is provided with, and ADC detects data with this light to carry out sending into string and bus conversion interface after the analog to digital conversion.
Because it is parallel data that the light of ADC output detects data, therefore, after string and bus conversion interface were converted to serial data with this parallel data, the light detection data that will be converted to serial data by multi-channel serial port (McSP) were sent into first-in first-out (FIFO) buffer memory.Wherein, string and bus conversion interface and McSP can be realized by a bus conversion unit.
DMA reads light and detects data and send into fifo queue in the internal memory from the FIFO buffer memory when opening, stop to read light in the time of in off position and detect data from the FIFO buffer memory.
Control module reads light and detects data and carry out analyzing and processing after closing DMA in the fifo queue from internal memory.
In said process, all do not change for ADC, string and bus conversion interface, McSP and FIFO etc., it is identical with processing mode to voice analog signal that light is detected the processing mode of data.But, for speech data, because the speech simulation data are continuous, also can have idle frame in order to keep in the continuity speech simulation data even without speech frame, therefore, DMA can carry out continual reading to the speech data in the FIFO buffer memory, can there be closed condition, and, for fear of DMA write and control module read conflict to internal memory, in internal memory, have two-level cache.
Yet, it is not continual detecting data for light, control module also need not to obtain all light and detects data when carrying out analyzing and processing, and, the surround lighting variation is much slower than voice, does not need very high real-time, therefore, can control the opening and closing of DMA by control module, when reading internal memory, close DMA.After DMA opened, DMA can not judge whether the fifo queue in the internal memory is full, but the fifo queue in internal memory writes data incessantly, until being closed.
This control module can be undertaken by the setting to register the control of DMA.In addition, can utilize timer cycle ground control DMA opening and closing, for example, close 1s after control DMA opens 1s, after the light that promptly reads 1s detects data, close 1s and read fifo queue in the internal memory for control module; Also can control the DMA opening and closing in real time according to user's demand, for example when the light detection data that will obtain sometime, switch the analog input interface constantly at this and receive optical detection device, and unlatching DMA, after obtaining a period of time, close DMA and read fifo queue in the internal memory for control module.
Because DMA separates reading of internal memory writing with control module of internal memory, therefore, only needs to be provided with level cache in internal memory, thereby saves internal memory more.Because light detects data and be strict with real-time and integrality unlike speech data, therefore, the fifo queue in the internal memory can be chosen neatly, needn't be subjected to the restriction such as DMA parameters such as DMA timing and interruption durations.
In above-mentioned dedicated cpu chip, analog input interface, DMA and internal memory all provide the control of the controlled unit of control interface, method of the present invention can be finished the switching of above-mentioned analog input interface, the opening and closing of DMA, the distribution of internal memory and the control that reads by the software that is added on control module, in addition, can also finish existing configuration, for example configuration of DMA parameter etc. to each cell parameters.
By above description as can be seen, method and system provided by the invention, the cpu chip that will have the analog voice signal input interface dexterously combines with optical detection device, made full use of the idle interface of the cpu chip of existing band analog voice signal input interface, need not the original structure of cpu chip and parameter etc. are changed, adopt existing hardware resource to come the ADC of instead of dedicated, avoided carrying out special design at the private bus of access interface, reduce the complexity of system design, also reduced system cost.
The above only is preferred embodiment of the present invention, and is in order to restriction the present invention, within the spirit and principles in the present invention not all, any modification of being made, is equal to replacement, improvement etc., all should be included within the scope of protection of the invention.
Claims (7)
1, a kind of system of surround lighting detection is characterized in that this system comprises: the dedicated cpu chip and the optical detection device that have the analog voice signal input interface;
Described optical detection device is used for the light detecting signal that obtains is exported to described dedicated cpu chip;
Described dedicated cpu chip comprises: control module, AD conversion unit, bus conversion unit, first-in first-out FIFO buffer memory, direct memory visit DMA unit and internal memory;
Described control module is used for controlling the light detection data of analog voice input interface reception from optical detection device according to being provided with of user, and opens DMA; After closing DMA, from described internal memory, read light and detect data, and this light is detected data carry out analyzing and processing;
Described AD conversion unit, the light that is used for that the analog voice input interface is received detect data and carry out offering described bus conversion unit after the analog to digital conversion;
Described bus conversion unit after the light detection data that are used for receiving are serial data mode from the parallel data mode switch, is sent into described FIFO buffer memory;
Described DMA unit when being used to open, reading light and detects data and write described internal memory from described FIFO buffer memory; When closing, stop from described FIFO buffer memory, to read light and detect data.
2, system according to claim 1 is characterized in that, described bus conversion unit comprises: string and bus conversion interface and multi-channel serial port;
Described string and bus conversion interface, the light that is used for receiving detects data and export to described multi-channel serial port after the parallel data mode switch is serial data mode;
Described multi-channel serial port, the light that is used for receiving detects data and writes described FIFO buffer memory.
3, system according to claim 1 is characterized in that, described control module also is used for detecting data allocations FIFO buffer memory at described internal memory for light;
Described DMA unit detects light the described FIFO buffer memory that distributes in the data write memory.
4, system according to claim 1 is characterized in that, described control module utilizes the opening and closing of the described DMA of control unit, timer cycle ground, perhaps controls the opening and closing of described DMA unit in real time according to user's demand.
5, a kind of method of surround lighting detection, it is characterized in that, optical detection device is connected with the idle analog voice signal input interface of the dedicated cpu chip that has the analog voice signal input interface, comprises control module, AD conversion unit, bus conversion unit, FIFO buffer memory, DMA unit and internal memory in this dedicated cpu chip; This method comprises:
The analog voice signal input interface that is connected with optical detection device is under the control of control module, and the light that receives from described optical detection device detects data; Described analog-converted unit detects data with this light to carry out offering described bus conversion unit after the analog to digital conversion; After the light detection data that described bus conversion unit will receive are serial data mode from the parallel data mode switch, send into described FIFO buffer memory;
When described DMA unit is opened under the control of described control module, from described FIFO buffer memory, read light and detect data and write described internal memory, when under the control of described control module, closing, stop from described FIFO buffer memory, to read light and detect data; Described control module reads light and detects data and carry out analyzing and processing after closing described DMA from described internal memory.
6, method according to claim 5 is characterized in that, this method also comprises: described control module detects data allocations FIFO buffer memory for light in described internal memory;
Writing described internal memory is specially: the light that described DMA will read the unit detects data and writes the FIFO buffer memory that detects data allocations in the described internal memory for light;
Reading light detection data from described internal memory is specially: described control module reads light in the FIFO buffer memory for light detection data allocations and detects data from described internal memory.
7, method according to claim 5 is characterized in that, described control module utilizes the opening and closing of the described DMA of control unit, timer cycle ground, perhaps controls the opening and closing of described DMA unit in real time according to user's demand.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2009100905351A CN101629847B (en) | 2009-08-19 | 2009-08-19 | Method for detecting environmental light and system thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2009100905351A CN101629847B (en) | 2009-08-19 | 2009-08-19 | Method for detecting environmental light and system thereof |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101629847A true CN101629847A (en) | 2010-01-20 |
CN101629847B CN101629847B (en) | 2012-07-04 |
Family
ID=41575041
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2009100905351A Expired - Fee Related CN101629847B (en) | 2009-08-19 | 2009-08-19 | Method for detecting environmental light and system thereof |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101629847B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2022241631A1 (en) * | 2021-05-18 | 2022-11-24 | 京东方科技集团股份有限公司 | Detection circuit, display panel, and detection method |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN201017449Y (en) * | 2007-03-02 | 2008-02-06 | 洪健 | Photoelectric integrated communication signal tester |
-
2009
- 2009-08-19 CN CN2009100905351A patent/CN101629847B/en not_active Expired - Fee Related
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2022241631A1 (en) * | 2021-05-18 | 2022-11-24 | 京东方科技集团股份有限公司 | Detection circuit, display panel, and detection method |
Also Published As
Publication number | Publication date |
---|---|
CN101629847B (en) | 2012-07-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR101821639B1 (en) | Intelligent ancillary electronic device | |
US7929518B2 (en) | Method and system for a gigabit Ethernet IP telephone chip with integrated DDR interface | |
CN103905654B (en) | ESD interference processing method and processing system in the display screen of MIPI interface | |
CN102495132A (en) | Multi-channel data acquisition device for submarine pipeline magnetic flux leakage internal detector | |
WO2002101566A3 (en) | Flexible i/o interface and method for providing a common interface to a processing core | |
CN103544470B (en) | A kind of moving platform air target Dual band IR isomerism parallel automatic target detection device | |
US20090006696A1 (en) | Computer system, processor device, and method for controlling computer system | |
CN103347136A (en) | Method and device for mobile phone energy saving processing | |
CN101629847B (en) | Method for detecting environmental light and system thereof | |
CN101303620A (en) | Low power consumption multi-channel control system | |
CN206743428U (en) | A kind of intelligent cloud intercom machine | |
CN101752901B (en) | Method, system, equipment and device for synchronizing data sampling at different places | |
TWI264647B (en) | Configurable multi-port multi-protocol network interface to support packet processing | |
CN101022689A (en) | Method and device for protecting from mistake operation in natural light brightness full-automatic control road lamp switch | |
CN103329438B (en) | The device of the AFE (analog front end) noise that suppression is caused by electric charge pump and system | |
CN203057159U (en) | Multifunctional photoelectric integrated converter | |
CN103166863A (en) | Lumped type 8 X 8 low-latency and high-bandwidth crosspoint cache queued on-chip router | |
CN101505377B (en) | Light ray lightness detection method in CMOS image sensor and special chip therefor | |
CN203340053U (en) | Device using FPGA to achieve synchronization of multi-channel serial ADC | |
CN203385800U (en) | Electromagnetic compatibility performance test system by using multipath switch to achieve multipath signal transmission | |
CN208657132U (en) | A kind of control circuit device for multi-mode atmosphere lamp control system | |
CN208999802U (en) | A kind of FPGA IC chip of built-in high speed data converter | |
CN102681953B (en) | Direct memory access (DMA) device and data receive method thereof | |
CN105389155A (en) | Method and system for receiving TDM audio data by using SPI interface | |
CN207652443U (en) | A kind of mini signals solution tuned plate |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CP03 | Change of name, title or address |
Address after: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No. Patentee after: Xinhua three Technology Co., Ltd. Address before: 310053 Hangzhou hi tech Industrial Development Zone, Zhejiang province science and Technology Industrial Park, No. 310 and No. six road, HUAWEI, Hangzhou production base Patentee before: Huasan Communication Technology Co., Ltd. |
|
CP03 | Change of name, title or address | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20120704 Termination date: 20200819 |
|
CF01 | Termination of patent right due to non-payment of annual fee |