Mystery instability of 16f628a


Closed Thread
Results 1 to 19 of 19

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default Re: Mystery instability of 16f628a

    Have I gone mad
    Quite possibly - but we will hold-off sending the guys with the white coat over until we've seen schematics and code...
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  2. #2
    Join Date
    Dec 2009
    Posts
    21


    Did you find this post helpful? Yes | No

    Default Re: Mystery instability of 16f628a

    Thanks for that Bruce - I should have asked matron to check my post - forgot to attach the code, Just arrived back from the village pub and tried Joseph's 4.7k pull up on mclr and lo and behold... it works ! many thanks for that .
    Cheers David

  3. #3
    Join Date
    Dec 2009
    Posts
    21


    Did you find this post helpful? Yes | No

    Default Re: Mystery instability of 16f628a

    I do not believe this ! After a spot of tinkering and adding to the circuit this am it has suddenly gone unstable again (It only operates when finger approaches or touches PIC) stripped circuit down to basic (schematic attached) and it still doesn't work. By the time i have finished it would be quicker to build the thing with valves (tubes) I used to understand them ! The code is as follows:
    [@ device pic16f628a,INTRC_OSC_NOCLKOUT
    define osc 4
    begin:
    low porta.0 ' Turn LED on
    PAUSE 500 ' Wait 500mS (1/2 second)
    high porta.0 ' Turn LED off
    PAUSE 500 ' Wait 500mS (1/2 second)
    GOTO BEGIN ' Loop continuously
    end
    Attached Images Attached Images  

  4. #4


    Did you find this post helpful? Yes | No

    Default Re: Mystery instability of 16f628a

    Have you try turning off the analog comparators? if you dont know how just add ADCON1=7 near the top row...

  5. #5
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    699


    Did you find this post helpful? Yes | No

    Default Re: Mystery instability of 16f628a

    Also, add the line

    TRISA = 0
    "No one is completely worthless. They can always serve as a bad example."

    Anonymous

  6. #6
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default Re: Mystery instability of 16f628a

    CMCON = 7 will disable the comparators. Also place a small 0.1 or 0.01uF cap between the PIC gnd & vcc pins. Make sure it's as close as possible to the pins.

    It's also a good idea to include at least the minimum config options in your code so you're not left with whatever the default unprogrammed config bits are.

    I would use at least @ device pic16F628A, intrc_osc_noclkout, wdt_on, mclr_on, lvp_off, protect_off.

    If that doesn't take care of it, check your power supply.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  7. #7


    Did you find this post helpful? Yes | No

    Default Re: Mystery instability of 16f628a

    yup..my mistake...its cmcon = 7...

  8. #8
    Join Date
    Dec 2009
    Posts
    21


    Did you find this post helpful? Yes | No

    Default Re: Mystery instability of 16f628a

    Hi,
    Thanks for the suggestions folks. tried them all one by one and got nowhere, then noticed that /MCLR was checked in PicKit 2. Unchecked it and everything worked like a dream ! I then worked backward taking each mod off in turn to see which one had done the trick! Yes, youve guessed it .. the dam thing still worked. I have reintroduced all suggestions again in the hope that this thing shows a tad more reliability, but I'm not holding my breath !

    Thanks again
    David

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