I am developing a system with 1284p and Jack's forked mighty-1284p project. I encountered some strange problems, some of which I first posted here:
http://forum.arduino.cc/index.php?topic=281670
Remaining issue is with crystals. I have two crystals, one is the small one that you can get anywhere such as here:
http://www.dipmicro.com/store/XC7-16000
They call it HC49US, which is what I recognize from all past purchases.
They do work. I have set up a 328p-pu bare minimal system with this crystal and I can upload code to it and watch led blink.
When I use this crystal on either 1284p-pu or p-mau, they seem to work only if I already loaded the blink code. I watched the digital pin on my scope and the 328p and 1284p seem to blink at the same rate.
But when I try to upload code with this crystal (I have a bag and tried 3 already), the IDE would fail and sometimes corrupts the bootloader. Then I remember the interference between crystal and serial pin someone mentioned with the DIP version of 1284P. I tested with and without serial port communication. The P-MAU just stopped working a while ago so I only tested on DIP (P-PU). As expected, if I even start serial port in the program, the code with blink_without_delay will only work for a few seconds. If I send something through serial port, that will immediately stop the program from running. If I used the larger crystal then it's fine. I can send anything to serial port and get it back with echo code serial.write(serial.read()).
I used a scope to look at the crystal oscillator output. For the larger crystal, it swings not rail to rail (maybe after amp it will be, inside the mcu) but is clean. I looked at the "output" pin or xtal2 pin:
The small crystal craps out when I connected my scope to it. The mcu would not start. I tried 328p and the same. I couldn't get a waveform.
Is it possible that the batch of crystals I got is simply bad? I got it from dipmicro like I have always done. I've run out of my previous batch of 200 so I can't do a comparison. I also tried a duemilanove and I couldn't get its crystal output. Maybe these small crystals are low power ones that only oscillate so weakly that the serial interference just corrupts their oscillation. Maybe the larger crystal I have is full swing crystal, any way to tell? It says NYMPH 33-03 90-11. There is nothing I could find online. The frequency is 16.000MHz though (see screen capture).
So my first question boils down to: for those that are using 1284p, where do you get your crystals and how do you make sure it's full swing? I got this crystal from a colleague. Luckily I ran out of the small crystals so I asked him for one and he gave me this giant one. I'll upload pictures when my phone charges up and stops refusing taking pictures.
Another question: the fuse setting fro the 1284p is for low-power crystals, if you read the boards.txt. I have not tried to mess with that yet. For those, especially CR who sells 1284p boards, what fuse settings do you use? I have LF=FF, HF=DE, EF=FD, just as the boards.txt says. Do you guys use some other values?
I just can't figure out why this 1284p exercise turned so badly. I thought it would be my solution to pin/SRAM/FLASH shortage and now it has cost me so much time and gives me doubt whether it's worth it. For those of you that say it's "SO EASY", share some experiences with fuses, crystals, etc. Please!