MCS Task1.pdf
-
Upload
syed-osaid-haq -
Category
Documents
-
view
221 -
download
5
description
Transcript of MCS Task1.pdf
-
Task:
To control a Pulse Width K of a Square wave of 1 KHz frequency using POT Variable Resister.
Description:
By using a single ADC channel i.e. PA0 (or any other Analog pin) , interface a POT with your Controller and generate a Fast Mode PWM using any PWM Channel (available PWM Channels in Mega16 are shown in Fig.2) . In such a way that its width K or Duty Cycle should vary as the knob of POT rotates.
For verifying output generating from your controller, you may connect your PWM channel to
LED which will affect on its brightness or you may also connect it to Motor using H-Bridge
(Remember L293D is already present on a board)
Dont connect any PIN directly to Motor.
Fig.1 POT (1k or 10K)
Fig.1 POT (1k or 10K)