Going backwards, can't even get a basic blinky working now


Closed Thread
Results 1 to 27 of 27

Hybrid View

  1. #1
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,159


    Did you find this post helpful? Yes | No

    Default Re: Going backwards, can't even get a basic blinky working now

    Update: compiled that 16F877 on the Lab X1, it blinks, but it's not consistent.

    Works a bit, then stops.

    If I lightly touch the IC on the X1, it starts up for some random time period.

    Now I noticed I can wave my hand over the X1 to affect it.

    Robert


    EDIT: Linoleum floor, no carpet, barefeet.

  2. #2
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,159


    Did you find this post helpful? Yes | No

    Default Re: Going backwards, can't even get a basic blinky working now

    Connected my Saleae probe to the oscillator on the 16F877 while it's on the X1, the thing spits out like crazy on both pins.

    Name:  16F877 osc at 20MHz on Saleae.png
Views: 3147
Size:  102.0 KB

    But when I connect to the osc while it's on the breadboard, nothing, no activity. Something is definitely wonky on that breadboard.

    I tried with 18, 22 and now 33pF caps just to eliminate that possibility.

    Might have dead circuits inside, that sucker's brand new too.

  3. #3
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,159


    Did you find this post helpful? Yes | No

    Default Re: Going backwards, can't even get a basic blinky working now

    This pic was just out of curiosity. I never saw what was going on during ICSP.

    Gotta love this probe.

    Name:  16F877 ICSP on Saleae.png
Views: 2575
Size:  87.5 KB

  4. #4
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,159


    Did you find this post helpful? Yes | No

    Default Re: Going backwards, can't even get a basic blinky working now

    I wonder if I haven't damaged by PICs with static somehow:
    - 2 of my workhorse aren't programming on breadboard, ZIF adapter or Lab X1.
    - 1 new one has the same problems.
    - 1 workhorse works, but intermittently.
    - and then there's the 18F4550 that just works, on anything.

    I've handled all these ICs the same, same surfaces, same work area, nobody else here messing with them.

    I must be doing something really dumb on the Lab X1, my configs or osc setting. Thing is, I haven't changed anything, the X1 OSC jumpers are always set at 20 MHz for all my ICs (A12, B12 and C23, J3 is at top position when looking at the X1 properly).

    I set the 18F4550 for 1 second blink intervals, and it seems to be keeping time. I also set the 16F877 at 1 second blink intervals, but it seems to be going twice at fast.

    Also, the 16F877 take a long time to erase and program; the 18F4550 takes a fraction of that, maybe 25% at max. And it's technically the same code, just the config changes.

    Robert

  5. #5
    Join Date
    May 2013
    Location
    australia
    Posts
    2,644


    Did you find this post helpful? Yes | No

    Default Re: Going backwards, can't even get a basic blinky working now

    the legs of most crystals are too thin to make good connections on most breadboards,
    aside from the capacitive loading effects from the parallel connector strips , success is difficult under such adverse conditions
    Warning I'm not a teacher

  6. #6
    Join Date
    Aug 2011
    Posts
    453


    Did you find this post helpful? Yes | No

    Default Re: Going backwards, can't even get a basic blinky working now

    Also, if you're using a crystal then probing the OSC1 and OSC2 pins is going to throw things off, and could even make it stop oscillating.
    Usually with a 20M xtal you want smaller caps, not larger ones. You might get away with probing the OSC2 pin since that's the output drive...

    IMHO you're better off using the LABX1 instead of a breadboard. That ICS502 clock generator will give you a nice logic-level output.
    For the 18F4550 I'd set the CONFIG to use external clock mode, not xtal (EC, ECIO or ECPLL)

    Also, the 16F877 take a long time to erase and program
    The PK4 can take a while to switch chips, and it's not great with some of those really old devices. It's even been known to blow them up from time to time (the VPP generator can overshoot > 20V)
    Last edited by tumbleweed; - 2nd May 2023 at 14:11.

  7. #7
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,159


    Did you find this post helpful? Yes | No

    Default Re: Going backwards, can't even get a basic blinky working now

    Quote Originally Posted by tumbleweed View Post
    Also, if you're using a crystal then probing the OSC1 and OSC2 pins is going to throw things off, and could even make it stop oscillating.
    Usually with a 20M xtal you want smaller caps, not larger ones. You might get away with probing the OSC2 pin since that's the output drive...
    Yeah, I noticed that rather quickly on the Lab X1. But even probing only OSC2 on both setups, it quickly became apparent something was terribly wrong with the breadboard.

    I did get OSC1 to function while being probed on the X1. That's wht I wasn't really concerned when the intervals on both pins became "slightly irregular", but hey, the PIC still worked.

    I'm tempted to solder the cap right off the side of the 16F877.


    IMHO you're better off using the LABX1 instead of a breadboard. That ICS502 clock generator will give you a nice logic-level output.
    For the 18F4550 I'd set the CONFIG to use external clock mode, not xtal (EC, ECIO or ECPLL)
    Yeah, but this was just to see if the IC had a heartbeat.


    The PK4 can take a while to switch chips, and it's not great with some of those really old devices.
    Thing is, the PK4 took forever even if I was programming them sequentially in batch mode; keeping the 18F4550 separate.


    It's even been known to blow them up from time to time (the VPP generator can overshoot > 20V)
    You see, now that is very worrisome. Gonna go google voltage limiting. I remember seeing voltage clamps last time I was "electronically active".

    I just don't know to what limit I should set the clamp for. I suppose the datasheet will give me some indication in "maximum specs".

    Robert

Similar Threads

  1. DT_INTS-14 (Blinky Light) Help ?
    By andybarrett1 in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 4th November 2015, 21:28
  2. Replies: 3
    Last Post: - 15th April 2015, 04:58
  3. 12F683 - basic code not working
    By Scampy in forum mel PIC BASIC Pro
    Replies: 56
    Last Post: - 12th February 2014, 00:29
  4. Blinky not working with TOGGLE
    By AndrewC in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 22nd November 2008, 08:45
  5. My first Blinky!
    By nomad in forum mel PIC BASIC Pro
    Replies: 17
    Last Post: - 25th September 2007, 17:29

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