Shop OBEX P1 Docs P2 Docs Learn Events
Crystal problem — Parallax Forums

Crystal problem

electromanjelectromanj Posts: 270
edited 2011-10-25 09:13 in Propeller 1
Hello all. I have a problem that I can't figure out. It concerns the inclusion of
CON
· _clkmode = xtal1 + pll16x
· _xinfreq = 5_000_000
At first my program would work fine with the above included. Then it would work intermittently. Now I have to comment it out or the program doesn't do anything. Below is the full program.
CON
· _clkmode = xtal1 + pll16x
· _xinfreq = 5_000_000

pub ledon
· dira[noparse][[/noparse]23]:=1
· outa[noparse][[/noparse]23]:=0
· repeat
The problem is not exclusive to this one program but to any program I try to load.
Has anybody run into this before?

Comments

  • electromanjelectromanj Posts: 270
    edited 2010-05-25 03:39
    I should have mentioned that my prop is on a homemade board. The cyrstal is very close to the prop.
  • electromanjelectromanj Posts: 270
    edited 2010-05-25 03:43
    here is the layout of my board. It opens with expressPCB.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-05-25 03:50
    See this thread:

    http://forums.parallax.com/showthread.php?p=904603

    There was another, similar, thread involving the PEK; but it has mysteriously disappeared from the recent forum history. Edit: 'found it:

    http://forums.parallax.com/showthread.php?p=908524

    Basically, the problem boils down to inadequate bypassing (and not connecting all the Vdd and Vss pins, if that pertains to you).

    BTW, not everyone uses ExpressPCB (including me). You'll get more help if you convert the layout file to a more common file type, such as pdf, gif, png, etc.

    -Phil

    Post Edited (Phil Pilgrim (PhiPi)) : 5/25/2010 4:16:26 AM GMT
  • electromanjelectromanj Posts: 270
    edited 2010-05-25 03:55
    Thanks for your reply Phil. Could you elaborate on inadequate bypassing? I have connected all the Vdd and Vss pins.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-05-25 03:59
    Ideally, each Vdd/Vss pair of pins will have a 0.1uF ceramic cap connected to them, very close to the pins. This is in addition to any filter capacitance that's located near the voltage regulator. Without these caps, you can experience the behavior you're reporting.

    -Phil
  • electromanjelectromanj Posts: 270
    edited 2010-05-25 04:04
    Ok. I will try that right now.
  • electromanjelectromanj Posts: 270
    edited 2010-05-25 04:13
    I soldered on the caps on both sides of the prop between vdd and vss and I still have the same issue. Any Ideas?
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-05-25 04:15
    I think you'll have to show us the schematic and layout (in a form we can read) before more help can be provided.

    -Phil
  • electromanjelectromanj Posts: 270
    edited 2010-05-25 04:24
    I'm not sure how to convert the file to something that everyone can read. I tryed to export from express pcb to my documents but none of the traces showed up.
  • potatoheadpotatohead Posts: 10,261
    edited 2010-05-25 04:56
    Well, if you have to, zoom in on the layout, turn on all the traces, hit print screen, open paint, paste, crop, and save as .gif.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Wiki: Share the coolness!
    8x8 color 80 Column NTSC Text Object
    Safety Tip: Life is as good as YOU think it is!
  • electromanjelectromanj Posts: 270
    edited 2010-05-25 04:56
    Here is my board. I printed it then scanned it then saved as pdf.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-05-25 05:10
    Is the Prop socketed? Do you have a spare? If so, try it. There have been reports of the PLL circuitry getting fried due to less than ideal power and bypassing. Also, the Vss connection to pin 29 takes a rather circuitous path from the regulator. Maybe a wire soldered directly from the other Prop Vss connection would help.

    -Phil
  • electromanjelectromanj Posts: 270
    edited 2010-05-25 22:40
    Hello,

    Yes, the prop is socketed. I have tried to change the prop with no result. I soldered a wire between both vss pins with no result.

    Here is some more background. When the problem first showed up I thought I had a bad trace to the crystal. I ran the solder iron over the traces and it worked. Then it happened again so I ran a piece resistor lead over the traces from the crystal to the prop. That didn't work for long. I changed the crystal. That didn't work. Now if I touch the top of the eeprom while downloading or hold a ground wire onto the tab of the regulator,or touch the board and the eeprom and download sometimes it works, most times not. I look like a guy with his rabbit ears antenna trying to tune in the superbowl!
    I have not found one thing that works everytime or evan something that works twice in a row. On the otherhand it may only work once every so many times and I'm so busy touching everthing on the board that I haven't noticed the pattern? Update: I tryed to load the program several time without touching anything. Behaves the same.

    At this point I've lost interest in the project I'm working on and am facinated with this problem. I really want to understand why this is happening.
  • LeonLeon Posts: 7,620
    edited 2010-05-25 22:45
    Check the RESn connection, a poor solder joint there could cause those problems.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Leon Heller
    Amateur radio callsign: G1HSM
  • electromanjelectromanj Posts: 270
    edited 2010-05-25 23:12
    ok thanks.
  • ElectricAyeElectricAye Posts: 4,561
    edited 2010-05-26 03:22
    As Leon suggested, it sounds like maybe a bad solder connection. You might even try re-melting some of the connections to make sure they are good. It seems I've heard people mention that some kinds of solder fluxes can sometimes create unwanted conductive pathways. Though I've never detected that problem on any of my own boards, I still make it a habit of scrubbing off the flux with 99% alcohol and a toothbrush. Be sure to wear some eye protection. AND make sure the toothbrush is free of toothpaste.... or your board might end up tasting minty fresh.
  • electromanjelectromanj Posts: 270
    edited 2011-10-24 17:00
    Hello all. I was looking for information regarding size/location of bypass caps for the prop. I remembered getting answers about them before so I dug up this old thread that was started by me. I found the answer to that question in this thread. As I continued reading I remembered the problem I was having at the time, and that I did solve it. Unfortunatly, I don't remember what the solution was and I never posted the solution. Shame on me! I got into the habit a while back of always posting if a solution was found and what it was. Not only does it help people that are doing a search for a similar problem, but it serves as a nice troubleshooting log for yourself. I started this practice because I have found many threads that were dealing with a problem that I was having only to get to the end of the thread and the last recommendation went unanswered, so you don't know if that worked or the person just gave up. I don't do that anymore, and I feel like I need to complete this thread.
    @everyone -thanks for your replies and help. If I remember what solved this issue I'll post it here in this thread.
    @ElectricAye- The board did taste minty fresh. mmmmmmmm!

    traVis
  • SarielSariel Posts: 182
    edited 2011-10-25 09:13
    I was looking for information regarding size/location of bypass caps for the prop

    I was experiencing random resets also on a pretty beefy project of my own, and I realized I neglected the bypass caps on the Prop. Since I was using the QFP, I added 4 ceramic .1uF caps on each pair of Vss/Vdd, and it seemed to do the trick. On a dev board like yours, I would err on the side of caution, and place one on the EEPROM too. So, for the DIP case, I would personally use 2 of them, and if your power pins are spaced far apart, as a rule of thumb I place my bypass caps as close to the Vdd as possible. This seems to clean up the voltage lines quite nicely in most cases. I don't have access to a scope to verify this, but it has worked in the past, especially when using noisy chips like 555 timers and what not.

    And of course, if this info is wrong, or someone else has a better way, please let us know!
Sign In or Register to comment.