Midi and Crystals

Started by charlesthroat October 24, 2003
Hi again,

No, this isn't about John Tesh's music.

Looking at the formula on Tom Igoe's excellent webpage, it occurs to
me that a 7.5 mhz crystal would give you EXACTLY 31250 for a baud
rate. Are such crystals available, does anyone have a source? Surely
this isn't overclocking by much.

Has anyone tried this? I'd be willing to be the guinea pig if anyone
knows a source for a 7.5 mhz crystal.


> ... if the crystal rate were EXACTLY 7.5 mhz...

A technicality: mHz means milliHertz; it is one-billionth of a megaHertz.

If it exists as a stock product anywhere, it would be a Citizen part number
CSA309-7.500MABJ, or equivalent. I don't see any source of that frequency
in a stock part, though. That leaves you with two options.

You can synthesize 7.5MHz externally and drive the processor, or you can use
a larger form factor than the stock 9mm long can, probably an HC/45U, and
have a crystal made for about $20 by International Crystal:
http://www.icmfg.com/buildcrystal.html. You need a 20pF parallel-mode part.

The system time-of-day clock/calendar will not be accurate after this
modification, of course. Tom Becker
--... ...--
www.RighTime.com
The RighTime Clock Company, Inc., Cape Coral, Florida USA
+1239 540 5700



--- In , "Tom Becker" <gtbecker@r...> wrote:
> That leaves you with two options.


Maybe there's a third. On poking around a little more, I see that an
8 MHz crystal is a common part. Plugging the register with 15 instead
of 14, an 8 MHz crystal gives us.... exactly 31250 baud!

Anyone know if the BX-24 can take being overclocked that far? Ignore
the question if it's answered somewhere in the group, I'll do a
search.

Thanks

Michael



The processor is specified to 8MHz.

http://www.atmel.com/dyn/resources/prod_documents/1041S.PDF Tom Becker
--... ...--
www.RighTime.com
The RighTime Clock Company, Inc., Cape Coral, Florida USA
+1239 540 5700



--- In , "Tom Becker" <gtbecker@r...> wrote:
> The processor is specified to 8MHz.
>
> Tom Becker


CSA309-8.000MABJ under a buck at DigiKey. I'll let everyone know how
it works. Thanks so much for all the help.

New question, I'm just full of them. Anyone know of an example
circuit and/or code using the BX with an infrared transmitter, as in
a TV remote control?



> ... I'm just full of them...

Well, I can answer that one, too. See the last paragraph of
http://groups.yahoo.com/group/basicx/message/14578. Tom Becker
--... ...--
www.RighTime.com
The RighTime Clock Company, Inc., Cape Coral, Florida USA
+1239 540 5700


Keep in mind that changing the crystal to something other than
7.3728 will alter the internal serial timing and make downloading
to the BasicX impossable.

You will have to swap the crystal evertime you want to download
a new program. Chris




Yes, thank you, I'd thought of that. Good point though. It's worth it
if I can get this working.

What a shame that there appears to be no other solution. That pretty
much keeps the BX-24 completely out of the running for a lot of
interesting applications if this crystal-swapping is the only
solution. --- In , "Chris" <chrish@n...> wrote:
> Keep in mind that changing the crystal to something other than
> 7.3728 will alter the internal serial timing and make downloading
> to the BasicX impossable.
>
> You will have to swap the crystal evertime you want to download
> a new program. > Chris





> ... if this crystal-swapping is the only solution.

You _can_ switch crystals with a very small switch, well positioned. Tom Becker
--... ...--
www.RighTime.com
The RighTime Clock Company, Inc., Cape Coral, Florida USA
+1239 540 5700



Thanks, that's what I'll do. It's on its way.

I found a circuit that woks perfectly for counting frequencies coming
from a line-level source such as a synthesizer at

http://www.myplace.nu/avr/gtuner/

CountTransitions returns an exactly accurate result

I removed the unnecessary crystal and LED circuitry and it works
like a charm. All I need to do is modify it to get a microphone-level
input to work - surely I can figure that out.

Thanks very much. You folks are very helpful and I appreciate it.

Michael

--- In , "Tom Becker" <gtbecker@r...> wrote:
> > ... if this crystal-swapping is the only solution.
>
> You _can_ switch crystals with a very small switch, well positioned. > Tom Becker
> --... ...--
> GTBecker@R... GTBecker@S... www.RighTime.com
> The RighTime Clock Company, Inc., Cape Coral, Florida USA
> +1239 540 5700