Hallo Forum, bin grad dabei eine liste mit den häufigsten uC/asm fehlern zu schreiben. fällt dem ein oder anderen noch was ein? die ges. liste steht bereits auf www.abotech.net unter der rubrik knowhow, wird dort dann auch ergänzt vielen dank! thomas GENERAL: problems with accessing PORTF and PORTG: - these ports use the extented I/O -use lds and sts instead of in and out (add $20! to adress, see datasheet) problems with 16bit timer: in simmulation correct counts, not on the device - write your 16 bit register in correct order problems with usart (RS232)? - maybe you are using only one channel of your MAX232 and forgotten to pull down the two input pins of the unused second channel - forgot to cross over? - forgotten to set your fuses right -in case of extern clock not reproducable silly behaviour? - all of your unused input pins have a defined potential? set them as output pins - verify your EEPROM contens - check your stack pointer -in case correction him via pop/push - be shure to use register pairs by using e.g. ADD/ADC commands ATMEGA128: your general Code works in simmulation but not on the device: - the device is shipped with the M103C fuse set -see datasheet for more information your PORTF pins are not working? - disable the Jtag fuse - forgot to connect the AVCC pin ATTINY26: pin change interrupt: works in simmulation, not on the device - disable the alternate port function e.g. ADcompare ATTINY12: see for different fusesettings in datasheet before changing to unprogrammable modes
Thomas Krug wrote: > problems with usart (RS232)? > - maybe you are using only one channel of your MAX232 and forgotten to > pull down the two input pins of the unused second channel Ist das wirklich notwendig ? Ich habe das noch nie gemacht, und hatte noch nie Probleme. Am RS32 Eingang ist ein Pulldown verbaut, am 5V Eingang ein Pullup. > not reproducable silly behaviour? > - all of your unused input pins have a defined potential? set them as > output pins Das dürfte aber nicht das Programm beeinflussen. Viel wichtiger: Den Oszillator auf fullswing stellen (bei den älteren AVRs mittels CKOPT) ! Das produziert ansonsten wirklich merkwürdige Fehler, wie z.B. AVR stürzt bei bestimmten Operationen ab, oder AVR macht Mist wenn jemand durchs Zimmer läuft.
Es gibt sicher ein paar Kleinigkeiten, die man auflisten könnte, weil sie im Datenblatt irgendwo stehen, wo man sie nicht vermuten würde (z.B. die beiden klassischen Fehler, die beim ATMega128 und dessen Nachkommen immer wieder gemacht werden, nämlich die oben erwähnte M103C-Fuse und die Benutzung der falschen Pins für ISP; oder eben der gute alte JTAG bei den AVRs, die so was haben...). Allerdings existieren bereits solche Aufstellungen (auch auf dieser Seite, siehe AVR Checkliste). Ich denke, sinnvolle Ergänzungen sind da jederzeit willkommen...
Hallo, das geht aber schnell! nein, buchautor sicher nicht bin nur anfaenger/hobby und stolpere ueber so sachen wie die M103C-Fuse und denk ma, da hat doch sicher fast jeder die ein oder andre stunde zuviel mit fehlersuche investiert... das mit den pullup/down wusste ich nicht -danke mfg thomas
Thomas Krug wrote: > not reproducable silly behaviour? > - all of your unused input pins have a defined potential? set them as > output pins > - verify your EEPROM contens > - check your stack pointer -in case correction him via pop/push > - be shure to use register pairs by using e.g. ADD/ADC commands - make sure no interrupts are changing the SREG contents - don't try to do such a list in English, unless you speak that language quite well
Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.