MC9S08QG8 EXTAL XTAL and PTB6

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MC9S08QG8 EXTAL XTAL and PTB6

3,143 Views
CM600
Contributor I
Hello,
In my design i have 32kHz clock signal connected to the EXTAL input. Is it possible to use PTB6(XTAL) as GPIO?
Labels (1)
0 Kudos
Reply
5 Replies

981 Views
bigmac
Specialist III
Hello,
 
When the external clock is selected, the connection is for a Pierce oscillator configuration with the crystal between XTAL and EXTAL.  However, when driving EXTAL from an external source, I cannot see any way of disabling the XTAL output, and for this to revert to GPIO.  I wonder if TonyP might be able to clarify.
 
Regards,
Mac
 
0 Kudos
Reply

981 Views
tonyp
Senior Contributor II
As soon as an extrernal clock (instead of oscillator) is selected, the XTAL pin is available as general I/O.

Check the description of ICSC1 and ICSC2 bits.

EREFS bit in ICSC2 must be 0 to select external clock instead of the oscillator.

0 Kudos
Reply

981 Views
peg
Senior Contributor IV
Hi Tony,
 
I follow what you are saying and agree with you. But does it actually say anywhere that EREFS = 0 will release the XTAL pin for GPIO use?
I know you have done some experimentation in this area and you may know that this is the behaviour but does the datasheet actually tell us. This section of this manual could do with some improvement in my opinion.
 
0 Kudos
Reply

981 Views
tonyp
Senior Contributor II
It's implied in various places.  No, I couldn't find an explicit mention, either.

Regardless, I can verify that it works.   I have an QG8 application using external clock on EXTAL and I use the XTAL pin for LCD R/S.

>But does it actually say anywhere that EREFS = 0 will release the XTAL pin for GPIO use?

It doesn't say that it should grab it in the first place, either!

Message Edited by tonyp on 2007-04-2501:41 PM

0 Kudos
Reply

981 Views
tonyp
Senior Contributor II
Absolutely!
0 Kudos
Reply