Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Testing a crystal oscillator in circuit

Status
Not open for further replies.

McGuinn

New Member
Hi, I just posted a question about a related problem in the General Chat lounge, but I also have a question on programming/running a PIC16F627.
I am trying to rule out problems on a Velleman kit board, I am able to program a chip on it and read/verify the data, but on selecting RUN with a switch, the chip fails to function.
Is the oscillator on OSC1 / OSC2 required during the programming phase? I removed the OSC, and was able to program the chip, but I wonder whether the crystal is faulty.

The circuit diagram is available at the following URL:
**broken link removed** Page 10.
Any guidance?
 
The oscillator is not required for programming...

-Did you verify the program (read it back out and compare to the original) , to see if it was programmed correctly?
-Did you place the correct jumpers on the board to connect the crystal to the right socket where your 16f627 is installed (JP3 - JP4)...
-Did you set the switch to PGM when programming and to RUN when running the software?
-Are you sure the program you uploaded to the pic is without bugs ?
-Did you set the configuration word to the right oscillator (XT) ?

To test your oscillator you could always set the 16f627 oscillator to use the internal 4Mhz oscillator (be sure to disconnect the crystal if you try this)
 
Exo said:
The oscillator is not required for programming...

-Did you verify the program (read it back out and compare to the original) , to see if it was programmed correctly?
The programs were provided by Velleman, so I am making an assumptions that it is OK. It compiles OK in MicroChip's HEX compiler. 3 other programs don't work either.
-Did you place the correct jumpers on the board to connect the crystal to the right socket where your 16f627 is installed (JP3 - JP4)...
Yes, jumpers are OK.
-Did you set the switch to PGM when programming and to RUN when running the software?
Yes. (thats basic!!!)
-Are you sure the program you uploaded to the pic is without bugs ?
No bugs that a verify picks up...

-Did you set the configuration word to the right oscillator (XT) ?
Not sure, I only saw the configuration code late last night. I do remember XT appearing in one section.
To test your oscillator you could always set the 16f627 oscillator to use the internal 4Mhz oscillator (be sure to disconnect the crystal if you try this)
What is the reference to change this? INT-OSC??? (guessing)

I have a feeling that there is an electrical issue on the board. I have an LED which fails to light intermittantly, it's LD9 on the circuit diagram. It is a flashing LED, but only lights up fully, or not at all... I will replace it with another LED as it may be a misnomer.
I have double checked the resistor values/transistors/etc, and have checked for bridges between solder joints. As I said, programming is OK, RUN is not...

EXO... thanks for your assitance on this and the other query...
 
Yes, INT-OSC is the pics internal oscillator...

LD9 seems to be a special led with a 'blinker' build in... It's not required for normal circuit operation , its just an indiation power is on and you should not remove the pic.
You can just remove the led and give it a try if you think the led's to blaim.

once a pic is programmed it needs very little to run. when in run check there is 5V on pin 14 and pin 4.
 
Exo, they are the points I chose to test also. I'll complete this tonight.
I suspect the LED is damaged as it never worked correctly, it is supposed to flash but doesn't. It has it's own current limiter built in, so I'll install a resistor and standard LED in it's place.
 
Hi guys, I tested the board last night.
I found that all the voltages are OK (5v to Vpp and Vcc when in RUN).
I then loaded another program, (supplied by Velleman for the kit) and noticed that it lit one LED. It's supposed to be a running LED display...
I managed to edit one part of the code to change the light display, and it worked... So now I know that the problem is code related...

I'll work to correct it, and let the guys at Velleman know.
That's three faults I have found with the kit so far.

Thanks for assistance.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top