CN115407103A - Method for outputting complete alternating current waveform at high frequency - Google Patents
Method for outputting complete alternating current waveform at high frequency Download PDFInfo
- Publication number
- CN115407103A CN115407103A CN202210890489.9A CN202210890489A CN115407103A CN 115407103 A CN115407103 A CN 115407103A CN 202210890489 A CN202210890489 A CN 202210890489A CN 115407103 A CN115407103 A CN 115407103A
- Authority
- CN
- China
- Prior art keywords
- waveform
- alternating current
- outputting
- dac
- high frequency
- 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
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01R—MEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
- G01R13/00—Arrangements for displaying electric variables or waveforms
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61N—ELECTROTHERAPY; MAGNETOTHERAPY; RADIATION THERAPY; ULTRASOUND THERAPY
- A61N1/00—Electrotherapy; Circuits therefor
- A61N1/18—Applying electric currents by contact electrodes
- A61N1/32—Applying electric currents by contact electrodes alternating or intermittent currents
- A61N1/36—Applying electric currents by contact electrodes alternating or intermittent currents for stimulation
- A61N1/3605—Implantable neurostimulators for stimulating central or peripheral nerve system
- A61N1/3606—Implantable neurostimulators for stimulating central or peripheral nerve system adapted for a particular treatment
- A61N1/36082—Cognitive or psychiatric applications, e.g. dementia or Alzheimer's disease
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01R—MEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
- G01R31/00—Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
Landscapes
- Health & Medical Sciences (AREA)
- Neurology (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- Nuclear Medicine, Radiotherapy & Molecular Imaging (AREA)
- Radiology & Medical Imaging (AREA)
- Psychology (AREA)
- Neurosurgery (AREA)
- Engineering & Computer Science (AREA)
- Biomedical Technology (AREA)
- Hospice & Palliative Care (AREA)
- Psychiatry (AREA)
- Life Sciences & Earth Sciences (AREA)
- Animal Behavior & Ethology (AREA)
- General Health & Medical Sciences (AREA)
- Public Health (AREA)
- Veterinary Medicine (AREA)
- Developmental Disabilities (AREA)
- Child & Adolescent Psychology (AREA)
- Electrotherapy Devices (AREA)
Abstract
The invention discloses a method for outputting a complete alternating current waveform under high frequency, which comprises the following steps: A. the transcranial electrical stimulation equipment starts alternating current stimulation, 200 points of data in a cache are output in an MCU + DAC + DMA mode, and a corresponding half-wave waveform is formed; B. the method comprises the steps of entering DAC transmission to complete an interrupt function, then outputting 200 points of data in a cache in an MCU + DAC + DMA mode to form a corresponding half-wave waveform, and turning the output half-wave waveform; C. and C, repeating the circulation step B until the stimulation is finished, and outputting a complete alternating current waveform. The invention has the characteristic of effectively improving the output integrity of the alternating current waveform under high frequency.
Description
Technical Field
The invention relates to an alternating current waveform output method, in particular to a method for outputting a complete alternating current waveform under high frequency.
Background
The transcranial electrical stimulation equipment can output an alternating current waveform in an alternating current stimulation mode; generally, the highest frequency of the ac waveform is related to the sampling frequency of the system, and when the frequency is too high, the sampling rate will be much lower, so that when the frequency is too high, the number of output waveform points will be too small, resulting in serious distortion of the waveform. At present, the alternating current output waveform shown by a transcranial electrical stimulation device product is distorted at high frequency, and the waveform shown by an oscilloscope is not like an alternating current waveform any more, but is discontinuous scatter points. Therefore, the prior art has the problem that the alternating current waveform output at high frequency is not complete.
Disclosure of Invention
The invention aims to provide a method for outputting a complete alternating current waveform at high frequency. The invention has the characteristic of effectively improving the output integrity of the alternating current waveform under high frequency.
The technical scheme of the invention is as follows: a method of outputting a full ac waveform at high frequency, comprising the steps of:
A. the transcranial electrical stimulation equipment starts alternating current stimulation, 200 points of data in a cache are output in an MCU + DAC + DMA mode, and a corresponding half-wave waveform is formed;
B. the method comprises the steps of entering DAC transmission to complete an interrupt function, then outputting 200 points of data in a cache in an MCU + DAC + DMA mode to form a corresponding half-wave waveform, and turning the output half-wave waveform;
C. and C, repeating the step B until the stimulation is finished, and outputting a complete alternating current waveform.
In the foregoing method for outputting a complete ac waveform at high frequency, the specific process of the MCU + DAC + DMA mode is as follows: the MCU module controls the constant current source to generate a periodic alternating current half-wave, and data of 200 points in the period of the generated alternating current half-wave is stored in the static memory; the DAC module obtains cache data in the static memory through a DMA channel, and sequentially outputs the 200-point cache data to DAC pins one by one under the drive of a timer through digital-to-analog conversion to generate corresponding sine wave waveforms.
In one of the aforementioned methods for outputting a complete ac waveform at high frequency, the output time for each buffered data point is 25us.
In one method of outputting a complete AC waveform at high frequency, the transcranial electrical stimulation apparatus is operated in AC stimulation mode at a frequency of 100Hz.
Compared with the prior art, the invention adopts the mode of MCU + DAC + DMA to finish the output of the alternating current waveform, the output points in one period are 400, the output waveform is relatively dense, the complete alternating current waveform can be output under high frequency without distortion, the sampling rate can be effectively improved, and the sampling rate can reach 40KHz when the calculated frequency is 100Hz. Meanwhile, the invention adopts DMA mode, can throw away CPU, does not occupy CPU's resources, use the content of this internal memory directly, the speed will be accelerated too. In conclusion, the invention has the characteristic of effectively improving the output integrity of the alternating current waveform under high frequency.
Drawings
FIG. 1 is a schematic structural view of the present invention;
FIG. 2 is a waveform generated in step A of the embodiment;
FIG. 3 is a waveform generated in step B of the embodiment;
fig. 4 is a complete waveform generated by the embodiment.
Detailed Description
The invention is further illustrated by the following figures and examples, which are not to be construed as limiting the invention.
Examples are given. A method of outputting a full ac waveform at high frequency, configured as shown in figure 1, comprising the steps of:
A. the transcranial electrical stimulation equipment starts alternating current stimulation, 200 points of data in a cache are output in an MCU + DAC + DMA mode, and a corresponding half-wave waveform is formed;
B. the method comprises the steps of entering DAC transmission to complete an interrupt function, then outputting 200 points of data in a cache in an MCU + DAC + DMA mode to form a corresponding half-wave waveform, and turning the output half-wave waveform;
C. and C, repeating the step B until the stimulation is finished, and outputting a complete alternating current waveform.
The specific process of the MCU + DAC + DMA mode is as follows: the MCU module controls the constant current source to generate a periodic alternating current half-wave, and 200 points of data in the period of the generated alternating current half-wave are stored in the static memory; the DAC module obtains cache data in the static memory through the DMA channel, and the 200-point cache data are sequentially output to the DAC pin one by one under the driving of the timer through digital-to-analog conversion to generate corresponding sine wave waveforms.
The output time for each buffered data point is 25us.
The transcranial electrical stimulation device is in an alternating current stimulation mode, and the frequency is 100Hz.
According to the invention, the sampling rate of alternating current reaches 40KHz under the condition of high-frequency waveform output with a period of 100Hz in an MCU + DAC + DMA mode; the use of DMA mode has the advantages that: the CPU can be thrown away, the resources of the CPU are not occupied, the contents of the memory are directly used, and the speed is also accelerated.
Outputting 200 point data in the buffer memory in an MCU + DAC + DMA mode, wherein the waveform of each point with the output time of 25us is shown in figure 2, then entering a DAC to transmit and finish an interrupt function, outputting 200 point data in the buffer memory in the MCU + DAC + DMA mode, enabling the output waveform after the output waveform is overturned to be shown in figure 3, then continuously entering the DAC to transmit and finish the interrupt function until the stimulation is finished, and finally outputting the waveform as shown in figure 4.
The DAC module can obtain data which can generate sine waves in the static memory through a DMA channel, and then sine waves can be obtained through digital-to-analog conversion and output at a pin. Then of course this speed is very fast and without some delay the resulting estimate is a fast changing analog. So that the TIMER is used at this time. The DAC may be arranged to use timer triggering during initialization, which means that when the timer expires, the DAC is triggered to operate. Thus, the period of the sine wave can be changed by changing the timing time of the timer.
Claims (4)
1. A method of outputting a full ac waveform at high frequency, comprising the steps of:
A. the transcranial electrical stimulation device starts alternating current stimulation, 200 points of data in the cache are output in an MCU + DAC + DMA mode, and a corresponding half-wave waveform is formed;
B. the method comprises the steps of entering DAC transmission to complete an interrupt function, then outputting 200 points of data in a cache in an MCU + DAC + DMA mode to form a corresponding half-wave waveform, and turning the output half-wave waveform;
C. and C, repeating the step B until the stimulation is finished, and outputting a complete alternating current waveform.
2. A method of outputting a full ac waveform at high frequency as claimed in claim 1, wherein: the specific process of the MCU + DAC + DMA mode is as follows: the MCU module controls the constant current source to generate a periodic alternating current half-wave, and data of 200 points in the period of the generated alternating current half-wave is stored in the static memory; the DAC module obtains cache data in the static memory through a DMA channel, and sequentially outputs the 200-point cache data to DAC pins one by one under the drive of a timer through digital-to-analog conversion to generate corresponding sine wave waveforms.
3. A method of outputting a full ac waveform at high frequency as claimed in claim 1, wherein: the output time for each buffered data point is 25us.
4. A method of outputting a full ac waveform at high frequency as claimed in claim 1, wherein: the transcranial electrical stimulation device is in an alternating current stimulation mode, and the frequency is 100Hz.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210890489.9A CN115407103A (en) | 2022-07-27 | 2022-07-27 | Method for outputting complete alternating current waveform at high frequency |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210890489.9A CN115407103A (en) | 2022-07-27 | 2022-07-27 | Method for outputting complete alternating current waveform at high frequency |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115407103A true CN115407103A (en) | 2022-11-29 |
Family
ID=84157652
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210890489.9A Pending CN115407103A (en) | 2022-07-27 | 2022-07-27 | Method for outputting complete alternating current waveform at high frequency |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115407103A (en) |
-
2022
- 2022-07-27 CN CN202210890489.9A patent/CN115407103A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104461138B (en) | The driving method of touch-control display panel, device and touch-control display panel | |
CN108107389B (en) | Nuclear magnetic resonance radio frequency pulse generator based on digital modulation technology and control method | |
CN201676401U (en) | Percutaneous stimulator | |
CN104467763B (en) | Multiple-channel output synchronized-pulse control system | |
US20140062922A1 (en) | Touch Sensing Device and Touch Point Locating Method Thereof | |
CN1298134C (en) | Synchronous circuit | |
CN115407103A (en) | Method for outputting complete alternating current waveform at high frequency | |
CN111030412B (en) | Vibration waveform design method and vibration motor | |
US20160202809A1 (en) | Touch Sensing Device and Touch Point Locating Method Thereof | |
CN1175813A (en) | Power supply unit | |
CN100508677C (en) | Method and apparatus for controlling LED indicating lamp | |
CN104765027A (en) | High-frequency ultrasonic coding excitation emission system and pulse generating method | |
CN205041485U (en) | Apply to ultrasonic wave rubble control system of medical science treatment | |
CN102394605A (en) | Pulse generation method and device used for IGBT (insulated gate bipolar transistor) test | |
CN206226395U (en) | A kind of switching frequency pulse generation device high | |
CN206301192U (en) | A kind of device for generating voltage signal | |
CN101804241B (en) | Transcutaneous stimulator and method for enhancing fine movement level of human hands thereof | |
CN108787409B (en) | A kind of intelligently sweeping frequency method of ultrasonic signal generator | |
CN108686916B (en) | A kind of segmentation intelligently sweeping frequency method of ultrasonic signal generator | |
CN1053302C (en) | Adjustable wide pulse combined ultrasonic seismic source | |
CN1937387B (en) | SPWM pulse generating and distributing circuit for pure sine wave inverter | |
CN2492009Y (en) | Controller of double-loop thunderstorm electricity generator | |
CN206249140U (en) | A kind of programmable DDS arbitrary waveform signal generators | |
CN110261492B (en) | Method and device for driving ultrasonic sensor by digital sequence | |
WO2023236282A1 (en) | High-resolution variable-frequency damping oscillation signal generator |
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 |