PWM outputs sawtooth after possible short

Discussion in 'Embedded Systems and Microcontrollers' started by urb-nurd, Mar 22, 2015.

  1. urb-nurd

    Thread Starter Member

    Jul 9, 2014
    269
    3
    I was re-jiggering my jumpers today and forgot to power down my circuit.

    I ended up shorting a PWM ( I believe) to an external circuit.

    This caused my MCU to reset and appears to have possibly ruined my pin.

    The output of this PWM module is shown in the image below.
    [​IMG]
    The rising edge looks ok but the falling edge is clearly incorrect.

    I am just trying to confirm that it was my short that is causing this erroneous output and not the product of some unforeseen software influences.
     
  2. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,548
    2,373
    Can you post the circuit?
    Max.
     
  3. urb-nurd

    Thread Starter Member

    Jul 9, 2014
    269
    3
    For what reason?

    I ask this because i am testing the PWM output straight from the board i am using. There is nothing connected aside from the required pushbuttons on the prototyping area of my Ready for Pic.

    The screen waveform above was captured with nothing but pushbuttons, oh.... and an LCD however the port that concerts PWM is all clear aside from my scope probes.
     
  4. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,800
    1,104
    Perhaps the PWM pin needs some load in order to give a 'proper' output waveform? On the other hand you may be right; the pull-down transistor of that pin may be compromised :(.
     
  5. urb-nurd

    Thread Starter Member

    Jul 9, 2014
    269
    3
    The other output works as expected with a nice square waveform.
    So I don't think that is likely the case.

    I will be getting a spare chip soon so should be able to see tomorrow or the day after if it is indeed the pin that is fried.
     
  6. urb-nurd

    Thread Starter Member

    Jul 9, 2014
    269
    3
    Problem Solved ---- well a workaround has been implemented.

    I guess i did indeed fry the PWM output, i have re-jiggered the code to use a 3rd PWM output and re-arranged my push-buttons to accommodate this change of pin.

    I now get the correct PWM waveform.
    [​IMG]
     
  7. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,800
    1,104
    Lucky you had a spare output to use ;). Good that it's working.
     
  8. urb-nurd

    Thread Starter Member

    Jul 9, 2014
    269
    3
    also, i must add.

    USB scopes get a-lot of stick on-line - but mine has been more than useful!

    Its small, light and compact - allows me to check my micro-controller from my pc without having to move rooms with all my gear.

    Not bad at all for £40!
     
Loading...