I'm designing very slim pcb for use with the TLC5940 (20mm wide), so far I've been working on the plan for a single layer pcb but i came across a question.
Wheres is the best place to put the crystal and route the connections?
I have 2 versions with the crystal mounted on the end.
V1 runs the crystal lines around the outside of connections from the end to the XTAL pins.
V2 runs the Crystal lines underneath the mega to the XTAL pins.
Is there a problem with interference from the crystals lines being run around the outside?
(see the attached image for the v1 pcb.
I see from your picture that you are constrained for space and have a limited option on where to place the crystal. The rule is to position the crystal as close as possible to the prescribed pins.
The worst case scenario's are as follows:
Long track lines can become electromagnetic (EM) radiators which could fail your design if it were to go for Radiated Emission Tests at a certified test lab.
Another aspect to consider is electromagnetic (EM) susceptibility. Long tracks can act as receiving antennas i.e. imagine the design is implemented in a vechicle where Electromagnetic spikes from the spark plugs are a threat to your design. In this instance, a random spike could cause a glitch in the clock.
If possible, one could lay the circuit out on a 4 layer PCB such that the track lines are enclosed between two ground planes:
e.g.
Layer 1 [top]
Layer 2 [gnd plane]
layer 3 [tracks from crystal to IC pins]
Layer 4 [gnd plane]
The gnd planes would act as an electromagnetic shield that would curtail electromagnetic emissions and as well as prevent the lines from being susceptable to electromagnetic interference
4 layer? Really?
Just put the crystal under the board, let its "flanges" overlap the items above without interfering.
Or, go surface mount with a few parts, put the uC in a socket and put the crystal, caps, reset pullup resistor/diode/DTR cap underneath it. Put the VCC/AVCC/AREF caps under the chip too.