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 !!! Thanks Hein B Auckland, New Zealand.
Message
Problem reading PIND.0 on Mega16 with 16MHz Crystal
2006-02-06 by kernels_nz
Attachments
- No local attachments were found for this message.