1、 1 中文 2075 字 外文资料原文 Design and Implement of Responder Based on Freescale HCS12 Single Chip Microcomputer Responder is also known as the first signal discriminator, which is widely used in various competitions. It can judge the number of the first player accurately, fairly and intuitively. Currently,
2、 a variety of quiz responder has emerged on the market, in which a small responder is commonly designed with small-scale digital integrated circuit. Although the technology has been quite mature,but it is simple function, low intelligence, high fault, simple display, less flexibility, not convenienc
3、e for upgrade, it has been unable to meet all kinds of requirements for intellectual competitions and variety shows. Therefore, it is necessary to develop some kinds of responder which are more suitable for applications. In recent years, with the rapid development of science and technology, the appl
4、ications of single-chip microcomputer are becoming widely, which promotes the development of traditional measurement and control technology. In this paper, Freescale HCS12 1-3 is designed as a core component to achieve an intelligent digital responder with 8-channel 4-8, it has some breakthroughs on
5、 technology, function and other aspects, comparing with the past responder. It is characterized by simple structure, powerful, good reliability, practicability, so that the competition can really carried out on just, fair and open rules. The basic functions of responder designed in this paper are: (
6、1) The system can limit the competition time and answer time of the alarm; (2) The system can identify the answer signal and identify the players number; (3) The system can calculate score for each player and display the scores. Responder can accommodate 8 players numbered 1 to 8. In addition, LED d
7、igital tubes are designed to display the latched data. After race host clears the system, if participants press switch, and after answer is certificated whether it is correct or not, the number of first player to answer in action is immediately shown by digital tubes. Responder should have a strong
8、ability to distinguish players to answer in the action, its resolution reaches at least a few ms After the requirements and functions of responder are analyzed, the following circuits are required in general: 1、 Responder circuit 2 The circuit has two functions: one is to identify the number of the
9、player who press button, and to save the number; the other is to prohibit the other players from buttoning or to make other buttons not available 2、 Timing circuits Host can set competition time and answer time by the time pre-set-circuit. If nobody can answer question within the set time, all playe
10、rs will not get score, then the host will announce the answer. Besides, if someone gets the chance to answer the question, but does not give the right result before the allowable time, he or she wont get the score, the overtime signal will be also send, the host will declare the right answer. Freesc
11、ale HCS12 contains timer module, the timer module can be directly used. 3、 Overtime circuit HCS12 will send overtime signal when time goes beyond the set time, this signal will be transferred to the PC computer by the serial port. The next question will be proceeded to answer. 4、 Scores count and di
12、splay circuit. When host presses the answer key, it is time to start to answer, if one player presses the answer key, his or her number will be recorded, his or her score will be counted and displayed on the LED digital tubes. Bedside the circuits designed above, some necessary logic designs are als
13、o necessary. The logic designs are as following: First, the host will read the question which will show in the LCD; next, the PC computer will send letter k, which means that play is beginning to competition. At the same time, timing circuit starts to work, if nobody gets the chance to answer the qu
14、estion within permitted time, microcontroller will send the word chao shi to PC computer; If someone presses the competition key within the specified time, microcontroller will send his or her number. If the time goes beyond the permitted time, PC computer will send next which means turning to the n
15、ext question, the next question will be automatically showed to answer. If some player gets the chance to answer the question, his or her number and scores will decrease 1 automatically and show in the digital tubes, then microcontroller sends next to go on the next question. If the score is few tha
16、n 0 after decreasing, player is eliminated. The right answer will show on the LCD. Finally, if all the questions are done, microcontroller will send e to end the game, then the scores of all players will be computed, the highest one will be shown on the digital tubes. Responder hardware is firstly d
17、esigned;Responder hardware is taken directly from the hardware resources of Freescale HCS12 development board developed by Suzhou University. The development board takes MC9S12DG128 as the core, using modular design approach, it extracts part of I/O resources,and it also provides each module with a
18、corresponding interface circuit. It 3 also provides A/D input channels, PWM low-pass filter circuits, 16-key keyboard input channels, 8-bit digital I/O circuits, SPI I/O circuits, SCI communication circuits,IC but I/O expansion circuits and so.In this paper, the hardware modules, the pin connections
19、 and the corresponding interfaces of the development board are listed and unified to redesign by actual needs of the system. Before the start of the main program, the total interruptions are turned off and each module is initialized. The initialization of each module has been done in the correspondi
20、ng initialization subprogram of each module. Here we only need call the corresponding initialization subprogram. After the initialization of each module is completed,the total interruptions should be turned on. The main body of the main program is a loop structure; there are also several sub-cycles
21、in the main loop, which are used for the cycle waiting of each loop. After the completion of the initialization, the system has been waited for the signal of competition start with the circular mode until the signal comes. When this signal is received, the system checks whether the cycle time is ove
22、rtime, if it is overtime, the system changes to the next question, otherwise, the system checks the competition signal, if some player competes to answer, then the system checks whether the answer time is out, if the time is not out, the system judges whether the result is true, if the result is rig
23、ht, the player is added 1 point, otherwise, the player is subtracted 1 point, and the system enters the next question. To the player whose score will be subtracted, the system needs to check whether the score is low than 0, if it does, this players input channel is turned off. To be noted that, if t
24、he competition flag is 1, it should be cleared Responder is one of the essential devices in various knowledge and intellectual contests, the development of better and more intelligent digital responder is very significant. Responder designed in this paper can achieve a responders basic functions thr
25、ough experimental prototype testing. It reaches the design target with reasonable design, simple structure, good commonality, strong function, reliable answer and quick reaction. However, as hardware limitations of development board, some functions have not been able to achieve, such as the development board does not have enough LED digital tubes to display all players scores simultaneously, the host can not adjust answer time according the difficulty of the question and so on. These issues will remain to be addressed in future development.