My board can't start


Closed Thread
Results 1 to 14 of 14
  1. #1
    Join Date
    Jun 2013
    Posts
    31

    Default My board can't start

    I am experimenting the 7 segment display on a breadboard,but the circuit just can't start,but when I touches the capacitor that connect the crystal,it start,when my hand left the capacitor,it can hold for a few second and it stop again,what happem?

    the schematic and program is in the melab example page

    http://melabs.com/samples/PBP-mixed/7segment.htm

  2. #2
    Join Date
    Sep 2010
    Location
    Las Vegas, NV
    Posts
    305


    Did you find this post helpful? Yes | No

    Default Re: My board can't start

    Well, if you're using MELABS program and have it hooked up correctly I'd say your cap is either shorting something out or not connected to breadboard properly. Breadboards are the worst when it comes to mechanical connections.

    Try replicating the circuit at a different spot on the breadboard. When you do be sure your connections are correct and no leads are touching that should be separated. More than likely it's just a poor mechanical connection.

  3. #3
    Join Date
    Jun 2013
    Posts
    31


    Did you find this post helpful? Yes | No

    Default Re: My board can't start

    I changed the capacitor to a 56pF cap and it works,but switching back to a 22 pF capacitor the circuit just stop,does this something to do with the load capacitance of the crystal?

  4. #4


    Did you find this post helpful? Yes | No

    Default Re: My board can't start

    You speak of capacitor - you should have 2 capacitors, one on each leg of the crystal to ground, they are shown on the schematic.

  5. #5
    Join Date
    Jun 2013
    Posts
    31


    Did you find this post helpful? Yes | No

    Default Re: My board can't start

    Yes I am using two capacitor connector each to the crystal

  6. #6
    Join Date
    Jul 2014
    Location
    NingBo China
    Posts
    10


    Did you find this post helpful? Yes | No

    Default Re: My board can't start

    It is probably because the crystal and 22PF capacitor mismatch.
    So you hand touches a short time changed your capacitor, so a short time is OK
    the others reason:
    one of your 22p capacitor is bad.
    the wire connect to crystal oscillator is too long.
    the capacitors is not connect GND.
    Last edited by Bartchou; - 6th August 2014 at 03:30. Reason: Find a better reason

  7. #7
    Join Date
    Jun 2013
    Posts
    31


    Did you find this post helpful? Yes | No

    Default Re: My board can't start

    I was using a 16Mhz crstal for my project,when I switch the crstal to a 4Mhz crystal,everything fine,I wonder why?i found on the internet for calculating the capacitance,it give this fomular

    C = 2 x ( CL - C s)
    Where C is the capacitor to be connect to the crystal
    CL is the crystal load capacitance
    Cs is the capacitance of the crystal casing plus the circuitry capacitance
    My 16Mhz crystal have a load capacitance of 30pF,the Cs is assume to be 5pF,then my capacitor will be 2x(30-5) = 50pF,but the MCU Datasheet specify that for a 16Mhz crystal,the capacitor should between 10-22pF,so which one is correct?

  8. #8
    Join Date
    Jul 2014
    Location
    NingBo China
    Posts
    10


    Did you find this post helpful? Yes | No

    Default Re: My board can't start

    in the PIC programmer ,there is option for oscillation mode.
    Are you set the option correct?
    -------------------------------------
    F0SC1 F0SC0 oscillation mode
    0 0 LP(Low Power)
    0 1 XT(Crystal/Resonator)
    1 0 HS (High Speed)
    1 1 RC(Resistor/Capacitor)

    the HS > 4M 1M<XT<=4M

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


    Did you find this post helpful? Yes | No

    Default Re: My board can't start

    Are you working on a breadboard or PCB ?
    Breadboards, especially OLD ones often suffer from stray capacitance and poor connections. Darrel once told me he ONLY used brand new boards. I have disassembled several OLD breadboards to find a surprising amount of corrosion in the fingers.
    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.

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


    Did you find this post helpful? Yes | No

    Default Re: My board can't start

    Quote Originally Posted by Bartchou View Post
    in the PIC programmer ,there is option for oscillation mode.
    Are you set the option correct?
    -------------------------------------
    F0SC1 F0SC0 oscillation mode
    0 0 LP(Low Power)
    0 1 XT(Crystal/Resonator)
    1 0 HS (High Speed)
    1 1 RC(Resistor/Capacitor)

    the HS > 4M 1M<XT<=4M
    Always use HS OSC when using 3 wire resonators. This setting allows OSC more current.
    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.

  11. #11
    Join Date
    Jun 2013
    Posts
    31


    Did you find this post helpful? Yes | No

    Default Re: My board can't start

    Quote Originally Posted by Bartchou View Post
    It is probably because the crystal and 22PF capacitor mismatch.
    So you hand touches a short time changed your capacitor, so a short time is OK
    the others reason:
    one of your 22p capacitor is bad.
    the wire connect to crystal oscillator is too long.
    the capacitors is not connect GND.
    I like to know how to check weather the capacitor is good or bad,I have a ESR meter but it only test capacitor smallest to 1 uF

    My crystal is mounted next to the MCU,the capacitor is just next to the crystal

    I have used the capacitor ground to test the voltage of the board,its works



    I switch the capacitor from 16MHz to 4 MHz and reconfigure the program,it works fine

    I google the crystal selection and found that the crystal calculation is as follow

    C = (CL - Cstray)* 2
    where CL is the load capacitance of the crystal
    Cstray is the capacitance of the PCB lead and and crystal casing,maximum around 5 pF

    So for my 16MHz crystal,datasheet shows that the load capacitance is 12pF,plug the figure into the equation , the capacitor should be 2 * (12-5) = 14pF,is that correct?

  12. #12
    Join Date
    Jul 2014
    Location
    NingBo China
    Posts
    10


    Did you find this post helpful? Yes | No

    Default Re: My board can't start

    Quote Originally Posted by Archangel View Post
    Are you working on a breadboard or PCB ?
    Breadboards, especially OLD ones often suffer from stray capacitance and poor connections. Darrel once told me he ONLY used brand new boards. I have disassembled several OLD breadboards to find a surprising amount of corrosion in the fingers.
    Hello,Archangel
    Yes ,I'm work at Nexpcb--PCB fabrication, PCB Assembly, PCB Turnkey Service.
    For breadboard, this situation is common occurrence, especially wet environment.
    It would be better if covered the Conformal coating on the new assembly board.

  13. #13
    Join Date
    Jun 2013
    Posts
    31


    Did you find this post helpful? Yes | No

    Default Re: My board can't start

    Quote Originally Posted by Archangel View Post
    Are you working on a breadboard or PCB ?
    Breadboards, especially OLD ones often suffer from stray capacitance and poor connections. Darrel once told me he ONLY used brand new boards. I have disassembled several OLD breadboards to find a surprising amount of corrosion in the fingers.
    After I started this discussion,I made a pcb board,is the same results.


    I didn't notice there is a FOSC in the PBP command,upon checking the reference manual,it didn't have much info on the command,only shows in a example program with no explanation on the FOSC command,may I know where you got your info on the command?

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


    Did you find this post helpful? Yes | No

    Default Re: My board can't start

    I usually turn off FOSC ( which if memory serves ) is FAIL Safe Oscillator, but specifically I learned the HS_OSC trick from Mackracket who linked to a data sheet which stated that, I will look for that post and add link if I can find it.
    You might check that crystal for integrity too.

    EDIT: My Bad, I turn off FSCM (Fail safe clock monitor).

    Question: What PIC are you using and how is your config statement written?
    Last edited by Archangel; - 9th August 2014 at 06:41.
    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.

Similar Threads

  1. New an what to know what board is best to start
    By asdhillon86 in forum General
    Replies: 13
    Last Post: - 9th December 2010, 19:10
  2. Start bit
    By Tekky in forum Serial
    Replies: 4
    Last Post: - 1st August 2008, 00:26
  3. LCD will not start
    By btaylor in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 24th May 2007, 02:30
  4. how to start
    By bio_eng in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 23rd August 2004, 18:45

Members who have read this thread : 1

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