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.

ICSP and oscillator

Status
Not open for further replies.

birdman0_o

Active Member
Hey guys,

Just wondering if it would be OK to leave a 32.768Khz oscillator across RB6-7 (Time 1 clock input) while using ICSP. The oscillator will also have two stability capacitors which are grounded (30pf?).

Thanks :)
 

be80be

Well-Known Member
You sure you don't want to use RA6 and RA7 32.768Khz oscillator
TRISA<6:7> is overridden by oscillator
configuration. When
Port A 6and 7 are for INTOSC with CLKOUT
 

Pommie

Well-Known Member
Most Helpful Member
If you use the timer1 oscillator on a chip where the crystal shares the programming pins then you will not be able to reprogram the chip. You can try it if you wish on a Junebug, just turn on the timer1 oscillator on the 1320 and MPLAB will no longer recognize the 1320. The only way to get it to work again is to insert a new 1320, let MPLAB recognize it and then hot swap to the old one and erase it.

If you are using something like a 16f88 then you can develop your code on a 16f886 and then swap back when it's all working. Same with a 18F1320 and a 18F2620.

Mike.
 

mvs sarma

Well-Known Member
I don't remember where I read it but those little 32kHz crystals can be damaged by driving them directly.

I am regularly using them across 16F84A oscillator pins vide microchip AN 0615B
I understand the issue is around using it across RB6 abds RB7.
 
Last edited:

be80be

Well-Known Member
I am regularly using them across 16F84A oscillator pins vide microchip AN 0615B
I understand the issue is around using it across RB6 abds RB7.

He not using across oscillator pins He is wanting to use on PGD and PGC
all that will happen is it will lock the chip from reprogramming like Pommie said
 

birdman0_o

Active Member
Heh, it would be easy to just yoink out the oscillator then put it back in after i guess :). Would I need to yoink out the stability capacitors as well? (Just theory I'll probably do it anyways)
 

be80be

Well-Known Member
What are you trying to do? If you want the pic to run at 32khz why use PGD and PGC
 

mvs sarma

Well-Known Member
Heh, it would be easy to just yoink out the oscillator then put it back in after i guess :). Would I need to yoink out the stability capacitors as well? (Just theory I'll probably do it anyways)
Not theory perhaps Microchip always indicates like that with disconnectable circuitry around those two pins RB6&7
 

mvs sarma

Well-Known Member
I don't remember where I read it but those little 32kHz crystals can be damaged by driving them directly.
you are correct Bill
it is there as a NOTE under para 7.6 of PIC16F87/88 datasheet, that reads

"Note: The Timer1 oscillator shares the T1OSI and T1OSO pins with the PGD and PGC pins used for programming and debugging. When using the Timer1 oscillator, In-Circuit Serial Programming™ (ICSP™) may not function correctly (high voltage or low voltage), or the In-Circuit Debugger (ICD) may not communicate with the controller. As a result of using either ICSP or ICD, the Timer1 crystal may be damaged. If ICSP or ICD operations are required, the crystal should be disconnected from the circuit (disconnect either lead) or installed after programming. The oscillator loading capacitors may remain in-circuit during ICSP or ICD operation"
 
Last edited:

Diver300

Well-Known Member
Most Helpful Member
For a 32.768 kHz watch crystal oscillator, it is a good idea to put about 20 kΩ between the oscillator output (T1OSO) and the crystal. It can help start-up by preventing other oscillation modes. The capacitors will be directly connected to the crystal.

1 kΩ or so in series with the oscillator input (T1OSI) would not make any difference to normal running.

If you add both of those resistors the ICSP will not damage the crystal and will not be upset by anything the crystal or the capacitors can do.
 

be80be

Well-Known Member
For a 32.768 kHz watch crystal oscillator, it is a good idea to put about 20 kΩ between the oscillator output (T1OSO) and the crystal. It can help start-up by preventing other oscillation modes. The capacitors will be directly connected to the crystal.

1 kΩ or so in series with the oscillator input (T1OSI) would not make any difference to normal running.

If you add both of those resistors the ICSP will not damage the crystal and will not be upset by anything the crystal or the capacitors can do.

Now thats new thanks for the info
 

Pommie

Well-Known Member
Most Helpful Member
For a 32.768 kHz watch crystal oscillator, it is a good idea to put about 20 kΩ between the oscillator output (T1OSO) and the crystal. It can help start-up by preventing other oscillation modes. The capacitors will be directly connected to the crystal.

1 kΩ or so in series with the oscillator input (T1OSI) would not make any difference to normal running.

If you add both of those resistors the ICSP will not damage the crystal and will not be upset by anything the crystal or the capacitors can do.

Unfortunately, this will not work. As soon as you enable the timer1 oscillator the ICSP stops working even if no crystal is present.

Mike.
 
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top