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 kernels_nz

Hi Guys, Thanks for all the suggestions, will check the fuses tonight
when I get home, I think the suggestion that the input is actually
affecting the crystal instead of the other way round sounds very valid.

Im only checking PIND.0 as general input, and im reasonably
experienced with AVR's , so dont believe it's a simple code problem.
As I said, using PIND.0 = dont work, any other one of the PIND pins
works fine. 

THANKS AGAIN ! GREAT SUGGESTIONS FROM EVERYONE !

Cheers
Hein B
Auckland, New Zealand.

--- In AVR-Chat@yahoogroups.com, "Dave VanHorn" <dvh@...> wrote:
>
> > 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.