The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Apr 2017 |
| Last Sign in: | 327 Weeks Ago, 5 Days Ago |
| Questions Answered: | 12843 |
| Tutorials Posted: | 12834 |
MBA, Ph.D in Management
Harvard university
Feb-1997 - Aug-2003
Professor
Strayer University
Jan-2007 - Present
write a program in C or Assembly to:
1) move the servo motor to the 70 degree position.
2)let is stay there for 5 seconds
3)move the servo motor to the 1700 position
4) let it stay there for 5 seconds
5)move the servo motor to the 0 degree position
6)let it stay there for 5 seconds
7)back to step 1
Â
the file below is a reference to a lab that might be able to help.Â
Â
Â
ECET-365 Lab 4Irving SanchezObjective:Use the previous lab 2 codes by modifyUse number values for the duty cycle to discover the Clockwise, Counter Clockwise(Maximum & Minimum angels of the servos)Using the Dip-Switches toCodes:#include <hidef.h>/* common deFnes and macros */#include "derivatve.h"/* derivatve-speciFc deFnitons */void MSDelay (unsigned inT);void main(void) {unsigned inT ArrM1[]={20,30,40,50};unsigned inT ArrM2[]={25,35,45,55};unsigned inT Lab4, Lab4High, Lab4Low;unsigned inT z;DDRP = 0x±±;DDRH = 0x00;PWMPRCLK = 0x02; //$02;PWMSCLA = 125;//$7D;PWMCLK = 0x±±;;PWMPOL = 0x30;//$10;PWMCAE = 0x00;//$00;PWMC²L = 0x0;//$00;PWME = 0x30;//P²P = 0x00;//Channel = 4PWMCN²4 = 30;PWMPER4 = 100;
Attachments:
-----------