0
\$\begingroup\$

I am using Asim Khan's Parallel port Programmer to program my AVR ATmega8 controller. The Problem is when I changes fuse bits to external high speed crystal, then the next time programmer does not detects the programmer. I am really frustrated to figure out what would be the problem. Can any one helps me to locate the problem? Thanks in advance

\$\endgroup\$
6
  • 1
    \$\begingroup\$ Did you connect the crystal to the ATmega while you tried to reprogram? \$\endgroup\$
    – arminb
    Commented Mar 4, 2013 at 9:44
  • \$\begingroup\$ yes I tried both. With and with out the crystal. I have read on the internet that may be the high speed crystal is causing the problem but i am not sure about it. I am using 12 Mhz crystal. \$\endgroup\$ Commented Mar 4, 2013 at 10:40
  • \$\begingroup\$ I uploaded a link. Detail schematic is on that URL, and for target Atmega8 board, it is what programmed once and stoped responding after fuse bit set to external crystal. but if I try to program a new chip with internal fuse bit setting it works just fine on same circuit. \$\endgroup\$ Commented Mar 4, 2013 at 11:11
  • 1
    \$\begingroup\$ You've likely programmed in the wrong fuses, possibly setting the clock source to a slow crystal or a TTL Clock input. Post the precise fuse bits you used or so. Alternately, try clocking the AVR using a 100KHz - 1MHz square wave on XIN instead and see if it responds. \$\endgroup\$ Commented Mar 4, 2013 at 13:17
  • \$\begingroup\$ Yes, injecting a clock can be a key part of recovering mis-programmed chips. \$\endgroup\$ Commented Mar 5, 2013 at 3:21

1 Answer 1

1
\$\begingroup\$

Assuming you set the correct fuses, the crystal may not start oscillating because of wrong feedback capacitor values. The "correct value" depends on the load capacitance of the crystal.

See that

  • you have properly connected external feedback capacitors
  • the capacitors have the recommended value (refer to uC and crystal data sheets)
  • the PCB traces are as short as possible (long traces introduce a parasitic capacitance and high impedance)
  • try setting CKOPT fuse (from mega8 data sheet: "When CKOPT is unprogrammed, the Oscillator has a smaller output swing. This reduces power consumption considerably. This mode has a limited frequency range...")
\$\endgroup\$
1
  • 1
    \$\begingroup\$ Thank you so much. your point -"PCB traces as short as possible(long traces introduce a prarasitic capacitance and high impedance)" Really helps me. I tried a few experiments with capacitors and now am able to reprogrammed it thanks \$\endgroup\$ Commented Mar 5, 2013 at 7:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.