Photon counting measurement method, system and equipment based on microprocessor and storage medium
By counting the pulse signals output from the photomultiplier tube using the master timer and the slave timer in the microprocessor, the problem of traditional atomic frequency scale relying on large instruments and equipment is solved, high-precision and high-integration photon counting measurement is achieved, and the development index of new atomic frequency scales is improved.
Patent Information
- Application Number
- CN202411805385.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-04-25
AI Technical Summary
Traditional atomic frequency scales rely on large instruments and equipment for photon counting measurements. They have problems such as huge size, limited accuracy and sensitivity to environmental conditions, making it difficult to meet the needs of high integration and compact designs.
The photon counting measurement method based on the microprocessor is used to count the pulse signals output from the photomultiplier tube through the master timer and the slave timer to realize the photon counting measurement, avoiding the dependence on large peripheral instruments.
It realizes high accuracy and high integration of photon counting measurement, improves the development indicators of new atomic frequency marks, and meets the design needs of miniaturization and high integration.
Smart Images

Figure CN119880166A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of microwave frequency standards, and in particular to a microprocessor-based photon counting measurement method, system, device and storage medium. Background Art
[0002] The mercury ion microwave frequency standard is a new type of atomic frequency standard that uses a completely new working principle that is different from traditional atomic frequency standards such as hydrogen, rubidium, and cesium. Its main advantage is that it has strong anti-interference ability and is not easily affected by physical particles and external field disturbances. In addition, the mercury ion frequency standard also has advantages such as smaller motion effects and longer quantum state coherence time, which makes it have great potential in the fields of high-precision measurement, frequency standards, and high-stability time standards. The core working principle of the mercury ion microwave frequency standard is to use a spectral lamp to pump the ultra-fine energy levels of mercury ions. When the mercury ions are pumped to a high energy level, they transition to a low energy level through spontaneous radiation, and in this process generate a fluorescence signal, and the fluorescence signal is photon counted. The measurement accuracy and efficiency of photon counting are the key to the frequency accuracy and stability of the atomic frequency standard.
[0003] However, traditional atomic frequency standards usually rely on large instruments and equipment, such as photon counters, external sensors, and complex electronic measurement equipment to achieve signal acquisition and processing. These traditional methods often have problems such as large size, limited accuracy, and sensitivity to environmental conditions. In addition, the large size of the equipment makes it difficult to meet the requirements of system miniaturization and integration. In the design of modern frequency standards, especially in application scenarios that require high integration and compact design, traditional measurement methods are becoming increasingly unsuitable.
[0004] Therefore, how to design a photon counting measurement method that no longer relies on the use of large peripheral instruments for measurement and meets the design concept of high indicators, miniaturization, and high integration is a problem that needs to be solved at present. Summary of the invention
[0005] The embodiments of the present application provide a microprocessor-based photon counting measurement method, system, device and storage medium, which no longer rely on the use of large peripheral instruments to achieve photon counting measurement.
[0006] In order to achieve the above objectives, this application adopts the following technical solutions:
[0007] In a first aspect, the present application provides a microprocessor-based photon counting measurement method, which is applied to a microprocessor, wherein the microprocessor includes a master timer and a slave timer, and the method includes: setting a counting period of the master timer;
[0008] At the beginning of the counting cycle, the master timer triggers the slave timer to start counting the pulse signal output by the photomultiplier tube;
[0009] At the end of the counting cycle, the master timer triggers the slave timer to stop counting the pulse signal output by the photomultiplier tube, and triggers the slave timer to output the count value of the counting cycle, and clear the count value, waiting for the next counting cycle to start;
[0010] Among them, the pulse signal output by the photomultiplier tube is generated when the photomultiplier tube receives a photon signal and converts the photon signal into an electrical signal.
[0011] In a possible design scheme, the method of the first aspect further includes, before setting the counting period of the main timer, comprising:
[0012] Determine the actual clock frequency of the main timer;
[0013] And based on the actual clock frequency of the main timer and the counting period of the main timer that needs to be set, the capture comparison threshold and the counting threshold of the main timer are set.
[0014] In a possible design solution, the method of the first aspect further includes determining an actual clock frequency of the master timer, including:
[0015] Determine the main clock frequency of the microprocessor according to the high-speed external oscillator frequency, frequency multiplication factor and frequency division factor of the microprocessor;
[0016] Determine the peripheral clock frequency of the main timer according to the main clock frequency of the microprocessor and the peripheral bus frequency division coefficient;
[0017] Determine the actual clock frequency of the main timer according to the main timer peripheral clock frequency and the frequency division coefficient of the main timer;
[0018] Among them, the frequency, multiplication factor and division factor of the high-speed external oscillator of the microprocessor, as well as the division factor of the peripheral bus and the division factor of the main timer are preset.
[0019] In a possible design scheme, the method of the first aspect also includes setting the main timer as an internal clock source.
[0020] In a possible design scheme, the method of the first aspect further includes setting a slave timer as an external clock source.
[0021] A possible design scheme, the method of the first aspect also includes that the counting period of the main timer needs to be set to 1 second.
[0022] In a possible design scheme, the method of the first aspect also includes that the clock pin of the microprocessor is in a multiplexing mode.
[0023] In a second aspect, the present application provides a microprocessor-based photon counting measurement system, the system comprising: a photomultiplier tube, a microprocessor, the microprocessor comprising a master timer and a slave timer;
[0024] A photomultiplier tube is used to receive photon signals and convert them into electrical signals to generate pulse signals;
[0025] The master timer is used to set the counting cycle; at the beginning of the counting cycle, the master timer triggers the slave timer to start counting the pulse signal output by the photomultiplier tube; at the end of the counting cycle, the master timer triggers the slave timer to stop counting the pulse signal output by the photomultiplier tube, and triggers the slave timer to output the count value of the counting cycle, and clear the count value, waiting for the next counting cycle to start;
[0026] The slave timer is used to count the pulse signal, output the count value of the count cycle, clear the count value, and wait for the next count cycle to start.
[0027] In a third aspect, an electronic device is provided, comprising: a processor, and a memory storing a program, wherein the program comprises instructions, which when executed by the processor, cause the processor to execute the microprocessor-based photon counting measurement method described in the first aspect.
[0028] In a fourth aspect, a computer-readable storage medium is provided, which includes a computer program or instruction stored therein. When the computer program or instruction is executed, the microprocessor-based photon counting measurement method described in the first aspect is executed.
[0029] In the embodiment of the present application, a photon signal is received by a photomultiplier tube and converted into an electrical signal to generate a pulse signal; then, the photon counting measurement is realized by a microprocessor including a master timer and a slave timer. The measurement no longer relies on the use of large peripheral instruments, which helps to improve the research and development indicators of a new type of miniaturized and highly integrated atomic frequency standard.
[0030] Other features and advantages of the present application will be described in detail in the subsequent detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0032] Figure 1A schematic diagram of a process flow of a microprocessor-based photon counting measurement method provided in an embodiment of the present application;
[0033] Figure 2 An example diagram of the counting cycle of the main timer provided in an embodiment of the present application;
[0034] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0035] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present application. At the same time, in the description of the embodiments of the present application, the terms "first", "second", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more features. In the description of the embodiments of the present application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.
[0036] Figure 1 A schematic flow chart of a microprocessor-based photon counting measurement method provided in an embodiment of the present application, the method is applied to a microprocessor, and the microprocessor includes a master timer and a slave timer. The slave timer is also a counting timer, and the master timer is also a timing control timer. The master timer can drive the slave timer to count. In addition, the master timer can also drive other integrated peripherals to work, which is not limited here.
[0037] The process of this microprocessor-based photon counting measurement method is as follows:
[0038] Step S101, setting the counting period of the main timer.
[0039] It should be noted that, at present, because the intensity of the fluorescence signal is very weak relative to the noise floor, if the voltage data of the photomultiplier tube is used to measure the photon counting of the fluorescence signal, it will be difficult to obtain the data of the fluorescence signal. Therefore, this application sets the counting period (that is, the integration time) to 1S for single-photon technology collection. In addition, a longer or shorter technical period can be set without restriction.
[0040] Before the method of the embodiment of the present application is specifically executed, it is necessary to clarify that the clock source of the master timer in the present application is set to the internal clock source, the slave timer is set to the slave mode, and the slave clock source is set to the external clock source. And before executing the method of the embodiment of the present application, set relevant parameters such as the frequency division coefficient of the master timer and the slave timer, and the specific pre-set parameters are described in detail below. And the clock pin of the microprocessor is in multiplexing mode, which can save the number of pins of the microprocessor, especially in microprocessors with limited pins.
[0041] In addition, in step S101, before setting the counting period of the master timer, the actual clock frequency of the master timer needs to be determined; then the capture comparison threshold and the counting threshold of the master timer can be set based on the actual clock frequency of the master timer and the counting period of the master timer that needs to be set.
[0042] The actual clock frequency of the main timer is determined, specifically including:
[0043] Step 1: Determine the main clock frequency of the microprocessor according to the high-speed external oscillator frequency, frequency multiplication factor and frequency division factor of the microprocessor.
[0044] That is to say, the clock input of the microprocessor is a high-speed external oscillator, which can be connected to the microprocessor through the external pin of the microprocessor. Its frequency range is very wide, ranging from a few hertz to tens of megahertz, depending on the external crystal used. The frequency of the high-speed external oscillator is represented by F HSe express.
[0045] Combined with the frequency multiplication factor N and several frequency division factors (this application takes two frequency division factors M and P as an example), the main clock frequency F of the microprocessor is determined. system , where the specific calculation formula is
[0046] In addition, the above-mentioned frequency multiplication factor N and several frequency division factors, as well as the high-speed external oscillator frequency are preset and are set according to actual conditions without any restriction.
[0047] Step 2: Determine the peripheral clock frequency of the main timer according to the main clock frequency of the microprocessor and the peripheral bus frequency division coefficient.
[0048] That is, according to the main clock frequency F of the microprocessor system And the peripheral bus frequency division coefficient D2PPRE2, through the formula Determine the peripheral clock frequency F of the main timer Pretimer .
[0049] Among them, the peripheral bus frequency division coefficient is also pre-set, and is set according to actual conditions without any restriction.
[0050] Step three, determining the actual clock frequency of the master timer according to the master timer peripheral clock frequency and the frequency division coefficient of the master timer.
[0051] The peripheral clock frequency F of the main timer is known through the above step 2 Pretimer , combined with the main timer's frequency division coefficient PSC Timer , the actual clock frequency F of the main timer can be determined Timer .
[0052] The specific calculation formula is: The division factor of the main timer is preset.
[0053] According to the above steps 1 to 3, the actual clock frequency of the master timer can be determined, and based on the actual clock frequency of the master timer and the count period of the master timer to be set, the capture comparison threshold and count threshold of the master timer can be set.
[0054] like Figure 2 As shown, the counting cycle of the main timer that can be set in this application is 1S, that is, the working time T1 in the full cycle is 2S, and the working time in the single cycle T2 is 1S. According to this value and the actual clock frequency F of the main timer Timer , you can determine the capture comparison threshold CCR of the above master timer x and count threshold ARR.
[0055] The specific calculation formula is ARR = T1 × F Timer , CCR x =T2×F Timer .
[0056] In addition, the working time in the full cycle in the example of this application is twice the working time in a single cycle, but the full cycle time and the working time in a single cycle are not necessarily twice the relationship. This depends entirely on the duty cycle of the system, which is set according to actual conditions without any restriction.
[0057] Step S102: When the counting cycle starts, the master timer triggers the slave timer to start counting the pulse signal output by the photomultiplier tube.
[0058] Among them, the pulse signal output by the photomultiplier tube is generated when the photomultiplier tube receives a photon signal and converts the photon signal into an electrical signal.
[0059] Step S103, at the end of the counting cycle, the master timer triggers the slave timer to stop counting the pulse signal output by the photomultiplier tube, and triggers the slave timer to output the count value of the counting cycle, and clears the count value, waiting for the next counting cycle to start.
[0060] It can also be understood that when the main timer triggers an interrupt, the slave timer has stopped working and no photon pulses are received within the corresponding time. At the same time, the count value of the slave timer is read in the interrupt. After obtaining it, the count value of the slave timer is cleared, and the master timer can wait for the next cycle to work. The slave timer continues to receive photon pulses, and the photon counting measurement of 1S can be completed cyclically.
[0061] In summary, the embodiment of the present application receives photon signals through photomultiplier tubes and converts the photon signals into electrical signals to generate pulse signals; then, photon counting measurements are achieved through a microprocessor including a master timer and a slave timer, and measurement is no longer dependent on the use of large peripheral instruments, which helps to improve the research and development indicators of new atomic frequency standards with miniaturization and high integration.
[0062] Combination of the above Figure 1-Figure 2 The microprocessor-based photon counting measurement method provided in the embodiment of the present application is described in detail, and the microprocessor-based photon counting measurement system provided in the embodiment of the present application is described in detail below.
[0063] The system specifically includes: a photomultiplier tube, a microprocessor, and the microprocessor includes a master timer and a slave timer, as shown below:
[0064] Photomultiplier tube, used to receive photon signals and convert them into electrical signals to generate pulse signals.
[0065] The master timer is used to set the counting cycle; at the beginning of the counting cycle, the master timer triggers the slave timer to start counting the pulse signal output by the photomultiplier tube; at the end of the counting cycle, the master timer triggers the slave timer to stop counting the pulse signal output by the photomultiplier tube, and triggers the slave timer to output the count value of the counting cycle, and clears the count value, waiting for the next counting cycle to start.
[0066] The slave timer is used to count the pulse signal, output the count value of the count cycle, clear the count value, and wait for the next count cycle to start.
[0067] In addition, as for the specific implementation of the above system, since it is basically similar to the method implementation, the description is relatively simple, and the relevant parts can be referred to the partial description of the method implementation.
[0068] The present application embodiment also provides an electronic device 300, such as Figure 3 As shown, it includes a memory 301, a processor 302, and a computer program 303 stored in the memory 301 and executable on the processor 302. When the processor 302 executes the computer program 303, the steps of the microprocessor-based photon counting measurement method provided in the first aspect are implemented.
[0069] In applications, the electronic device may include, but is not limited to, a processor and a memory. Figure 3 This is only an example of an electronic device and does not constitute a limitation on the electronic device. It may include more or fewer components than shown in the figure, or combine certain components, or different components, such as input and output devices, network access devices, etc. Input and output devices may include cameras, audio acquisition / playback devices, display screens, etc. Network access devices may include a network module for wirelessly communicating with external devices.
[0070] In applications, the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.
[0071] In applications, the memory may be an internal storage unit of an electronic device in some embodiments, such as a hard disk or memory of the electronic device. The memory may also be an external storage device of the electronic device in other embodiments, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device. The memory may also include both an internal storage unit of the electronic device and an external storage device. The memory is used to store operating systems, applications, boot loaders (BootLoader), data, and other programs, such as program codes of computer programs, etc. The memory may also be used to temporarily store data that has been output or is to be output.
[0072] The embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0073] The present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of each of the above-mentioned method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device capable of carrying the computer program code to an electronic device, a recording medium, a computer memory, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), an electrical carrier signal, a telecommunication signal, and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a disk or an optical disk.
[0074] Those of ordinary skill in the art will appreciate that the devices and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0075] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interface, indirect coupling or communication connection of devices, which can be electrical, mechanical or other forms.
[0076] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A photon counting measurement method based on a microprocessor, applied to a microprocessor, wherein the microprocessor includes a master timer and a slave timer, characterized in that: The method comprises: Setting the counting period of the main timer; When the counting cycle starts, the master timer triggers the slave timer to start counting the pulse signal output by the photomultiplier tube; At the end of the counting cycle, the master timer triggers the slave timer to stop counting the pulse signal output by the photomultiplier tube, and triggers the slave timer to output the count value of the counting cycle, and clear the count value, waiting for the next counting cycle to start; The pulse signal output by the photomultiplier tube is generated when the photomultiplier tube receives a photon signal and converts the photon signal into an electrical signal.
2. The microprocessor-based photon counting measurement method according to claim 1, characterized in that: Before setting the counting period of the main timer, the method includes: determining an actual clock frequency of the master timer; And based on the actual clock frequency of the master timer and the counting period of the master timer that needs to be set, the capture comparison threshold and the counting threshold of the master timer are set.
3. The microprocessor-based photon counting measurement method according to claim 1, characterized in that: Determining the actual clock frequency of the master timer includes: Determining the main clock frequency of the microprocessor according to the high-speed external oscillator frequency, the frequency multiplication factor and the frequency division factor of the microprocessor; Determining the peripheral clock frequency of the master timer according to the main clock frequency of the microprocessor and the peripheral bus frequency division coefficient; Determining the actual clock frequency of the master timer according to the master timer peripheral clock frequency and the frequency division coefficient of the master timer; Among them, the high-speed external oscillator frequency, multiplication factor and division factor of the microprocessor, as well as the peripheral bus division factor and the main timer division factor are preset.
4. The microprocessor-based photon counting measurement method according to claim 1, characterized in that: The master timer is set to an internal clock source.
5. The microprocessor-based photon counting measurement method according to claim 1, characterized in that: The slave timer is set to an external clock source.
6. The microprocessor-based photon counting measurement method according to claim 2, characterized in that: The counting period of the main timer that needs to be set is 1 second.
7. The microprocessor-based photon counting measurement method according to claim 1, characterized in that: The clock pins of the microprocessor are in multiplexing mode.
8. A microprocessor-based photon counting measurement system, characterized in that: The system comprises: a photomultiplier tube, a microprocessor, and the microprocessor comprises a master timer and a slave timer; The photomultiplier tube is used to receive a photon signal and convert the photon signal into an electrical signal to generate a pulse signal; The master timer is used to set a counting cycle; when the counting cycle starts, the master timer triggers the slave timer to start counting the pulse signal output by the photomultiplier tube; when the counting cycle ends, the master timer triggers the slave timer to stop counting the pulse signal output by the photomultiplier tube, and triggers the slave timer to output the count value of the counting cycle, and clears the count value, waiting for the next counting cycle to start; The slave timer is used to count the pulse signal, output the count value of the counting cycle, clear the count value, and wait for the next counting cycle to start.
9. An electronic device, characterized in that: The electronic device comprises: a processor, and a memory storing a program, wherein the program comprises instructions, and when the instructions are executed by the processor, the processor is caused to perform the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a computer program or instruction stored therein, and when the computer program or instruction is executed, the method according to any one of claims 1 to 7 is performed.