- A As A Product Development Engineer Siti Has Been Asked To Design The Software And Hardware To Control A Direct Curre 1 (37.96 KiB) Viewed 18 times
(a) As a product development engineer, Siti has been asked to design the software and hardware to control a direct curre
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
(a) As a product development engineer, Siti has been asked to design the software and hardware to control a direct curre
(a) As a product development engineer, Siti has been asked to design the software and hardware to control a direct current (DC) motor. The DC motor will be used to pull a load by using a pulley. The following Figure Q3(a) shows a portion of the CCS C programming codes to generate a Pulse Width Modulation (PWM) signal in her last project. (i) (iii) #include <16f877a.h> #use delay (clock=20000000) void main() { (v) setup_ccp1 (CCP_PWM) setup_timer_2 (T2_DIV_BY_16,255, 1); set_pwml_duty (614); Define duty cycle. Figure Q3(a) Explain the how PWM signal from PIC16F877A microcontroller can be used to control a DC motor? Calculate the PWM frequency. (iv) Calculate the PWM duty cycle. [CI, SP1] [1 mark] [C2, SP2] [3 marks] [C3, SP4] [4 marks] [C3, SP4] [3 marks] Calculate suitable Timer2 prescaler and PR2 values if she needs to set the PWM frequency output to 5kHz. [C3, SP2] [4 marks]