Hien, Just a thought.... PIND.0 is shared with RXD on a mega16 - you don't have the UART enabled while you are trying to read PIND.0? ;-) HTH Ivan Vernot ----- Original Message ----- From: "kernels_nz" <hein@mediflex.co.nz> To: <AVR-Chat@yahoogroups.com> Sent: Tuesday, February 07, 2006 8:19 AM Subject: [AVR-Chat] Re: Problem reading PIND.0 on Mega16 with 16MHz Crystal > 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? >> > > > > > > > > > > > Yahoo! Groups Links > > > > > > >
Message
Re: [AVR-Chat] Re: Problem reading PIND.0 on Mega16 with 16MHz Crystal
2006-02-06 by Ivan Vernot
Attachments
- No local attachments were found for this message.