CN109446563A - A kind of test method using single-chip microcontroller state verification pen - Google Patents
A kind of test method using single-chip microcontroller state verification pen Download PDFInfo
- Publication number
- CN109446563A CN109446563A CN201811111960.XA CN201811111960A CN109446563A CN 109446563 A CN109446563 A CN 109446563A CN 201811111960 A CN201811111960 A CN 201811111960A CN 109446563 A CN109446563 A CN 109446563A
- Authority
- CN
- China
- Prior art keywords
- chip microcontroller
- test
- tested
- chip
- pen
- 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
- 238000010998 test method Methods 0.000 title claims abstract description 8
- 238000012795 verification Methods 0.000 title claims abstract description 8
- 238000012360 testing method Methods 0.000 claims abstract description 126
- 238000000034 method Methods 0.000 claims abstract description 19
- 238000012544 monitoring process Methods 0.000 claims abstract description 11
- 238000011161 development Methods 0.000 claims abstract description 8
- 238000004891 communication Methods 0.000 claims description 24
- 241000270722 Crocodylidae Species 0.000 claims description 15
- LNNWVNGFPYWNQE-GMIGKAJZSA-N desomorphine Chemical compound C1C2=CC=C(O)C3=C2[C@]24CCN(C)[C@H]1[C@@H]2CCC[C@@H]4O3 LNNWVNGFPYWNQE-GMIGKAJZSA-N 0.000 claims description 15
- 230000006870 function Effects 0.000 claims description 11
- 230000000087 stabilizing effect Effects 0.000 claims description 8
- 238000013461 design Methods 0.000 claims description 7
- 238000010586 diagram Methods 0.000 claims description 6
- 238000004519 manufacturing process Methods 0.000 claims description 6
- 238000003780 insertion Methods 0.000 claims description 5
- 230000037431 insertion Effects 0.000 claims description 5
- 239000013078 crystal Substances 0.000 claims description 4
- 230000002159 abnormal effect Effects 0.000 claims description 3
- 230000002411 adverse Effects 0.000 claims description 3
- 230000005611 electricity Effects 0.000 claims description 3
- 238000009434 installation Methods 0.000 claims description 3
- 238000009826 distribution Methods 0.000 claims description 2
- 238000004458 analytical method Methods 0.000 abstract description 3
- 238000001514 detection method Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000008878 coupling Effects 0.000 description 1
- 238000010168 coupling process Methods 0.000 description 1
- 238000005859 coupling reaction Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000012827 research and development Methods 0.000 description 1
- 238000003860 storage Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/20—Design optimisation, verification or simulation
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Evolutionary Computation (AREA)
- Geometry (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Test And Diagnosis Of Digital Computers (AREA)
- Debugging And Monitoring (AREA)
Abstract
A kind of test method using single-chip microcontroller state verification pen of the present invention belongs to embedded development technical field, is related to a kind of test method using single-chip microcontroller state verification monitoring singlechip working condition.This method uses the special single-chip microcontroller test pen equipped with single-chip microcontroller test pen program to be tested, and embedded testing program is inserted into tested single-chip microcontroller original program.It is tested and analyzed using signal of the special single-chip microcontroller test pen to the specified pin output of tested single-chip microcontroller, obtains the registers state of single-chip microcontroller, ensure that minimum by the influence of the original program of system.This method solve the dedicated emulator of supply of brands quotient is needed when monitoring the working condition of different brands single-chip microcontroller of different manufacturers, provided convenience for embedded product exploitation.This method is monitored the working condition of a variety of single-chip microcontrollers, has hsrdware requirements small, and test real-time is preferable.Test analysis is flexible, at low cost, easy to carry, has practical value.
Description
Technical field
The invention belongs to embedded development technical fields, are related to a kind of use single-chip microcontroller state verification monitoring singlechip work
Make the test method of state.
Background technique
Single-chip microcontroller is widely used in embedded development.Under normal conditions, single-chip microcontroller on-line debugging uses single-chip microcontroller to supply
Relevant exploitation software on the dedicated emulator and PC machine for answering quotient to develop.However the single-chip microcontroller of different suppliers needs completely
Different, incompatible emulators and exploitation software, this allows research and development department to open in the single-chip microcontroller for carrying out different suppliers
When hair, cost is significantly greatly increased.And on-line debugging usually requires not only to occupy using single-chip microcontroller JTAG or SW interface compared with polyphyly
System resource, and the single-chip microcontroller and most of 8 single-chip microcontrollers for not supporting pin number few.Zhou Yun was in application in 2015
" level logic test pen ", the patent No. 201510329724.5.Its function is only to test the height electricity of measured point in digital circuit
Flat, compatible 3.3V and 5V circuit, function is few, and purposes is relatively narrow.The real-time shape of the single-chip microcontroller of the compatible multi-brand of a energy is developed as a result,
State detection instrument, and provide the engineering significance that corresponding method of detection is great reality for embedded development field at this stage.
Summary of the invention
The present invention to overcome the shortcomings of existing technologies, has invented a kind of test method using single-chip microcontroller state verification pen,
Using the embedded testing program of special single-chip microcontroller test pen and establishment, the few hardware and software resource of tested single-chip microcontroller is being occupied
In the case where, the working condition of tested single-chip microcontroller is monitored, realizes the single-chip microcontroller working condition using the compatible multi-brand of a set of equipment
Monitoring function.Using less software and hardware resources, solves the working condition in the different brands single-chip microcontroller of monitoring different manufacturers
When, the problem of needing supply of brands quotient dedicated emulator.This method test analysis is flexible, at low cost, easy to carry, has
Practical value.
The technical solution adopted by the present invention is that a kind of test method using single-chip microcontroller state verification pen, characterized in that should
Method uses the special single-chip microcontroller test pen equipped with single-chip microcontroller test pen program to be tested, and embedded testing program is inserted into
Into tested single-chip microcontroller original program, using special single-chip microcontroller test pen to the letter of the specified pin output of tested single-chip microcontroller
It number is tested and analyzed, obtains the registers state of single-chip microcontroller, working condition includes I/O interface pin direction, Timer's
Working condition, the working condition of UART, the working condition of ADC, the working condition of DAC and other users think the C language of monitoring
Say the numerical value of variable;Specific step is as follows for method:
Step 1: the circuit design and production of special single-chip microcontroller test pen
Special single-chip microcontroller test pen appearance is in test pencil shape, and chip testing folder 4 is mounted on pen tip position;Single-chip microcontroller test pen
By box body 1, circuit board 2, OLED display screen 3, chip testing folder 4, double-colored crocodile clip power supply line 5, power supply interface 6 is constituted;It is all
Element is installed in one piece of PCB circuit board 2, and PCB circuit board 2 is fixed in box body 1;OLED display screen 3 is mounted on box body 1
On, single-chip microcontroller carries out grafting installation by the single-chip microcontroller socket on circuit board 2;
Single-chip microcontroller test pen circuit design is carried out on the circuit board 2, and single-chip microcontroller test pen circuit protects circuit by test, single
Piece machine download circuit, single-chip minimum system and four part of display circuit composition;Signal-under-test enters test from A terminals
Pen enters monolithic by the test protection circuit being made of the 4th Chip-R R4, first, second Schottky diode D1, D2
Machine IC1;First, second Schottky diode D1, D2 is two Schottky diodes being mutually reversely connected, and ensure that test signal is defeated
Enter the voltage to single-chip microcontroller GP2 pin no more than 3.3V, prevents from burning out single-chip microcontroller;First, second, third Chip-R R1, R2,
R3, diode D3 and voltage stabilizing chip U1 constitute single-chip microcontroller download circuit, be used in programming and debugging part to single-chip microcontroller into
Row debugging;Single-chip microcontroller debugging interface P1 is 5 needle serial ports, and desktop computer RS232 serial ports is connected when debugging single-chip microcontroller;Diode D3
For anti-backflow diode, electric current adverse current is prevented;Since the RS232 of computer can only export ± 15V voltage, voltage stabilizing chip U1 has been used
3V is generated for single-chip microcontroller voltage when providing burning;Screen interface P2 connection OLED display screen forms display circuit;PIC12F629
For single-chip microcontroller due to itself not needing extraneous crystal oscillator, it and two elements of power supply interface J1 just become single-chip minimum system;
PCB circuit board 2 is produced according to single-chip microcontroller test pen circuit diagram, and is installed in box body 1, special single-chip microcontroller test pen is completed
Production;
Step 2: programming and debugging
Using MPLAB software programming, embedded testing program includes library file (.h), program file (.c) and is inserted in tested
Test function TestInit () in system original program, TestPen (Category) three parts, in specified I/O interface
Single-chip microcontroller register information is issued to single-chip microcontroller test pen, need to be quoted in a program in tested machine programming.
Programming and debugging process need an additional microcontroller development board, a RS232 Serial Port Line and one
Computer, when single-chip microcontroller burning, use RS232 agreement;Communications protocol between test pen and tested single-chip microcontroller uses 1-wire
Monobus lin protocol, due to only sending data from tested single-chip microcontroller to test pen, so being one-way communication;
The data issued from tested single-chip microcontroller are divided into address bit and data bit two parts, wherein address bit indicates classification, number
The value of corresponding classification is indicated according to position, the two data type is all unsigned char, i.e., value range is 0~255;For 0~
255 this 256 addresses, wherein leave 251~255 last several for the whether normal check bit of system communication and monolithic type
Number flag bit, 0~250 other be used to the various working conditions of feedback single-chip microcontroller.Working condition includes the interface pin side I/O
To the working condition of Timer, the working condition of UART, the working condition of ADC, the working condition of DAC and other users think
The numerical value of the C language variable of monitoring.
In embedded testing program, initialization function TestInit () is responsible for the various variables of initialization, sends for determining
Whether communication normally tests the I/O interface of signal and distribution for transmission comprising single-chip microcontroller type information;Send function
TestPen (Category) gives single-chip microcontroller test pen, the number of sending for sending the status information at tested single-chip microcontroller current time
It is determined according to classification by the value of Category;
If Category is 0, should be to the information content that test pen is sent successively
00XX 01 XX 02 XX 03 XX……
Wherein: 00,01 it is equal indicate address code, respectively indicate P0, P1 (51 kernel single-chip microcontroller) or PA, PB (vouching in ARM
Piece machine), what XX was indicated is the reduced value of the register of corresponding group.
If Category is 1, sending value be should be
10 XX 11 XX 12 XX 13 XX……
Wherein: 10 indicate Timer0, and 11 indicate Timer1, and so on;
Step 3: single-chip microcontroller working condition is tested
3.5mm insertion test pens of double-colored crocodile clip power supply line, red crocodile clip be clipped in circuit-under-test plate 5V or
3.3V power supply line, black crocodile clip are clipped in circuit-under-test plate GND line;Be inserted into tested SCM program write in advance it is embedding
Enter formula test program, and defines a unappropriated I/O as communication pin;The chip testing of test pen folder 4 be clipped in by
It surveys on the communication pin of single-chip microcontroller being defined;
Tested electromechanical source switch is opened, screen is bright;When the program of single-chip microcontroller test pen starts, reading is first passed through from tested
Whether the test signal that single-chip microcontroller is sent is normal to determine communication, and as abnormal, screen, which is shown, to report an error;When the content that reports an error includes
Sequence mistake " Error Sequence " and two kinds of mistake of connectionless " No Connected ";Wait screen show single-chip microcontroller model with
And " Waiting... " printed words, then enter testing process;Insertion is checked if timing error " Error Sequence " if shown
Whether whether formula test program normal initialization and be inserted in the appropriate position of original program;If showing connectionless " No
Connected " then checks whether test clip is clipped on correct I/O interface;Tested monolithic type is shown if communication is correct
Number, " Waiting... " printed words and enter wait state;In wait state, signal is such as confiscated, then is continued waiting for;If received
To the data-signal sent from tested single-chip microcontroller, then start analytic signal, and corresponding signal type and numerical value is shown to aobvious
In display screen;
The registers state for obtaining single-chip microcontroller is tested and analyzed, working condition includes I/O interface pin direction,
The working condition of Timer, the working condition of UART, the working condition of ADC, the working condition of DAC and other users want to supervise
The numerical value of the C language variable of survey.
The beneficial effects of the invention are as follows less software and hardware resources are utilized, solve the different brands in monitoring different manufacturers
The problem of supply of brands quotient dedicated emulator is needed when the working condition of single-chip microcontroller develops the side of providing for embedded product
Just.The working condition of a variety of single-chip microcontrollers can be monitored using this test pen, including I/O mouthfuls of input/output state,
The operating status of Timer, the operating status etc. of USART.In the present invention, test pen and tested single-chip microcontroller have carried out Phototube Coupling,
It ensure that mutual circuit safety.Meanwhile embedded testing program does not use single-chip microcontroller internal hardware resources as far as possible, such as
Timer, I2C, hardware interrupts etc. ensure that minimum by the influence of the original program of system.This method has hsrdware requirements small, surveys
It is preferable to try real-time.Test analysis is flexible, at low cost, easy to carry, has practical value.
Detailed description of the invention
Fig. 1-single-chip microcontroller test pen constitutes figure.Wherein, 1- box body, 2- circuit board, 3-OLED display screen, 4- chip testing
Folder, the double-colored crocodile clip power supply line of 5-, 6- power supply interface.
The program flow diagram that Fig. 2-writes, Fig. 3 test pen test connection figure.
Fig. 4-test pen circuit diagram, wherein A- terminals J1- power supply interface, P1- single-chip microcontroller debugging interface, P2- screen connect
Mouthful, the first Chip-R of R1-, the second Chip-R of R2-, R3- third Chip-R, the 4th Chip-R of R4-, U1- pressure stabilizing core
Piece, IC1- single-chip microcontroller, the first Schottky diode of D1-, the second Schottky diode of D2-, D3- diode, GND- control ground wire.
Specific embodiment
Below according to attached drawing and the technical solution specific implementation that the present invention will be described in detail.
Fig. 1 is the composition figure of special single-chip microcontroller test pen, and single-chip microcontroller test pen appearance is in test pencil shape.Wherein, power supply connects
Mouth 6 is 3.5INCH audio frequency mono channel audio interface, and pen tip is chip testing folder 4, is easily clamped in tested monolithic power traction
Foot.Double-colored crocodile clip power supply line 5 is that 3.5INCH monophonic audio interface turns red-black double-colored crocodile clip wiring, is connected to Board Under Test
Power supply interface 6 on, give test pen power supply.Test pen is equipped with 0.95INCHOLED display screen 3, for showing tested single-chip microcontroller
Various registers numerical value.The tested single-chip microcontroller of circuit compatibility 3.3V and 5V power supply and 3.3V and 5V level.
It is the product of PIC company that embodiment, which uses single-chip microcontroller IC1PIC12F629, without the single-chip microcontroller of extraneous crystal oscillator, volume
Very little removes download interface and is left 3 I/O mouthfuls, meets circuit requirements just.Voltage stabilizing chip U1 uses 78L03.
Fig. 2 is the program flow diagram write, and specific step is as follows for method:
Step 1: the circuit design and production of special single-chip microcontroller test pen
Special single-chip microcontroller test pen appearance is in test pencil shape, and chip testing folder 4 is mounted on pen tip position;Single-chip microcontroller test pen
By box body 1, circuit board 2, OLED display screen 3, chip testing folder 4, double-colored crocodile clip power supply line 5, power supply interface 6 is constituted;It is all
Element is installed in one piece of PCB circuit board, and PCB circuit board is fixed in box body 1;OLED display screen 3 is mounted on box body 1,
Single-chip microcontroller carries out grafting installation by the single-chip microcontroller socket on circuit board 2;
Single-chip microcontroller test pen circuit design as shown in figure 4, carry out single-chip microcontroller test pen circuit design, singly on the circuit board 2
Piece machine test pen circuit protects circuit, single-chip microcontroller download circuit, four part group of single-chip minimum system and display circuit by test
At;Signal-under-test enters test pen from terminals A, by by the 4th Chip-R R4, the first, second Schottky diode
The test protection circuit that D1, D2 are constituted enters single-chip microcontroller IC1;First, second Schottky diode D1, D2 is two mutually reversal connections
Schottky diode, ensure that test signal is input to the voltage of single-chip microcontroller GP2 pin no more than 3.3V, prevent from burning out monolithic
Machine;First, second, third Chip-R R1, R2, R3, diode D3 and voltage stabilizing chip U1 constitute single-chip microcontroller download circuit, use
Single-chip microcontroller is debugged in programming and debugging part;Single-chip microcontroller debugging interface P1 is 5 needle serial ports, when debugging single-chip microcontroller
Connect desktop computer RS232 serial ports;Diode D3 is anti-backflow diode, prevents electric current adverse current;Since the RS232 of computer can only
Output ± 15V voltage has used voltage stabilizing chip U1 to generate 3V for single-chip microcontroller voltage when providing burning;Screen interface P2 connection
OLED display screen forms display circuit;PIC12F629 single-chip microcontroller is not due to itself needing extraneous crystal oscillator, it and power supply interface
Two elements of J1 just become single-chip minimum system;PIC12F629 communication speed is fast, small volume, and power supply supports 3.3V and 5V,
Power consumption electric current is small, will not influence system under test (SUT) power circuit.PCB circuit board 2 is produced according to single-chip microcontroller test pen circuit diagram 4,
And be installed in box body 1, complete the production of special single-chip microcontroller test pen.
Step 2: programming and debugging
Using MPLAB software programming, programming is divided to " single-chip microcontroller test pen program " and " embedded testing program " two
Point, the process of program is as shown in Figure 2.
Programming and debugging process need an additional microcontroller development board, a RS232 Serial Port Line and one
Computer.RS232 agreement is used when single-chip microcontroller burning, the communications protocol between test pen and tested single-chip microcontroller uses 1-wire
Monobus lin protocol.Due to only sending data from tested single-chip microcontroller to test pen, so being one-way communication.
Embedded testing program includes library file (.h), program file (.c) and the survey that is inserted in system under test (SUT) original program
3 part trial function TestInit (), TestPen (Category), for being issued in specified I/O interface to single-chip microcontroller test pen
Single-chip microcontroller register information need to be quoted in a program in tested machine programming.
The data issued from tested single-chip microcontroller are divided into address bit and data bit two parts, and wherein address bit indicates test data
Classification, data bit indicates the value of corresponding classification.The two data type is all unsigned char, i.e., value range be 0~
255.For 0~255 this 256 addresses, wherein leave 251~255 last several whether normally detected for system communication
Position and single-chip microcontroller mark position, 0~250 other be used to the various working conditions of feedback single-chip microcontroller, specific table is as follows:
The status information that TestPen (Category) function is used to send tested single-chip microcontroller current time is tested to single-chip microcontroller
Pen, the data category of sending are determined that the corresponding relationship of numerical value and address code can also be carried out by upper table by the value of Category
Inquiry.
By taking Category is 0 as an example, it is to the information content that test pen is sent successively
00 XX 01 XX 02 XX 03 XX……
Wherein 00,01 it is equal indicate address code, respectively indicate P0, P1 (51 kernel single-chip microcontroller) or PA, PB (vouching in ARM
Piece machine), what XX was indicated is the reduced value of the register of corresponding group.
If Category is 1, the information content issued is
11 XX 11 XX 12 XX 13 XX……
Wherein 10 indicate Timer0,11 indicate Timer1, and so on.
Step 3: single-chip microcontroller working condition is tested
3.5mm insertion test pens of crocodile clip power supply line, red crocodile clip is clipped in 5V or the 3.3V electricity of circuit-under-test plate
Source line, black crocodile clip are clipped in circuit-under-test plate GND line, as shown in Figure 3.It is inserted into tested SCM program and writes in advance
Embedded testing program, and define a unappropriated I/O as communication pin.The test clip of test pen is clipped in tested
On the communication pin of single-chip microcontroller being defined.
Tested electromechanical source switch is opened, screen is bright;When the program of single-chip microcontroller test pen starts, reading is first passed through from tested
Whether the test signal that single-chip microcontroller is sent is normal to determine communication, and as abnormal, screen, which is shown, to report an error;When the content that reports an error includes
Sequence mistake " Error Sequence " and two kinds of mistake of connectionless " No Connected ";Wait screen show single-chip microcontroller model with
And " Waiting... " printed words, then enter testing process;Insertion is checked if timing error " Error Sequence " if shown
Whether whether formula test program normal initialization and be inserted in the appropriate position of original program;If showing connectionless " No
Connected " then checks whether test clip is clipped on correct I/O interface.
Tested single-chip microcontroller model, " Waiting... " printed words are shown if communication is correct and enter wait state;Wait
To in state, such as confiscate signal, then continue waiting for;If receiving the data-signal sent from tested single-chip microcontroller, start
Analytic signal, and corresponding signal type and numerical value are shown on display screen.If left side display register classification, right side, which is shown, posts
Storage value or state are then normal to communicate.Obtained single-chip microcontroller registers state is tested and analyzed, working condition packet
Include I/O interface pin direction, the working condition of Timer, the working condition of UART, the working condition of ADC, the working condition of DAC
And other users think the numerical value of the C language variable of monitoring.
After debugging, embedded testing program can be deleted, and can not also be deleted, to guarantee development efficiency.
Claims (1)
1. a kind of test method using single-chip microcontroller state verification pen, characterized in that this method, which uses, is equipped with single-chip microcontroller test pen
The special single-chip microcontroller test pen of program is tested, and embedded testing program is inserted into tested single-chip microcontroller original program,
It is tested and analyzed using signal of the special single-chip microcontroller test pen to the specified pin output of tested single-chip microcontroller, obtains monolithic
The registers state of machine;Specific step is as follows for method:
Step 1: special single-chip microcontroller test pen circuit design and production
Special single-chip microcontroller test pen appearance is in test pencil shape, and chip testing folder (4) is mounted on pen tip position;Single-chip microcontroller test pen by
(4) are pressed from both sides in box body (1), circuit board (2), OLED display screen (3), chip testing, double-colored crocodile clip power supply line (5), power supply interface (6)
It constitutes;All elements are installed on one piece of PCB circuit board (2), and circuit board (2) is fixed in box body (1);OLED display screen
(3) it is mounted on box body (1), single-chip microcontroller carries out grafting installation by the single-chip microcontroller socket on circuit board (2);
Single-chip microcontroller test pen circuit design is carried out on circuit board (2), single-chip microcontroller test pen circuit protects circuit, monolithic by test
Machine download circuit, single-chip minimum system and four part of display circuit composition;Signal-under-test enters test pen from terminals A,
Enter single-chip microcontroller by the test protection circuit being made of the 4th Chip-R R4, first, second Schottky diode D1, D2
IC1;First, second Schottky diode D1, D2 is two Schottky diodes being mutually reversely connected, and ensure that test signal input
Voltage to single-chip microcontroller GP2 pin is not more than 3.3V, prevents from burning out single-chip microcontroller;First, second, third Chip-R R1, R2,
R3, diode D3 and voltage stabilizing chip U1 constitute single-chip microcontroller download circuit, be used in programming and debugging part to single-chip microcontroller into
Row debugging;Single-chip microcontroller debugging interface P1 is 5 needle serial ports, and desktop computer RS232 serial ports is connected when debugging single-chip microcontroller;Diode D3
For anti-backflow diode, electric current adverse current is prevented;Since the RS232 of computer can only export ± 15V voltage, voltage stabilizing chip U1 has been used
3V is generated for single-chip microcontroller voltage when providing burning;Screen interface P2 connection OLED display screen forms display circuit;
For P2PIC12F629 single-chip microcontroller due to itself not needing extraneous crystal oscillator, it and two elements of power supply interface J1 just become monolithic
Machine minimum system;
PCB circuit board 2 is produced according to single-chip microcontroller test pen circuit diagram, and is installed in box body 1, special single-chip microcontroller test is completed
The production of pen;
Step 2: programming and debugging
Using MPLAB software programming, embedded testing program includes library file (.h), program file (.c) and is inserted in system under test (SUT)
Test function TestInit () in original program, TestPen (Category) three parts, in specified I/O interface to list
Piece machine test pen issues single-chip microcontroller register information, need to quote in a program in tested machine programming;Programming and tune
Examination process needs an additional microcontroller development board, a RS232 Serial Port Line and a computer, and when single-chip microcontroller burning uses
Be RS232 agreement;Communications protocol between test pen and tested single-chip microcontroller uses 1-wire monobus lin protocol, due to only by quilt
It surveys single-chip microcontroller and sends data to test pen, so being one-way communication;
The data issued from tested single-chip microcontroller are divided into address bit and data bit two parts, wherein address bit indicates classification, data bit
Indicate the value of corresponding classification, the two data type is all unsigned char, i.e., value range is 0~255;For 0~255
This 256 addresses, wherein leave 251~255 last several for the whether normal check bit of system communication and single-chip microcontroller model
Flag bit, 0~250 other be used to feedback single-chip microcontroller various working conditions;Working condition includes the interface pin side I/O
To the working condition of Timer, the working condition of UART, the working condition of ADC, the working condition of DAC and other users think
The numerical value of the C language variable of monitoring;
In embedded testing program, initialization function TestInit () TestInit () is responsible for the various variables of initialization, sends and use
In determine communication whether normally comprising single-chip microcontroller type information test signal and distribution for send I/O interface;Hair
Send function TestPen (Category);Status information for sending tested single-chip microcontroller current time gives single-chip microcontroller test pen, hair
Data category out is determined by the value of Category;
If Category is 0, should be to the information content that test pen is sent successively
00 XX 01 XX 02 XX 03 XX……
Wherein: 00,01 equal expression address code respectively indicates 51 kernel single-chip microcontroller P0, P1 ARM kernel single-chip microcontroller PA, PB, XX
What is indicated is the reduced value of the register of corresponding group;
If Category is 1, sending value be should be
10 XX 11 XX 12 XX 13 XX……
Wherein: 10 indicate Timer0, and 11 indicate Timer1, and so on;
Step 3: single-chip microcontroller working condition is tested
3.5mm insertion test pens of double-colored crocodile clip power supply line, red crocodile clip is clipped in 5V or the 3.3V electricity of circuit-under-test plate
Source line, black crocodile clip are clipped in circuit-under-test plate GND line;The embedded survey write in advance is inserted into tested SCM program
Program is tried, and defines a unappropriated I/O as communication pin;The chip testing folder 4 of test pen is clipped in tested monolithic
On the communication pin of machine being defined;
Tested electromechanical source switch is opened, screen is bright;When the program of single-chip microcontroller test pen starts, reading is first passed through from tested monolithic
Whether the test signal that machine is sent is normal to determine communication, and as abnormal, screen, which is shown, to report an error;The content that reports an error includes timing mistake
Accidentally two kinds of mistake of " Error Sequence " and connectionless " No Connected ";Wait screen show single-chip microcontroller model and
" Waiting... " printed words then enter testing process;If show checked if timing error " Error Sequence " it is embedded
Whether whether test program normal initialization and be inserted in the appropriate position of original program;If showing connectionless " No
Connected " then checks whether test clip is clipped on correct I/O interface;Tested monolithic type is shown if communication is correct
Number, " Waiting... " printed words and enter wait state;In wait state, signal is such as confiscated, then is continued waiting for;If received
To the data-signal sent from tested single-chip microcontroller, then start analytic signal, and corresponding signal type and numerical value is shown to aobvious
In display screen;
The registers state of obtained single-chip microcontroller is tested and analyzed, working condition includes I/O interface pin direction,
The working condition of Timer, the working condition of UART, the working condition of ADC, the working condition of DAC, external interrupt status, and
Other users think the numerical value of the C language variable of monitoring.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811111960.XA CN109446563B (en) | 2018-09-25 | 2018-09-25 | Test method using single chip microcomputer state test pen |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811111960.XA CN109446563B (en) | 2018-09-25 | 2018-09-25 | Test method using single chip microcomputer state test pen |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109446563A true CN109446563A (en) | 2019-03-08 |
CN109446563B CN109446563B (en) | 2023-04-18 |
Family
ID=65533199
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811111960.XA Expired - Fee Related CN109446563B (en) | 2018-09-25 | 2018-09-25 | Test method using single chip microcomputer state test pen |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109446563B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110837720A (en) * | 2019-11-04 | 2020-02-25 | 中科寒武纪科技股份有限公司 | Method, device and related product for instruction execution |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2005119455A1 (en) * | 2004-06-03 | 2005-12-15 | Purple Scout Ab | System for testing embedded computers |
CN101004707A (en) * | 2007-01-18 | 2007-07-25 | 浙江大学 | Embedded type software debugging device, and method for implementing debugging |
CN102194351A (en) * | 2011-05-30 | 2011-09-21 | 大连理工大学 | 8051-or-AVR-based multi-core singlechip teaching experimental platform |
US8117587B1 (en) * | 2008-06-03 | 2012-02-14 | Richard Paul Testardi | Microcontroller-resident software development environment supporting application-level asynchronous event handling, interactive debugging and pin variables for embedded systems |
CN102820061A (en) * | 2012-08-31 | 2012-12-12 | 东北大学 | Embedded remote device program programmer device and method |
CN107204142A (en) * | 2017-06-01 | 2017-09-26 | 安徽福讯信息技术有限公司 | One kind is based on single-chip microcomputer and Embedded training platform system |
CN107907814A (en) * | 2017-09-28 | 2018-04-13 | 芯海科技(深圳)股份有限公司 | A kind of method for improving chip volume production testing efficiency |
-
2018
- 2018-09-25 CN CN201811111960.XA patent/CN109446563B/en not_active Expired - Fee Related
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2005119455A1 (en) * | 2004-06-03 | 2005-12-15 | Purple Scout Ab | System for testing embedded computers |
CN101004707A (en) * | 2007-01-18 | 2007-07-25 | 浙江大学 | Embedded type software debugging device, and method for implementing debugging |
US8117587B1 (en) * | 2008-06-03 | 2012-02-14 | Richard Paul Testardi | Microcontroller-resident software development environment supporting application-level asynchronous event handling, interactive debugging and pin variables for embedded systems |
CN102194351A (en) * | 2011-05-30 | 2011-09-21 | 大连理工大学 | 8051-or-AVR-based multi-core singlechip teaching experimental platform |
CN102820061A (en) * | 2012-08-31 | 2012-12-12 | 东北大学 | Embedded remote device program programmer device and method |
CN107204142A (en) * | 2017-06-01 | 2017-09-26 | 安徽福讯信息技术有限公司 | One kind is based on single-chip microcomputer and Embedded training platform system |
CN107907814A (en) * | 2017-09-28 | 2018-04-13 | 芯海科技(深圳)股份有限公司 | A kind of method for improving chip volume production testing efficiency |
Non-Patent Citations (3)
Title |
---|
J.M.PAUL,ETAL: "Scenario-oriented design for single-chip heterogeneous multiprocessors", 《IEEE TRANSACTIONS ON VERY LARGE SCALE INTEGRATION (VLSI) SYSTEMS》 * |
孟天泗: "PIC单片机程序的模拟仿真调试", 《电子制作》 * |
陈国顺,等: "通用电路板在线测试仪设计与开发", 《仪器仪表学报》 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110837720A (en) * | 2019-11-04 | 2020-02-25 | 中科寒武纪科技股份有限公司 | Method, device and related product for instruction execution |
Also Published As
Publication number | Publication date |
---|---|
CN109446563B (en) | 2023-04-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107907814B (en) | Method for improving mass production test efficiency of chips | |
CN105372619B (en) | A kind of safety chip power failure test equipment | |
CN105513472A (en) | Multicore single-chip microcomputer embedded teaching experiment platform | |
CN216901630U (en) | Interface conversion circuit and chip burning device | |
CN204945293U (en) | A kind of serial port detection circuit of access device and test fixture | |
WO2016184170A1 (en) | Smi interface device debugging apparatus and method, and storage medium | |
CN109446563A (en) | A kind of test method using single-chip microcontroller state verification pen | |
CN208207790U (en) | A kind of intelligent universal single-chip microcontroller cd-rom recorder | |
CN102193860B (en) | Microcontroller online debugging circuit and method as well as microcontroller | |
CN106354598A (en) | One-time programmable microcontroller debugging method based on flash memory | |
CN102591835B (en) | Portable downloader | |
WO2022052161A1 (en) | Chip debugging system and debugger | |
CN218938947U (en) | JTAG interface adapting board and system based on hardware simulation accelerator | |
CN110796939A (en) | Programming learning development board with unified extended interface | |
CN203587757U (en) | Hand-held digital integrated circuit parameter tester | |
CN214375135U (en) | RoCE chip testing device | |
CN209264873U (en) | A kind of bonder terminal tester | |
CN208819045U (en) | A kind of FPGA development board | |
CN203117963U (en) | Debugging system and device for providing graphical pin interface | |
CN101901562B (en) | Electronic control experimental device | |
CN208092199U (en) | Production debugging line, matched main core sheet and production debugging device | |
CN107870834B (en) | Testing jig for hard disk backboard | |
CN216772410U (en) | Serial port debugging circuit of display device | |
CN212276658U (en) | Portable development device for singlechip teaching | |
CN109446014A (en) | A kind of BMC test Information Authentication method, apparatus, terminal and storage medium |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
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: 20230418 |