New User Special Price Expires in

Let's log you in.

Sign in with Facebook


Don't have a StudySoup account? Create one here!


Create a StudySoup account

Be part of our community, it's free to join!

Sign up with Facebook


Create your account
By creating an account you agree to StudySoup's terms and conditions and privacy policy

Already have a StudySoup account? Login here

ece 372 final design lab sample report

by: Tyler

ece 372 final design lab sample report ece 3720

Marketplace > Clemson University > Electrical Engineering > ece 3720 > ece 372 final design lab sample report

Preview These Notes for FREE

Get a free preview of these Notes, just enter your email below.

Unlock Preview
Unlock Preview

Preview these materials now for free

Why put in your email? Get access to more of this material and other relevant free materials for your school

View Preview

About this Document

sample report
microcontroller interface
Class Notes
25 ?




Popular in microcontroller interface

Popular in Electrical Engineering

This 6 page Class Notes was uploaded by Tyler on Sunday March 13, 2016. The Class Notes belongs to ece 3720 at Clemson University taught by staff in Spring 2016. Since its upload, it has received 69 views. For similar materials see microcontroller interface in Electrical Engineering at Clemson University.


Reviews for ece 372 final design lab sample report


Report this Material


What is Karma?


Karma is the currency of StudySoup.

You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 03/13/16
Final Design Lab Controlling the speed of the DC motor with Keypad ECE 372 Microcomputer Interfacing Abstract: This design utilizes a Freescale MC9S12 chip as a microcomputer to read input from an  external keypad to controlling the speed of the DC motor.  I use the Pulse Width Modulation to  control the duty cycle of a signal, which can be used to control motor rotation speeds.  Introduction: The keypad configuration was drawn from lab 5, where we used the keypad to read input and  display to the LCD screen. In this lab, the same concept for the interface was used, This time I  am not just use it display on the LCD screen, the keys corresponded to a duty cycle of the DC  motor, like the key “1” corresponded to 10 percentage of the full speed, the key “2”  corresponded to 20 percentage of the full speed. When pressed the key, the DC motor would  change the rotation speed and the LCD screen would display the value of the percentage. The function of controlling the speed of the DC motor we learned from lab 11. In that lab, we  used the button to convert the rotation speed of the DC motor, when pressed one time, the duty  cycle would increasing 25 percentages until the full speed. If press the button again while the  motor achieve full speed, it would stop. For this lab, we use keypad control the speed. It is  convenient for us to see the current speed on the LCD screen, and convert the rotation speed  what we want, not press the button to adjust the speed. But, actually, we can’t control the motor  rotation speeds directly. Pulse Width Modulation allows us to control the duty cycle of a signal,  so it can be used to control motor rotation speeds. In addition, using our board, we must amplify the current in order to power our motor, and we use the Current Driver Chip (TD62003) to  realize the function. Equipment: Equipment for this design project consisted of the following: 1 NI EVLIS II Project Board 2 FreeScale MC9S12 Chip 3 Keypad 4 Wires (x12)                5)   Current Driver Chip (TD62003)                 6)   Small DC Motor Algorithm: The basic algorithm for this code is simple.  It looks for an input from a keypad connected to  PTT.  If an input is found, then it determines if the input is a 1, 2, 3,4,5,6,7,8,9,0 or #(# represent full speed)  If not, it continues looking.  If the input is valid, then the percentage of the full speed  would display on the LCD screen and duty cycle corresponded to the key will output on the  motor. Hardware connection: The wire connection of the keypad is shown below:                                     The pin connection of the Current Driver Chip (TD62003)  is shown below. And wire GND pin to  ground and Common to +5V; the output (O1 pin) of current amplifier goes to the black motor  wire; the red wire from motor goes to 3.3V on NI­ELVIS board; Wiring PWM1 (pin 11 of  Freescale Board Connector J1)  to the input of current amplifie                      Problems: Before realizing the final design lab, I have already designed the code, but, actually, it was not  work well. I wasted a lot of time on using the interrupt function to realize the function of changing the duty cycle. And later I found a more simple way. , The another problems I ran into was that the keypad didn’t work, The reason for this was my polarity of the keypad was reversed. When this was corrected, the program began working properly. CONCLUSION: Through the experience of the design lab, I know a lot how to use the learning to design  something we want. It is not a simple thing, we don’t have schematic, introduction, All things  need us to design. As basis of this lab, I think it is good choice that input any digit less than 100  to make a keypad control the DC motor from stop to full speed in any percentage we want.  Appendix: Code  #include <hidef.h>      /* common defines and macros */  #include <mc9s12dt256.h>     /* derivative information */  //#include "pbs12dslk.h"  #include "lcd.h"  #pragma LINK_INFO DERIVATIVE "mc9s12dt256"  volatile unsigned char duty = 10;  void main(void) {  unsigned char  mask[]={0xEE,0xDE,0xBE,0x7E,0xED,0xDD,0xBD,0x7D,0xEB,0xDB,0xBB,0x7B,0xE7,0xD7,0xB7,0x77};  int i, j, k, m ;  PTT = 0x00;  DDRT=0x0F;/*lower nibble is output*/  PERT=0xF0;/*enable upper nibble to be pull up devices*/  PPST=0x00;/*no pull down/up resistors*/  PTP_PTP1 = 1;  PWMPRCLK = 0x07;  //Maximum prescaling on A PWMSCLA = 0x0F;  //Another scaling PWMCLK_PCLK1 = 1;  //Enable clock A PWMPOL_PPOL1 = 1;  //Polarity – starting PWM low PWMCAE_CAE1 = 0;  //Left aligned PWMPER1 = 100;// just use 100 here, for now dont bother about the time period  PWME_PWME1 = 1;  //Enable PWM on this pin PWMDTY1 = duty; //equals 10  LCDInit();  LCDClearDisplay();  LCDPutString("pick 0­9 and ‘#’ "); //”#” represent duty=100  EnableInterrupts;  while(1)            {                for(i=0;i<16;i++)           {      PTT=mask[i];                  for(j=0; j<10; j++);                  if(PTT==mask[i]) /*if port T=mask[i], clear display  and display*/                                                /*Corresponding character on LCD display*/                 {                   LCDClearDisplay();                  switch(i)                         {                           case 1:LCDPutString("10");duty=10;break;                           case 2: LCDPutString("20"); duty=20;break;                           case 3: LCDPutString("30"); duty=30;break;                           case 5: LCDPutString("40"); duty=40;break;                           case 6: LCDPutString("50"); duty=50;break;                            case 7: LCDPutString("60"); duty=60;break;                           case 9: LCDPutString("70"); duty=70;break;                           case 10: LCDPutString("80"); duty=80;break;                           case 11: LCDPutString("90"); duty=90;break;                            case 14:LCDPutChar('0'); duty=0;break;                            case 15:LCDPutString("100");duty=100;break;                               }//switch end                             PWMDTY1 = duty;                          }//if end                       }//for end               }//while end    }//main end 


Buy Material

Are you sure you want to buy this material for

25 Karma

Buy Material

BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.


You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

Why people love StudySoup

Steve Martinelli UC Los Angeles

"There's no way I would have passed my Organic Chemistry class this semester without the notes and study guides I got from StudySoup."

Kyle Maynard Purdue

"When you're taking detailed notes and trying to help everyone else out in the class, it really helps you learn and understand the I made $280 on my first study guide!"

Bentley McCaw University of Florida

"I was shooting for a perfect 4.0 GPA this semester. Having StudySoup as a study aid was critical to helping me achieve my goal...and I nailed it!"


"Their 'Elite Notetakers' are making over $1,200/month in sales by creating high quality content that helps their classmates in a time of need."

Become an Elite Notetaker and start selling your notes online!

Refund Policy


All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email


StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here:

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.