





Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
The objectives, procedures, and experimental setup for lab 5 in the emch 367 fundamentals of microcontrollers course. Students will learn to use stepper motors under microprocessor control and perform a/d conversion with the 68hc11 microcontroller. Pre-test procedures, wiring diagrams, and test procedures for both stepper motor control and a/d conversion.
Typology: Lab Reports
1 / 9
This page cannot be seen from the preview
Don't miss anything!
The objective of this laboratory is to introduce the student to the use of:
Floppy disk with the asm codes for the programs: LASTNAME_Firstname_Stepper_Motor.asm Hard copy (printout) of Hmwk7 – Stepper Motor. When printing, use the 'pages per sheet' option in the lower right corner of the print dialog-box with settings of 4 or 2 (depending on your eyesight) to save paper. (We may want to experiment a little with this before printing the full document.)
The students will utilize the asm code developed with the THRSim11 simulator for Hmwk 7 and Hmwk
The experimental setup for this experiment consists of a stepper motor (Figure 1) and its controller board (Figure 2). The stepper motor controller board is connected to the MCU port B. The MCU generates a sequence of binary patterns that are used by the controller board to energize the stepper motor coils and generate motion.
8 - pin input connector Controller board Stepper motor Figure 1 Stepper motor and its controller board. Control signals to the controller board are sent through the 8-pin input connector.
RED BLACK Figure 2 Circuit diagram of the stepper motor controller board
Wire Connection
S0 1000 $08 1 phase Half step S1 1001 $09 2 phase Full step S2 0001 $01 1 phase Half step S3 0101 $05 2 phase Full step S4 0100 $04 1 phase Half step S5 0110 $06 2 phase Full step S6 0010 $02 1 phase Half step S7 1010 $0A 2 phase Full step
Run the program of homework 7 using the commands >, <, +, -, S: Verify that it can be controlled to do forward and backward motion, slower and faster. Verify that it stops. i) Move forward > Check mark ii) Move backward < Check mark iii) Increase speed (decrease delay) + Check mark iv) Decrease speed (increase delay) - Check mark v) Stop program S Check mark When satisfied with the program operation, show it to your TA. TA checkmark ________
Floppy disk with the asm codes for the program: LASTNAME_Firstname_AD.asm Hard copy (printout) of Hmwk8 – A/D Conversion. When printing, use the 'pages per sheet' option in the lower right corner of the print dialog-box with settings of 4 or 2 (depending on your eyesight) to save paper. (We may want to experiment a little with this before printing the full document.)
The students will utilize the asm code developed with the THRSim11 simulator for Hmwk8. The students will go through the printout of Hmwk8 step by step and will verify that the MCU responds to instructions as expected. The lab is divided into sections. After completing each section, the student will ask the TA to check the student’s work and make a check mark on that section. The asm code is activated into the MCU following the standard procedure learned in Lab 1.
Figure 3 AD conversion experiment: block diagram The analog-to-digital (AD) converter function of the M68HC11 microprocessor will be used to record, as eight-bit digital data, the analog signals developed by a variable potentiometer and sent to the MCU through port E pin PE4. The experimental setup (Figure 3) consists of a variable potentiometer, port E protection card, multimeter, the MCU port E, the MCU port B, and an 8-LED display. The potentiometer generates an adjustable voltage (analog signal) in the range 0 – 5 V. The analog signal is through the port E protection card to the MCU port E. The multimeter records the value (mV) of the analog signal that enters the MCU. Inside the MCU, the analog signal is converted to 8-bit digital. Conversion is effected continuously, in a round-robin fashion and stored internally in four variables (VAL1 – VAL4). The average of these four values is calculated by software and output through MCU port B for digital display on the 8-LED display.
Wire Connection Red wire +5 V Black wire 0 V (Ground) Yellow wire Potentiometer variable output (0 – 5 V)
+5V power supply variable potentiometer 8-LED display multi-meter
Before starting your test, perform the following pre-test procedure to verify that your experimental set- up is performing correctly:
Table 2
Target Actual Predicted Displayed mark Hex Binary 1 750 $ % % 2 1600 $ % % 3 2200 $ % % 4 3000 $ % % 5 4000 $ % % 6 5000 $ % %