Loading ...
Sorry, an error occurred while loading the content.
 

Re: Blowing up PIC processors

Expand Messages
  • manifold_1
    Ok this is a little late but I hope it is useful. You are asking all the right questions for someone who is just starting out. I found a photo called Pic
    Message 1 of 5 , May 1, 2002
      Ok this is a little late but I hope it is useful.


      You are asking all the right questions for someone who is just
      starting out. I found a photo called Pic 7-Segment Display. Is that
      it? It is difficult to tell how you have the displays connected.

      I will make a guess:
      o Port A selects the display.
      o Port C selects the element.
      o The 47ls138 demultiplexes Port A to select one of 8 displays.
      o The displays are common cathode

      1) Yes, you will have loading problems.

      The ls138 is trying to source the current for all the selected
      elements. If all seven elements are selected, then a max of 7 times
      the element current flows through the pin of the ls138. There is a
      problem with this, the ls logic family cannot source very much
      current. It is about 8 mA for each output. Also, the output does
      not go up to 5V. Try the AHC series with +/-25mA outputs and output
      voltages that come close to the supply rails. Check the
      specifications yourself.

      http://www.semiconductors.philips.com/acrobat/datasheets/74AHC_AHCT138
      _2.pdf
      They are available mail order from Digikey for $0.68, SN74AHC138N.

      Now that you have 25mA available for the display, you need to reduce
      the max current for each element to 25mA/7 or about 3.5mA per
      element. The LED drops about 2V so use seven, 1k resistors on port
      C. The other option is adding discrete transistors to drive the
      common cathode pin of each display but then you would need the
      opposite logic level from the 138.


      2) Yes, scanning the displays and multiplexing the elements is
      usually the way displays are controlled. I do not see any place that
      you are shorting out anything. Applying 5V to both ends of an LED is
      the same as applying 0V to both ends of an LED as far as the LED is
      concerned. Again, it is a little difficult to tell exactly how your
      LED are connected.

      3) No resistors in series with the supply! Well, maybe that's not
      entirely true. You could power up the PIC with a 10 Ohm resistor in
      series if you want to make sure it will not burn up. 10 Ohms may or
      may not protect anything but it may make you feel better about
      powering it up for the first time.

      4) The oscillator type depends on the kind of PIC you have. I think
      the 8 pin devices have a build it clock oscillator around 4MHz, some
      have a selection of AT strip, high speed or RC oscillators. Most of
      them have a separate oscillator for the watchdog. Do not confuse the
      watchdog oscillator with the clock oscillator. You can probably find
      a crystal in the correct range by taking parts from an old modem or
      phone or other broken electronic gear. The frequency is commonly
      stamped on the top of the crystal can.

      5) A few more details are needed to help with the buttons. A
      diagram of how you intend on connecting the buttons would help. I
      have used a matrix keypad by scanning the columns and reading the
      rows and it worked great. Do not forget to debounce the button
      presses. I think I have some code that does it but it is part of a
      timer routine. There should also be lots of debounce routines on the
      PIC list.



      --- In Electronics_101@y..., "tobias_keizer" <Tobias_Keizer@y...>
      wrote:
      > Hello All,
      >
      > Well, I kind of tried making the design for the 8 digit 7 segment
      LED
      > display I'm trying to make using a PIC processor. This is really as
      > far as I could get. I placed my design in the 'Photos' section,
      file
      > called board.gif I think. Now, my questions to all you wise people.
      >
      > 1) Will I have a problem with load. Currently I'm using the PIC
      > processor to drive each display which can have up to 7 segments
      lit.
      > The specs mention something about 'maximum output current sunk by
      any
      > I/O pin: 25mA'. Does this mean I can draw up to 25mA per pin? If
      so,
      > that should be about enough for a segment right?
      >
      > 2) Does any of this work in the first place? I'm trying to drive 8
      > seperate displays by quickly rotating the 74LS138. Does 'shorting
      > out' the other 7 displays pose a problem. Is my board ok?
      >
      > 3) Can I merely connect both ICs (especially the PIC) to 5VDC and
      GND
      > or do I have to connect it through a resistor or something?
      >
      > 4) I read in the documentation that the PIC has it's own oscillator
      > at I think 4MHz. This would be more than enough for my application.
      > Does that mean I don't need to connect an external crystal?
      >
      > 5) I'm planning to use the middle connector connected to some I/O's
      > as 'buttons'. Can I merely pump 5VDC into these pins or would that
      > make for cute fireworks?
      >
      > I'm sorry for all the questions but I'd really like to see if I can
      > get some of this stuff down. I'd really appreciate it if someone
      > could help me out a bit.
      >
      > Thanks all,
      >
      > Tobias
    • tobias_keizer
      Hey There, Yes, it is usefull, very much so... The photo you saw is a later version and I forgot to explain how I m trying to make this work. You pretty much
      Message 2 of 5 , May 3, 2002
        Hey There,

        Yes, it is usefull, very much so... The photo you saw is a later
        version and I forgot to explain how I'm trying to make this work.

        You pretty much figured out the cicuit by yourself and yes, I am
        trying to use the 74LS138 to select the displays. Since the 138
        switches to LOW though, what I'm trying to do is use the PIC to carry
        the load of the segments.

        According to my calcs I'd have to pull about 200mA on a fully lit
        display if each segment uses 25mA which the PIC should just about be
        able to handle. I'm guessing each segment would prolly take a lot
        less tho...

        Now, looking at is this way. Would this work? Will the 74LS138 have
        the outputs high enough for the other displays not to light up?

        Thanks for all your help...

        Tobias

        --- In Electronics_101@y..., "manifold_1" <manifold_1@y...> wrote:
        > Ok this is a little late but I hope it is useful.
        >
        >
        > You are asking all the right questions for someone who is just
        > starting out. I found a photo called Pic 7-Segment Display. Is
        that
        > it? It is difficult to tell how you have the displays connected.
        >
        > I will make a guess:
        > o Port A selects the display.
        > o Port C selects the element.
        > o The 47ls138 demultiplexes Port A to select one of 8 displays.
        > o The displays are common cathode
        >
        > 1) Yes, you will have loading problems.
        >
        > The ls138 is trying to source the current for all the selected
        > elements. If all seven elements are selected, then a max of 7
        times
        > the element current flows through the pin of the ls138. There is a
        > problem with this, the ls logic family cannot source very much
        > current. It is about 8 mA for each output. Also, the output does
        > not go up to 5V. Try the AHC series with +/-25mA outputs and
        output
        > voltages that come close to the supply rails. Check the
        > specifications yourself.
        >
        >
        http://www.semiconductors.philips.com/acrobat/datasheets/74AHC_AHCT138
        > _2.pdf
        > They are available mail order from Digikey for $0.68, SN74AHC138N.
        >
        > Now that you have 25mA available for the display, you need to
        reduce
        > the max current for each element to 25mA/7 or about 3.5mA per
        > element. The LED drops about 2V so use seven, 1k resistors on port
        > C. The other option is adding discrete transistors to drive the
        > common cathode pin of each display but then you would need the
        > opposite logic level from the 138.
        >
        >
        > 2) Yes, scanning the displays and multiplexing the elements is
        > usually the way displays are controlled. I do not see any place
        that
        > you are shorting out anything. Applying 5V to both ends of an LED
        is
        > the same as applying 0V to both ends of an LED as far as the LED is
        > concerned. Again, it is a little difficult to tell exactly how
        your
        > LED are connected.
        >
        > 3) No resistors in series with the supply! Well, maybe that's not
        > entirely true. You could power up the PIC with a 10 Ohm resistor
        in
        > series if you want to make sure it will not burn up. 10 Ohms may
        or
        > may not protect anything but it may make you feel better about
        > powering it up for the first time.
        >
        > 4) The oscillator type depends on the kind of PIC you have. I
        think
        > the 8 pin devices have a build it clock oscillator around 4MHz,
        some
        > have a selection of AT strip, high speed or RC oscillators. Most
        of
        > them have a separate oscillator for the watchdog. Do not confuse
        the
        > watchdog oscillator with the clock oscillator. You can probably
        find
        > a crystal in the correct range by taking parts from an old modem or
        > phone or other broken electronic gear. The frequency is commonly
        > stamped on the top of the crystal can.
        >
        > 5) A few more details are needed to help with the buttons. A
        > diagram of how you intend on connecting the buttons would help. I
        > have used a matrix keypad by scanning the columns and reading the
        > rows and it worked great. Do not forget to debounce the button
        > presses. I think I have some code that does it but it is part of a
        > timer routine. There should also be lots of debounce routines on
        the
        > PIC list.
        >
        >
        >
        > --- In Electronics_101@y..., "tobias_keizer" <Tobias_Keizer@y...>
        > wrote:
        > > Hello All,
        > >
        > > Well, I kind of tried making the design for the 8 digit 7 segment
        > LED
        > > display I'm trying to make using a PIC processor. This is really
        as
        > > far as I could get. I placed my design in the 'Photos' section,
        > file
        > > called board.gif I think. Now, my questions to all you wise
        people.
        > >
        > > 1) Will I have a problem with load. Currently I'm using the PIC
        > > processor to drive each display which can have up to 7 segments
        > lit.
        > > The specs mention something about 'maximum output current sunk by
        > any
        > > I/O pin: 25mA'. Does this mean I can draw up to 25mA per pin? If
        > so,
        > > that should be about enough for a segment right?
        > >
        > > 2) Does any of this work in the first place? I'm trying to drive
        8
        > > seperate displays by quickly rotating the 74LS138. Does 'shorting
        > > out' the other 7 displays pose a problem. Is my board ok?
        > >
        > > 3) Can I merely connect both ICs (especially the PIC) to 5VDC and
        > GND
        > > or do I have to connect it through a resistor or something?
        > >
        > > 4) I read in the documentation that the PIC has it's own
        oscillator
        > > at I think 4MHz. This would be more than enough for my
        application.
        > > Does that mean I don't need to connect an external crystal?
        > >
        > > 5) I'm planning to use the middle connector connected to some
        I/O's
        > > as 'buttons'. Can I merely pump 5VDC into these pins or would
        that
        > > make for cute fireworks?
        > >
        > > I'm sorry for all the questions but I'd really like to see if I
        can
        > > get some of this stuff down. I'd really appreciate it if someone
        > > could help me out a bit.
        > >
        > > Thanks all,
        > >
        > > Tobias
      • manifold_1
        Well, it will not harm anything to try it. If you get results such that it _sort of_ works then I would suspect current limiting on either the PIC or the
        Message 3 of 5 , May 6, 2002
          Well, it will not harm anything to try it. If you get results such
          that it _sort of_ works then I would suspect current limiting on
          either the PIC or the ls138 and the ls138 is the lower of the two.



          --- In Electronics_101@y..., "tobias_keizer" <Tobias_Keizer@y...>
          wrote:
          > Hey There,
          >
          > Yes, it is usefull, very much so... The photo you saw is a later
          > version and I forgot to explain how I'm trying to make this work.
          >
          > You pretty much figured out the cicuit by yourself and yes, I am
          > trying to use the 74LS138 to select the displays. Since the 138
          > switches to LOW though, what I'm trying to do is use the PIC to
          carry
          > the load of the segments.
          >
          > According to my calcs I'd have to pull about 200mA on a fully lit
          > display if each segment uses 25mA which the PIC should just about
          be
          > able to handle. I'm guessing each segment would prolly take a lot
          > less tho...
          >
          > Now, looking at is this way. Would this work? Will the 74LS138 have
          > the outputs high enough for the other displays not to light up?
          >
          > Thanks for all your help...
          >
          > Tobias
          >
          > --- In Electronics_101@y..., "manifold_1" <manifold_1@y...> wrote:
          > > Ok this is a little late but I hope it is useful.
          > >
          > >
          > > You are asking all the right questions for someone who is just
          > > starting out. I found a photo called Pic 7-Segment Display. Is
          > that
          > > it? It is difficult to tell how you have the displays connected.
          > >
          > > I will make a guess:
          > > o Port A selects the display.
          > > o Port C selects the element.
          > > o The 47ls138 demultiplexes Port A to select one of 8 displays.
          > > o The displays are common cathode
          > >
          > > 1) Yes, you will have loading problems.
          > >
          > > The ls138 is trying to source the current for all the selected
          > > elements. If all seven elements are selected, then a max of 7
          > times
          > > the element current flows through the pin of the ls138. There is
          a
          > > problem with this, the ls logic family cannot source very much
          > > current. It is about 8 mA for each output. Also, the output
          does
          > > not go up to 5V. Try the AHC series with +/-25mA outputs and
          > output
          > > voltages that come close to the supply rails. Check the
          > > specifications yourself.
          > >
          > >
          >
          http://www.semiconductors.philips.com/acrobat/datasheets/74AHC_AHCT138
          > > _2.pdf
          > > They are available mail order from Digikey for $0.68, SN74AHC138N.
          > >
          > > Now that you have 25mA available for the display, you need to
          > reduce
          > > the max current for each element to 25mA/7 or about 3.5mA per
          > > element. The LED drops about 2V so use seven, 1k resistors on
          port
          > > C. The other option is adding discrete transistors to drive the
          > > common cathode pin of each display but then you would need the
          > > opposite logic level from the 138.
          > >
          > >
          > > 2) Yes, scanning the displays and multiplexing the elements is
          > > usually the way displays are controlled. I do not see any place
          > that
          > > you are shorting out anything. Applying 5V to both ends of an
          LED
          > is
          > > the same as applying 0V to both ends of an LED as far as the LED
          is
          > > concerned. Again, it is a little difficult to tell exactly how
          > your
          > > LED are connected.
          > >
          > > 3) No resistors in series with the supply! Well, maybe that's
          not
          > > entirely true. You could power up the PIC with a 10 Ohm resistor
          > in
          > > series if you want to make sure it will not burn up. 10 Ohms may
          > or
          > > may not protect anything but it may make you feel better about
          > > powering it up for the first time.
          > >
          > > 4) The oscillator type depends on the kind of PIC you have. I
          > think
          > > the 8 pin devices have a build it clock oscillator around 4MHz,
          > some
          > > have a selection of AT strip, high speed or RC oscillators. Most
          > of
          > > them have a separate oscillator for the watchdog. Do not confuse
          > the
          > > watchdog oscillator with the clock oscillator. You can probably
          > find
          > > a crystal in the correct range by taking parts from an old modem
          or
          > > phone or other broken electronic gear. The frequency is commonly
          > > stamped on the top of the crystal can.
          > >
          > > 5) A few more details are needed to help with the buttons. A
          > > diagram of how you intend on connecting the buttons would help.
          I
          > > have used a matrix keypad by scanning the columns and reading the
          > > rows and it worked great. Do not forget to debounce the button
          > > presses. I think I have some code that does it but it is part of
          a
          > > timer routine. There should also be lots of debounce routines on
          > the
          > > PIC list.
          > >
          > >
          > >
          > > --- In Electronics_101@y..., "tobias_keizer" <Tobias_Keizer@y...>
          > > wrote:
          > > > Hello All,
          > > >
          > > > Well, I kind of tried making the design for the 8 digit 7
          segment
          > > LED
          > > > display I'm trying to make using a PIC processor. This is
          really
          > as
          > > > far as I could get. I placed my design in the 'Photos' section,
          > > file
          > > > called board.gif I think. Now, my questions to all you wise
          > people.
          > > >
          > > > 1) Will I have a problem with load. Currently I'm using the PIC
          > > > processor to drive each display which can have up to 7 segments
          > > lit.
          > > > The specs mention something about 'maximum output current sunk
          by
          > > any
          > > > I/O pin: 25mA'. Does this mean I can draw up to 25mA per pin?
          If
          > > so,
          > > > that should be about enough for a segment right?
          > > >
          > > > 2) Does any of this work in the first place? I'm trying to
          drive
          > 8
          > > > seperate displays by quickly rotating the 74LS138.
          Does 'shorting
          > > > out' the other 7 displays pose a problem. Is my board ok?
          > > >
          > > > 3) Can I merely connect both ICs (especially the PIC) to 5VDC
          and
          > > GND
          > > > or do I have to connect it through a resistor or something?
          > > >
          > > > 4) I read in the documentation that the PIC has it's own
          > oscillator
          > > > at I think 4MHz. This would be more than enough for my
          > application.
          > > > Does that mean I don't need to connect an external crystal?
          > > >
          > > > 5) I'm planning to use the middle connector connected to some
          > I/O's
          > > > as 'buttons'. Can I merely pump 5VDC into these pins or would
          > that
          > > > make for cute fireworks?
          > > >
          > > > I'm sorry for all the questions but I'd really like to see if I
          > can
          > > > get some of this stuff down. I'd really appreciate it if
          someone
          > > > could help me out a bit.
          > > >
          > > > Thanks all,
          > > >
          > > > Tobias
        Your message has been successfully submitted and would be delivered to recipients shortly.