kernels_nz wrote: > Hi Guys, > > I have a very weird problem with my Mega16 (DIP40) running a 16MHz > crystal (22pF loading caps). > > Im trying to read incoming data on PIND.0 very rapidly (approx 150kHz) > and the chip just doesnt seem to work correctly. It works perfectly if > I use either PIND.7 or PIND.2 (the only other 2 pins I tried). But as > soon as I swap it back to using PIND.0 it stops working again. > > Ive also assertained that the program works fine if I use an internal > 8MHz oscillator instead of 16MHz crystal. So I think it might have > something to do with the fact that PIND.0 is right next to a crystal > pin. 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. > > Unfortunately I really do need to use a 16MHz crystal also, so merely > ignoring the problem and using a slower oscillator will not work ! > > WOULD APPRECIATE ANY SUGGESTIONS !!! > Please post your fuse settings for the osc / clk setup, also have you got all the VCC and Gnd pins connected ? 22pf is a little low for most HC49 crystals, more common is 27 or 33pf (30pf is the ideal) -- Regards, Kat. --------------------------------------------------------------- K.A.Q. Electronics Website: www.kaqelectronics.dyndns.org IM: Yahoo: PinkyDwaggy MSN: katinka@kaqelectronics.dyndns.org For Everything Electronics Phone: 0419 923 731 --------------------------------------------------------------- -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.2/251 - Release Date: 4/02/2006
Message
Re: [AVR-Chat] Problem reading PIND.0 on Mega16 with 16MHz Crystal
2006-02-06 by Kathy Quinlan
Attachments
- No local attachments were found for this message.