PIC 12F509 begins to heat at power up


Closed Thread
Results 1 to 26 of 26

Hybrid View

  1. #1
    Pedro Pinto's Avatar
    Pedro Pinto Guest


    Did you find this post helpful? Yes | No

    Default

    Hello

    Thanks, i will try it. That is the first and unique project where i use a 8 pin PIC
    The 12F509 have Flash Program Memory of 1.5 kBytes
    The 12F508 have Flash Program Memory of 0.5 kBytes
    Therfore i think that is correct - DEFINE OSCCAL_2K 1 - I hope i'm not wrong

    The datasheet says - On Reset ALL pins are input.
    I will test with GPIO = %00000000 and after that to set the
    TRISIO = %11001111

    I notice if i have success with this changes

    Thanks All

    Best Regards
    Pedro

    Para o Rui, quando estiveres o MSN, falamos

  2. #2
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Pedro Pinto View Post
    Hello

    Thanks, i will try it. That is the first and unique project where i use a 8 pin PIC
    The 12F509 have Flash Program Memory of 1.5 kBytes
    The 12F508 have Flash Program Memory of 0.5 kBytes
    Therfore i think that is correct - DEFINE OSCCAL_2K 1 - I hope i'm not wrong

    The datasheet says - On Reset ALL pins are input.
    I will test with GPIO = %00000000 and after that to set the
    TRISIO = %11001111

    I notice if i have success with this changes

    Thanks All

    Best Regards
    Pedro

    Para o Rui, quando estiveres o MSN, falamos
    I think you should have
    DEFINE OSC 4
    in your code. I have never seen OSSCAL done as a define before, I
    do not see why not, but I have only seen it done as so:
    OSCCAL = %0000000
    or
    OSCCAL = $00

    ANYBODY want to give a short treatise on this ?
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  3. #3
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    ???????????

    PicBasic Pro Compiler
    calibration factor in the last location of code space. The on-chip
    oscillator may be fine-tuned by acquiring the data from this location and
    moving it into the OSCCAL register. Two DEFINEs have been created
    to perform this task automatically each time the program starts:
    Define OSCCAL_1K 1 ' Set OSCCAL for 1K
    device
    Define OSCCAL_2K 1 ' Set OSCCAL for 2K
    device
    Add one of these 2 DEFINEs near the beginning of the PicBasic Pro
    program to perform the setting of OSCCAL.
    Dave
    Always wear safety glasses while programming.

  4. #4
    Join Date
    Jul 2005
    Posts
    78


    Did you find this post helpful? Yes | No

    Default

    Pedro,

    Don't apologies for your English. I'm always amazed when people can learn anything (such as electronics) in something other then their native language: that double translation is huge, good for you for jumping it.

    So in your code you state:

    TRISIO = %11001111

    That sets GP0 to GP3 to inputs, and GP4 and GP5 to outputs. Yet your schematic shows GP5 is the only output.

    Which one is correct?

    But that isn't the problem anyway, even if all pins are driven as low outputs there isn't enough current to make trouble. What does concern me is the GP2 input: if that ever mistakenly is used as an output it is directly connected to ground and hence will suck out a ton of current.

  5. #5
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    ???????????
    Thanks Dave, I missed that.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  6. #6
    Pedro Pinto's Avatar
    Pedro Pinto Guest


    Did you find this post helpful? Yes | No

    Default

    Hello ErnieM

    The GPIO.2 is a input, like you can see on the TRIS
    TRISIO = %11001111
    This input alias "pulsador" have a resistor 27k to VCC and a press switch to GND to turn on a external circuit. When press the on button then the GPIO.5
    go high and turn on the external circuit. The other pins are all inputs except the GPIO.4 that are output, on it in serie a resistor of 1k and after power up i make it low.

    Best regards
    Pedro

Similar Threads

  1. Pic getting part power from Analog Port
    By ShaneMichael in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 22nd April 2009, 11:34
  2. Ideal backup power for PIC micro
    By emavil in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 22nd March 2007, 01:07
  3. PIC power backup with "super capacitor"
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 25th January 2007, 00:51
  4. problems on power up of PIC
    By dmairspotter in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 13th June 2006, 15:11
  5. Controlling power to a PIC with another PIC
    By jswayze in forum Off Topic
    Replies: 3
    Last Post: - 28th May 2005, 20:44

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts