9.8304MHz Crystal For HC908AP Run Mode

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

9.8304MHz Crystal For HC908AP Run Mode

4,791 Views
Byar
Contributor I
Is it possible to use the same 9.8304MHz crystal for both the flash programming in monitor mode and normal run mode? I would like to avoid having to have a 9.8304MHz crystal for programming and a 32KHz crystal for run mode.

Thanks for any help.

Lucas
Labels (1)
0 Kudos
Reply
13 Replies

1,421 Views
Alban
Senior Contributor II
I'm afraid I don't follow you Peg.

The schematics shows the switch on /IRQ between Vtst or Vdd, which matches the note 1 and 2 to enter MON08. It also matches Table 8-1 description.

It describes it is only possible to use a 32kHz crystal to program from an erased part by putting /IRQ to an unusual Vdd (which is not available in the schematics). But in this case, the baud rate is generated via the PLL and not via usual Bus Speed = Crystal / x (x= 2 or 4, depending on MCU and its potential config via PTC3).

Can you please detail what I miss ? It's starting to be late here in the UK, could be why :smileytongue:

Cheers,
Alban.
0 Kudos
Reply

1,421 Views
peg
Senior Contributor IV
Hi Alban,
 
 


Alban wrote:
I'm afraid I don't follow you Peg.

The schematics shows the switch on /IRQ between Vtst or Vdd, which matches the note 1 and 2 to enter MON08. It also matches Table 8-1 description.


Yes I agree, no problem here.
 


It describes it is only possible to use a 32kHz crystal to program from an erased part by putting /IRQ to an unusual Vdd (which is not available in the schematics).

I think you mean GND here. This is the same as for GP32! They show a 3 pos. switch in the GP manual.
 
I think the key things here are:
 
1. Note. 2 under Table 8.1. There is only two possible clock sources for monitor entry, 32k XTAL or high frequency OSCILLATOR.
 
2. The last paragraph on page 117 also re-asserts that an OSCILLATOR is required on blank entry with IRQ at Vdd. (Also that it should be 9.8MHz for 9600 baud as well!)
 
3. The Oscillator is designed for a low frequency xtal and I doubt it would work properly 49 times over its spec. plus I doubt they would design this in just for 1 possible entry method.

 
Also if I am correct the schematic should probably also show a series resistor on the 32k xtal as well.
 
Regards
Peg
 

Message Edited by peg on 2007-01-0610:19 AM

0 Kudos
Reply

1,421 Views
Alban
Senior Contributor II



 It describes it is only possible to use a 32kHz crystal to program from an erased part by putting /IRQ to an unusual Vdd (which is not available in the schematics).



I think you mean GND here. This is the same as for GP32! They show a 3 pos. switch in the GP manual.
Hi, I do agree with you.
 
The series resistor would be to damp the oscillator signal. It's up to the user to determine the best values based on the Negative Resistance value measured.
HC08s have a very good Safety Factor on oscillators and a resistor will be welcomed to limit EMI.
 
Cheers,
Alban.
0 Kudos
Reply

1,421 Views
rocco
Senior Contributor II
Hi, Lucas:

Actually, you shouldn't use a 9.8304MHz crystal at all. The HC908APxxA only supports crystals in the range of 1MHz to 8MHz. It supports oscillators from DC to 32MHz, however.

If you use a 9.8304MHz oscillator for monitor mode, you could certainly use it also for your normal operating mode. The Phase-Lock-Loop in the Clock-Generator-Module should allow you to program the bus-clock to almost anything you might need, all from the 9.8304MHz oscillator.
0 Kudos
Reply

1,421 Views
Byar
Contributor I
A 9.8304MHz oscillator will work as well.

I think I have a handle on this now. If I use a 9.8304MHz oscillator I can get the 9600 baud programming setup correctly. When I go into run mode I will leave the BCS (base clock selector) bit low which will make CGMOUT = 9.8304/2. The SIM module will then divide CGMOUT by 2 to get a bus clock of 9.8304/4.

This avoids having to use the PLL.

If you see anything wrong with what I said please chime in and correct me.
0 Kudos
Reply

1,421 Views
Byar
Contributor I
On second thought a 4.9152MHz crystal would be better so I can handle loss of power and only have to power the MCU from the battery. I will change the divider (set by PTB0) in monitor mode so the 9600 baud rate can be used.

A user earlier posted:
>>Actually, you shouldn't use a 9.8304MHz crystal at all. The HC908APxxA only supports >>crystals in the range of 1MHz to 8MHz.

According to the 5V Oscillator Characteristics table in the data sheet 100KHz is the maximum Fxtalclk. The monitor mode schematic shows a 4.9152MHz crystal being used. Am I misunderstanding something about the data sheet table? Also why would the lower limit be 1MHz if the PLL circuitry typically uses 32KHz?
0 Kudos
Reply

1,421 Views
peg
Senior Contributor IV
Hi Byar,
 
Well we were all well and truly confused!
The CGM is very different between A and non-A versions.
 
The non-A is meant to use a low frequency xtal (32.768kHz typ.)
For monitor mode this only works as a clock source when the device is blank. So you usually need to push a high freq. clock in with an oscillator to re-programme it. (or erase it from the inside)
 
The A version is meant to use a 1 to 8 MHz xtal and so can be arranged to use the same clock to run it and non-blank re-programme it.
 
The schematic for monitor mode in the non-A manual is wrong it should say 32k next to the xtal circuit.
 
Regards
Peg
 
0 Kudos
Reply

1,421 Views
Alban
Senior Contributor II
Hi Peg,

I don't think the schematics is wrong for AP64.
32kHz gives a too low baud rate for the communication to be reliable/possible.
That's why it is also showing a 4MHz XTAL.

Cheers,
Alban.
0 Kudos
Reply

1,421 Views
peg
Senior Contributor IV
Hi Alban,
 
I don't know this device but if we modify the schematic as I suggest it makes it very similar if not the same as the GP32 (which I do know).
 
If the schematic is correct then the monitor entry table and the notes thereunder are wrong! (two pages on in the manual).
 
Regards
Peg
 
0 Kudos
Reply

1,421 Views
Alban
Senior Contributor II
Hello,
 
You are both right:
 
A 9.8304MHz fundamental crystal will probably "work as well", but "you shouldn't use" it !
 
The datasheet restricts the guarantee of functionality up to 8MHz fundamental crystals.
If you are using a higher frequency, it is at your own risks.
 
Cheers,
Alban.
0 Kudos
Reply

1,421 Views
Byar
Contributor I

Alban wrote:
Hello,


You are both right:


A 9.8304MHz fundamental crystal will probably "work as well", but "you shouldn't use" it !


The datasheet restricts the guarantee of functionality up to 8MHz fundamental crystals.

If you are using a higher frequency, it is at your own risks.


Cheers,

Alban.





Can you point out where in the datasheet it gives the fundamental crystal limits?

Thanks
0 Kudos
Reply

1,421 Views
peg
Senior Contributor IV
Hi Byar,
 
Its all spelled out in the Electrical Specs:
Table 22-6, Section 22-7 5V Oscillator haracteristics in MC68HC908APA Rev1 3/2005
Fxtalclk 1MHz to 8MHz.
 
Regards
Peg
 
0 Kudos
Reply

1,421 Views
Alban
Senior Contributor II
Hello Byar,

OK I see where the confusion is coming from.

You, Byar, are talking about the AP64.
Me, was reading after rocco who was talking about the AP64A.

The A derivative is the high speed crystal version of the AP64.
As you were talking about a high speed crystal we thought you just cropped the A...

About where values are:
- MC68HC908AP64.pdf Rev3 of 8/2005 Table 22-6 page 301 line 3
- MC68HC908AP64A.pdf Rev1 of 3/2005 Table 22-6 page 297 line 3

Now to use your 4.9152MHz crystal, you need a AP64A version. Otherwise just use a 32kHz crystal on the AP64.

In term of programming, you don't need an absolute reliability (as opposed to on the field). So even with the AP64, you could use a 4MHz crystal for the programming.
The oscillator internal circuitry gain is different to accommodate the different crystal speeds.

Alban.
0 Kudos
Reply