PDA

View Full Version : Crystal Signal? Where is it???



Netjammer
- 26th June 2005, 06:01
I finally have my code completed and working (with the 16F877 on the Lab X1 board) I'm in the process of moving over completely to a breadboard. My original configuration uses the Lab X1 development board which has the 16F877 installed from there it is hardwired to a breadboard that has additional circuitry and IC's.

http://www.netjam.com/images/hardware/crystal-2.jpg

All I want to do is move over the 16F877 onto the breadboard pre-programmed and wire it up.

My problem:
While hooking up the 16F877 connections, VSS, VDD & Crystal (4MHz) and caps (22pf) I don't measure any signal at all. I can measure the Lab X1 clock frequency at 4 MHz with an O-scope, nice amplitude and all. When I measure my breadboard 16F877/Crystal I measure nothing.

I have confirmed voltage, current limit, caps, etc. I have used a known good 16F877 from the Lab X1 board and installed onto the breadboard and still no signal. Am I supposed to wire up anything else? I'm using the PIC16F877 datasheet; section 12.2 as my source of Oscillator configurations. I also included a photo of my breadboard setup.

Any input would be greatly appreciated.
Netjammer-

http://www.netjam.com/images/hardware/crystal.jpg

PS. I've also tried other types of crystals freq's and packaging, no luck.

Sharky
- 26th June 2005, 06:49
Hi Netjammer,

Maybe your problem is due to a floating Reset pin (pin 1 on your pic) try to tie it to Vdd through a 4.7K resistor.

Regards
Sharky

Netjammer
- 26th June 2005, 09:52
Hi Netjammer,

Maybe your problem is due to a floating Reset pin (pin 1 on your pic) try to tie it to Vdd through a 4.7K resistor.

Regards
Sharky

Hi Sharky,
I gave that a try and still no luck (used a 4.3K). I just now loaded one of those sample Lab X1 blink programs and verified it works on the Lab X1 board. It does. When I pull it out of the ZIF and install it on the breadboard I still don't get a clock on Pin 13 or 14. I also checked the programmer and it set for XT osc mode.

Thanks for the response, I must be missing something...
Netjammer-

http://www.netjam.com/images/hardware/crystal-3.jpg

sougata
- 26th June 2005, 10:00
Hi,

It sometimes happen with a breadboard that poor ground and mis-contacts prevent oscillator start up . Also try changing the capacitor values. Route all grounds to a common point. If your breadboad has a metal backing plate then ground it.

Regards

Sharky
- 26th June 2005, 10:10
Hi Netjammer,

I think that I misunderstood your question. I thought that the problem was that your program would not execute.
Are you trying to messure directly on the crystal?

Regards
Sharky

Netjammer
- 26th June 2005, 10:12
Hi,

It sometimes happen with a breadboard that poor ground and mis-contacts prevent oscillator start up . Also try changing the capacitor values. Route all grounds to a common point. If your breadboad has a metal backing plate then ground it.

Regards

Hi sougata,
Here is the latest... I installed a 16F877 that was being used on another lab board onto the breadboard. This lab board was part of a workshop I took earlier this year. With this microcontroller I now read a clock signal on pin 14 but not on pin 13. I believe the source code loaded was a temperature measurement routine.

I thought OSC1 would be 4MHz and OSC2 would be /4. I think my O-scope probe is okay but I will step through your suggestions and see what comes about.

Thank you, I really appreciate it.
Netjammer-

Netjammer
- 26th June 2005, 10:16
Hi Netjammer,

I think that I misunderstood your question. I thought that the problem was that your program would not execute.
Are you trying to messure directly on the crystal?

Regards
Sharky

Hi Sharky,
I'm measuring on the actual pins (13/14) with an O-scope probe. Please see my latest response, the 16F877 that has the temp code loaded has a clock signal on Pin 14 but not on 13. I'm trying to find the original code that I loaded to see if there is an INCLUDE or DEFINE that causes this.

Thanks again!
Netjammer-

Darrel Taylor
- 26th June 2005, 10:31
I see in your picture you are using an ATS040 crystal.

That is an AT Strip Cut type crystal, and may need to have a series resistor.

See Figure 12-1 in the 877 datasheet.

Just another possibility,
Darrel

Dave
- 26th June 2005, 13:04
Sharky, When you are probing the osc. pin 13 can you confirm that the code is running? Pin 13 is the osc. input and you could be loading it down with the scope probe. This will stop the crystal from oscillating and the micro pin will look as if there is no activity. Taking the probe off, the oscillator will then start again. Probing the oscillator output pin, There is enough drive to overcome the added capacitance of the probe.

Dave Purola,
N8NTA

Sharky
- 26th June 2005, 14:13
Hi Dave,

I'm not the one that is trying to messure on pin 13 :)

Well I agree on that you could stop the oscillator with your scope prope,
that's why I asked Netjammer if he was messuring directly on the osc pins.

I don't know the LAB X1 board, but when I read about it, it says that it has a crystal oscillator that can be set to different frequencies.

So as you say Dave you can not messure directly on the pins when using a crystal and 2 caps hooked up to the PIC because the capacity from the skop prope wil stop the oscillation, but it is possible to messure the output on a "extern" oscillator like the one I think is on the LAB X1 board.

Puuh, I hope you understand me english, writing is absolut not what I like most! :o

Regards
Sharky

NavMicroSystems
- 27th June 2005, 02:07
Netjammer,

it could also be a problem wit the breadboards capacitance.

This has been discussed several times on the forum.

search for "breadboard"

Netjammer
- 1st July 2005, 06:21
Hi Everyone, just wanted to say thanks again. I didn't get the crystal work but did use the RC capabilties and the microcontroller worked fine, though at a much slower clock speed. Today I purchased several crystal oscillators ranging from 5, 10, 12, 16MHz. I will give them a try. I'll post my results.

Thanks again all,
Netjammer-

Netjammer
- 4th July 2005, 04:50
Just wanted to follow up again. I used the Crystal-Oscillators 4 & 10 MHz. They both worked fine. Someday I'll try to figure out why just the single crystal & caps circuit didnt' work. For now, I'm going to use the Crystal/Osc. combo's. They are CTS brand if anyone's interested.

Cheers!
Netjammer-