MCS Task1.pdf

1
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) Don’t connect any PIN directly to Motor. Fig.1 POT (1k or 10K) Fig.1 POT (1k or 10K)

description

MCS task 1

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)