PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Kein Zugriff auf ATMega128



Foooob
18.01.2007, 17:10
Hallo

Ich habe gerade meine Platine soweit fertiggelötet, dass ich nun eigentlich per LPT Port auf meinen ATMega128 zugreifen sollen könnte - Es geht aber nichts. Stattdessen die ole Fehlermeldung "Programming Enable Sequenz not successfull......"

Ich nutze zum Lesen des ICs TwinAVR. Als ich eben eine alte Platine aus dem Schrank zog und den dortigen Mega32 auslesen wollte ging das ohne Probleme. Er ist auch richtig verdrahtet. 10x überprüft. Auch die kleine Kontroll-LED die ich mit draufgebaut habe leuchtet brav auf.

An was könnte es liegen? Zu einem Spannungseinbruch aufgrund zu hoher Belastung kann es nicht kommen, das einzige was am LPT Port an Last hängt sind ´ne LED + RV sowie der Mega....

Was ich mir dachte: Kann es daran liegen, dass der Mega128 schlicht zu neu für mein TwinAVR ist?

EDIT: Letzteres eben mit neuester TwinAVR-Version getestet - Tut sich nix....

fluchtpunkt
18.01.2007, 23:24
Er ist auch richtig verdrahtet. 10x überprüft.
Hab zwar keine Ahnung was TwinAVR ist, aber ich nehme an du willst per ISP programmieren?
Hast du auch beachtet das die Pinbelegung fuer ISP ein wenig anders als bei anderen AVRs ist?


Even though the SPI Programming interface re-uses the SPI I/O module, there is one
important difference: The MOSI/MISO pins that are mapped to PB2 and PB3 in the SPI I/O module are not used in the Programming interface. Instead, PE0 and PE1 are used for data in SPI Programming mode as shown in Table 127.

Table 127. Pin Mapping SPI Serial Programming
Symbol Pins I/O Description
MOSI (PDI) PE0 I Serial data in
MISO (PDO) PE1 O Serial data out
SCK PB1 I Serial clock

Foooob
19.01.2007, 11:48
Oh ja....genau das habe ich nämlich übersehen, danke :-)
Nun funktioniert (fast) alles....


Ich habe nur noch ein Problem: Die ganzen PFx Pins stellen sich tot. Also PF4, PF5, PF6 etc...

Die anderen hören super auf mich, nur diese wollen einfach nicht...woran kann das liegen? Ich hab sie ganz normal geregelt aber kann denen keinen High-Pegel entlocken...:-(

Pascal
19.01.2007, 12:08
Des is jetzt nur eine Vermutung, aber vielleicht liegt es ja dran, dass du nicht alle Spannungsversorgungen angeschlossen hast.

lorcan
19.01.2007, 12:47
JTAG-Interface schon ausgestellt?
Wenn ich mich recht entsinne war da was...

Pascal
19.01.2007, 12:56
Ich hab jetzt grad mal ins Datenblatt geschaut und da steht, dass:
- PinF4..7 für JTAG sind (also mal kontrollieren)
- AVCC die Spannungsversorgung für PortF ist

chr-mt
19.01.2007, 15:55
Schon mal den M103 Kompatibilitätsmodus ausgeschaltet ?

Gruß
Christopher

Foooob
19.01.2007, 22:08
Schon mal den M103 Kompatibilitätsmodus ausgeschaltet ?

Gruß
Christopher

Nein, JTAGEN hab ich jedoch ausgeschaltet, dachte auch erst dass es daran liegt.


Kann ich den M103 Kompatibilitätsmodus beherzigt ausschalten oder hat das sonstige Folgen für IC, Schaltung oder Programmcode?


Alle Spannungsversorgungen inklusive AVCC haben Saft.

fluchtpunkt
19.01.2007, 22:34
Kann ich den M103 Kompatibilitätsmodus beherzigt ausschalten oder hat das sonstige Folgen für IC, Schaltung oder Programmcode?
Kannst du einfach ausschalten wenn du keinen M103 ersetzen willst.

However,
some new features in ATmega128 are not available in this compatibility mode,
these features are listed below:
• One USART instead of two, Asynchronous mode only. Only the eight least
significant bits of the Baud Rate Register is available.
• One 16 bits Timer/Counter with two compare registers instead of two 16-bit
Timer/Counters with three compare registers.
• Two-wire serial interface is not supported.
• Port C is output only.
• Port G serves alternate functions only (not a general I/O port).
• Port F serves as digital input only in addition to analog input to the ADC.
• Boot Loader capabilities is not supported.
• It is not possible to adjust the frequency of the internal calibrated RC Oscillator.
• The External Memory Interface can not release any Address pins for general I/O,
neither configure different wait-states to different External Memory Address
sections.
In addition, there are some other minor differences to make it more compatible to
ATmega103:
• Only EXTRF and PORF exists in MCUCSR.
• Timed sequence not required for Watchdog Time-out change.
• External Interrupt pins 3 - 0 serve as level interrupt only.
• USART has no FIFO buffer, so data overrun comes earlier.

Steht alles im Datenblatt ;)

Foooob
19.01.2007, 22:44
Danke!
Nun läuft er wunderbar und alle Pins sind ansprechbar! Vielen Dank!