Application of PIC16C54 single chip microcomputer in neural stimulator

Publisher:PeacefulAuraLatest update time:2010-05-30 Keywords:PIC16C54 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
1. Overview

The nerves and muscles in the living system are excitable tissues, and they will react to certain external stimuli. This reaction is manifested as nerve impulses, muscle contraction, vascular relaxation, etc. A peripheral nerve stimulator is an instrument used during surgical anesthesia to observe the efficacy of muscle relaxants by stimulating the peripheral nerves to cause muscle twitches in patients. If the anesthesia is not deep, stimulating the ulnar nerve in the forearm with a stimulator will cause the thumb to adduct; if the anesthesia reaches a deep level, the thumb adduction movement will disappear. The stimulation pulse width of the peripheral nerve stimulator is 200us, and the current intensity is adjustable in six levels from 10mA to 60mA. It has four different working modes:

(1) Single stimulation (TWH). The stimulation cycle is 1 second, (2) Train of Four (TOF). The stimulation cycle is 15 seconds, (3) Double Tetanic Stimulation (DBS). The stimulation cycle is 15 seconds, (4) Post-tetanic Count (PTC). The frequency is 50HZ and the duration is 5 seconds. After 3 seconds of rest, a single pulse is emitted per second, for a total of 16 pulses. Each working mode has an indication and an output intensity indication. The time accuracy of the output signal is controlled by the software.

The peripheral nerve stimulator introduced in this article uses the PIC16C54 microcontroller as the core component, and cooperates with a monostable trigger, an operational amplifier circuit, and a stimulation isolation circuit to form a stimulation system to realize the function of the stimulator. 2. Hardware Design The PIC16C54 microcontroller is an 8-bit microcontroller. It has the characteristics of small size, low power consumption, internal high-speed CMOS technology, strong performance, high body density, built-in "watchdog" and program confidentiality bit, and low price. The principle block diagram of the peripheral nerve stimulator hardware is shown in Figure 1.

2. Hardware Design

PIC16C54 microcontroller is an 8-bit microcontroller with small size, low power consumption, high-speed CMOS technology, strong performance, high body density, built-in "watchdog" and program security bit, low price, etc. The principle block diagram of the peripheral nerve stimulator hardware is shown in Figure 1.

Figure 1 Principle block diagram

Figure 2 is the main program flow of this control program

[page]

16C54 has two bidirectional I/O port lines, of which port A is used as input to detect the key status of the four working modes. Port B uses RB0 as input to detect the key status of the current intensity control key, while the rest are used as outputs. RB2-RB7 are used to control the lighting and closing of the six-speed current intensity indicator lights respectively; RB1 is used to output pulse signals, which are coupled to the stimulation electrode through the stimulation isolator and output.

There are four oscillator sources for 16C54, crystal oscillator (XT), low power oscillator (LP), high speed oscillator (HP) and RC oscillator. Here we use a 4M crystal oscillator. The real-time clock counter RTCC and the reset terminal MCLR are both connected to a high level, which is in an invalid state and also avoids interference.

3. Software Design

The whole program is designed as a "module type". In addition to the main program, query, lighting, turning off the light, four stimulation methods, pulse sending, etc. are all written in subroutines.

PIC16C54 has no hardware interrupt, so the state changes of the stimulation mode control key and the current intensity control key are queried by software. Since the oscillator circuit uses a 4M crystal to start oscillation, the execution cycle for general instructions is 1us, while the jump instruction requires 2us. Using this time indicator, a delay program can be written.

In order to improve the working efficiency of this control program, the author adopts a method that combines delay and query, that is, in a pulse cycle, the query program is executed during the delay period after a pulse with a width of 200us is sent, and the query is not terminated until the delay period ends.

At the same time, the indicator light also lights up and turns off at the same frequency as the pulse, but the time width of the light is 20ms, so the query delay program must be written in two sections before and after the light is turned off. In this way, although this program uses software query, the execution speed is very fast and the efficiency is very high, and the clinical application effect is very good.

In short, this program has a feature that the entire program compilation process is very thoughtful. If a clinician has never understood the operation of the instrument, but when he gets the peripheral nerve stimulator developed by the author, he can operate it easily and freely without reading any instructions, just from the key instructions on the instrument panel. This is also the direction that the author strives for during the programming process.

The peripheral nerve stimulator has complete stimulation modes, high pulse width and frequency accuracy, clear working mode and output indications, easy operation, low power consumption, and a small and ingenious structure. It has been clinically tested in tertiary hospitals and has been proven to have very good effects. It can intuitively and quickly judge the patient's reaction and provide timely guidance for clinical medication.

Keywords:PIC16C54 Reference address:Application of PIC16C54 single chip microcomputer in neural stimulator

Previous article:Design of a universal electronic nose instrument for human respiratory gas detection
Next article:Design of electronic blood pressure meter based on MN101EF32D single chip microcomputer

Latest Medical Electronics Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号