CN101629847B - Method for detecting environmental light and system thereof - Google Patents

Method for detecting environmental light and system thereof Download PDF

Info

Publication number
CN101629847B
CN101629847B CN2009100905351A CN200910090535A CN101629847B CN 101629847 B CN101629847 B CN 101629847B CN 2009100905351 A CN2009100905351 A CN 2009100905351A CN 200910090535 A CN200910090535 A CN 200910090535A CN 101629847 B CN101629847 B CN 101629847B
Authority
CN
China
Prior art keywords
light
data
dma
control module
fifo buffer
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.)
Expired - Fee Related
Application number
CN2009100905351A
Other languages
Chinese (zh)
Other versions
CN101629847A (en
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.)
New H3C Technologies Co Ltd
Original Assignee
Hangzhou H3C Technologies 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 Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN2009100905351A priority Critical patent/CN101629847B/en
Publication of CN101629847A publication Critical patent/CN101629847A/en
Application granted granted Critical
Publication of CN101629847B publication Critical patent/CN101629847B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

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

The method and system that a kind of surround lighting detects
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 automatically backlight illumination perhaps 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 obtained digital signal, and provide system's access interface to supply control system to read, and are 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, and needs ad hoc design to private buss such as local bus or I2C buses, has increased 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; Said optical detection device is connected with the analog voice signal input interface of said dedicated cpu chip, and said dedicated cpu chip has other analog voice signal input interface to be connected with analog voice signal;
Said optical detection device is used for the light detecting signal that obtains is exported to said dedicated cpu chip;
Said dedicated cpu chip comprises: control module, AD conversion unit, bus conversion unit, FIFO FIFO buffer memory, direct memory visit DMA unit and internal memory;
Said control module is used for receiving the light detection data from optical detection device according to user's the control analog voice input interface that is provided with, and opens DMA; After closing DMA, from said internal memory, read light and detect data, and this light is detected data carry out analyzing and processing;
Said AD conversion unit, the light that is used for that the analog voice input interface is received detect data to carry out offering said bus conversion unit after the analog to digital conversion;
Said bus conversion unit after being used for the light that receives detected data and be serial data mode from the parallel data mode switch, is sent into said FIFO buffer memory;
Said DMA unit when being used to open, reading light and detects data and write said internal memory from said FIFO buffer memory; When closing, stop from said FIFO buffer memory, to read light and detect data;
Wherein, said control module utilizes the opening and closing of the said DMA of timer cycle property ground control unit, perhaps controls the opening and closing of said DMA unit in real time according to user's demand.
The method that a kind of surround lighting detects, optical detection device is connected with the analog voice signal input interface of said dedicated cpu chip, and said dedicated cpu chip has other analog voice signal input interface to be connected with analog voice signal; Comprise 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 said optical detection device detects data; Said analog-converted unit detects data with this light to carry out offering said bus conversion unit after the analog to digital conversion; After the light detection data that said bus conversion unit will receive are serial data mode from the parallel data mode switch, send into said FIFO buffer memory;
When said DMA unit is opened under the control of said control module, from said FIFO buffer memory, read light and detect data and write said internal memory, when under the control of said control module, closing, stop from said FIFO buffer memory, to read light and detect data; Said control module reads light and detects data and carry out analyzing and processing after closing said DMA from said internal memory;
Wherein, said control module utilizes the opening and closing of the said DMA of timer cycle property ground control unit, perhaps controls the opening and closing of said DMA unit in real time according to user's demand.
Can find out by above technical scheme; 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, has 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, reduced the complexity of system design, also reduced system cost to the private bus of access interface.
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 object of the invention, technical scheme and advantage clearer, describe the present invention below in conjunction with accompanying drawing and specific embodiment.
Carry out complicated design for fear of the private bus that provides to 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 at IP phone terminal, and integrated multi-channel analog voice signal input interface; But in practical application, the multiple signals input interface is not absorb usually.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, the inventor proposes and can these cpu chips that has the multichannel analog signals input interface directly be combined to be used for environment optical detection system with optical detection device.
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, and only need detect data to the light of input at the control module place and carry out the modification of control strategy.
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.
The light detection data of exporting owing to ADC are parallel data, and therefore, after string and bus conversion interface converted this parallel data into serial data, the light detection data that will be converted into serial data by multi-channel serial port (McSP) were sent into FIFO (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 the fifo queue in the internal memory from the FIFO buffer memory when opening, stop from the FIFO buffer memory, to read light in the time of in off position and detect data.
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, and 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 carry out through the setting to register the control of DMA.In addition, can utilize timer cycle property 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 supply control module to read the fifo queue in the internal memory; 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 open DMA, after obtaining a period of time, close DMA and supply control module to read the fifo queue in the internal memory.
Because DMA separates reading of internal memory writing with control module of internal memory, therefore, in internal memory, only level cache need be set, thereby save internal memory more.Because light detects data and unlike such real-time and the integrality of being strict with of speech data, therefore, the fifo queue in the internal memory can be chosen neatly, needn't receive such as DMA timing and the restriction of interrupting DMA parameters such as duration.
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 accomplished the switching of above-mentioned analog input interface, the opening and closing of DMA, the distribution of internal memory and the control that reads through the software that is added on control module; In addition, can also accomplish existing configuration, for example configuration of DMA parameter etc. to each cell parameters.
Can find out by above description; 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, has 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, reduced the complexity of system design, also reduced system cost to the private bus of access interface.
The above is merely preferred embodiment of the present invention, and is in order to restriction the present invention, not all within spirit of the present invention and principle, any modification of being made, is equal to replacement, improvement etc., all should be included within the scope that the present invention protects.

Claims (5)

1. the system that surround lighting detects is characterized in that this system comprises: the dedicated cpu chip and the optical detection device that have the analog voice signal input interface; Said optical detection device is connected with the analog voice signal input interface of said dedicated cpu chip, and said dedicated cpu chip has other analog voice signal input interface to be connected with analog voice signal;
Said optical detection device is used for the light detecting signal that obtains is exported to said dedicated cpu chip;
Said dedicated cpu chip comprises: control module, AD conversion unit, bus conversion unit, FIFO FIFO buffer memory, direct memory visit DMA unit and internal memory;
Said control module is used for receiving the light detection data from optical detection device according to user's the control analog voice input interface that is provided with, and opens DMA; After closing DMA, from said internal memory, read light and detect data, and this light is detected data carry out analyzing and processing;
Said AD conversion unit, the light that is used for that the analog voice input interface is received detect data to carry out offering said bus conversion unit after the analog to digital conversion;
Said bus conversion unit after being used for the light that receives detected data and be serial data mode from the parallel data mode switch, is sent into said FIFO buffer memory;
Said DMA unit when being used to open, reading light and detects data and write said internal memory from said FIFO buffer memory; When closing, stop from said FIFO buffer memory, to read light and detect data;
Wherein, said control module utilizes the opening and closing of the said DMA of timer cycle property ground control unit, perhaps controls the opening and closing of said DMA unit in real time according to user's demand.
2. system according to claim 1 is characterized in that, said bus conversion unit comprises: string and bus conversion interface and multi-channel serial port;
Said string and bus conversion interface are used for that the light that receives is detected data and after the parallel data mode switch is serial data mode, export to said multi-channel serial port;
Said multi-channel serial port is used for that the light that receives is detected data and writes said FIFO buffer memory.
3. system according to claim 1 is characterized in that, said control module also is used for detecting data allocations FIFO buffer memory at said internal memory for light;
Said DMA unit detects light the said FIFO buffer memory that distributes in the data write memory.
4. the method that surround lighting detects it is characterized in that optical detection device is connected with the analog voice signal input interface of dedicated cpu chip, and said dedicated cpu chip has other analog voice signal input interface to be connected with analog voice signal; Comprise 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 said optical detection device detects data; Said analog-converted unit detects data with this light to carry out offering said bus conversion unit after the analog to digital conversion; After the light detection data that said bus conversion unit will receive are serial data mode from the parallel data mode switch, send into said FIFO buffer memory;
When said DMA unit is opened under the control of said control module, from said FIFO buffer memory, read light and detect data and write said internal memory, when under the control of said control module, closing, stop from said FIFO buffer memory, to read light and detect data; Said control module reads light and detects data and carry out analyzing and processing after closing said DMA from said internal memory;
Wherein, said control module utilizes the opening and closing of the said DMA of timer cycle property ground control unit, perhaps controls the opening and closing of said DMA unit in real time according to user's demand.
5. method according to claim 4 is characterized in that, this method also comprises: said control module detects data allocations FIFO buffer memory for light in said internal memory;
Writing said internal memory is specially: light that said DMA will read the unit detects data and writes in the said internal memory FIFO buffer memory for light detection data allocations;
From said internal memory, reading light detection data is specially: said control module reads light in the FIFO buffer memory for light detection data allocations and detects data from said internal memory.
CN2009100905351A 2009-08-19 2009-08-19 Method for detecting environmental light and system thereof Expired - Fee Related CN101629847B (en)

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 CN101629847A (en) 2010-01-20
CN101629847B true 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)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20240153423A1 (en) * 2021-05-18 2024-05-09 Beijing Boe Display Technology Co., Ltd. Detection circuit, display panel, and detection method

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201017449Y (en) * 2007-03-02 2008-02-06 洪健 Photoelectric integrated communication signal tester

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201017449Y (en) * 2007-03-02 2008-02-06 洪健 Photoelectric integrated communication signal tester

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
汤金宽等.用DSP技术从模拟视频信号中获取数字图像.《单片机与嵌入式系统应用》.2005,22-26. *

Also Published As

Publication number Publication date
CN101629847A (en) 2010-01-20

Similar Documents

Publication Publication Date Title
CN103297055A (en) Device for achieving multipath serial ADC synchronization by adopting FPGA
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
TW200620290A (en) Configurable ready/busy control
TW200739600A (en) Multi-port memory device with serial input/output interface and control method thereof
TW200731066A (en) Memory systems with memory chips down and up
KR20110061189A (en) Asynchronization upsizing circuit in data processing system
CN104010005A (en) Method and system supporting access of sensors of different types
CN101629847B (en) Method for detecting environmental light and system thereof
CN103347136A (en) Method and device for mobile phone energy saving processing
CN108227539B (en) Configurable multi-channel high-speed analog quantity acquisition system and method
CN102567272A (en) Method for improving working frequency of SPI (Serial Peripheral Interface) circuit
CN106294228B (en) Input and output extended chip and its verification method
CN103246754A (en) High-speed digital signal acquiring and storing system
DE59911743D1 (en) ADAPTABLE CHIP CARD
BRPI0514929A (en) transmission signal arrangement
TW200723298A (en) Multi-port memory device with serial input/output interface
CN101483768B (en) Electronic apparatus
CN203057159U (en) Multifunctional photoelectric integrated converter
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
CN207652443U (en) A kind of mini signals solution tuned plate
WO2010114402A3 (en) Interface for communication between sensing devices and i2c bus
CN106970890B (en) Multistage I2C bus control method
CN204669505U (en) A kind of multifunctional high speed image pick-up card

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
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.

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20120704

Termination date: 20200819