Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: Problem reading PIND.0 on Mega16 with 16MHz Crystal

2006-02-06 by Dave VanHorn

> Could noise from the crystal pin be coupling to the data input
> and corrupting the data stream somehow ? could this be happening
> inside the Mega16 ? If so it is unfortunate that Atmel have placed the
>  RXD pin of the UART right next to the crystal pins.

Far more likely that your input signal is disturbing the crystal.
If you haven't programmed the CKOPT fuse, then do so.

After that, see my other post on checking the oscillator design.

There are also possible layout issues, involving how the crystal caps 
return to the AVR's ground pin. They should do so on an isolated track 
that connects to system ground only at the AVR pin.

> Unfortunately I really do need to use a 16MHz crystal also, so merely
> ignoring the problem and using a slower oscillator will not work !

On a more mundane note, this may be a code problem, can you detail how 
it is that you're checking the pin?

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.