Pins am Mikrokontroller kaput?

Gast #2681367
Lesenswert?

Hallo
Ich will an meinem Atmega16 alle Pins an PORTC auf 0 setzten aber es 
funktioniert nicht! Hab folgendes Programm drauf:
1
 
2
#include <avr/io.h>
3

4
int main(void)
5
{
6
    DDRC = 0xFF;
7
    PORTC = 0x00;
8
  
9
    while(1) {}
10
}
Kann man ja eigentlich nichts falsch machen... Aber die Pins 2-5 liegen 
immer noch auf VCC!? An was kann das liegen? Hab zuvor mit dem 
Mikrocontroller Analog - Digital Converter verwendet und den Timer...
Im Datenblatt haben die Pins noch folgende Bezeichnungen:
PC2 = TCK
PC3 = TMS
PC4 = TDO
PC5 = TDI
Hoffe ihr könnt mir helfen!
#2681372
Lesenswert?

[spot an]Das soll es so etwas wie eine JTAG Interface geben ![spot aus]

Das kannst Du per Fuse-Bits abschalten, dann klappt das auch mit den 
Pins.

----------------
Port C (PC7..PC0)
----------------
Port C is an 8-bit bi-directional I/O port with internal pull-up 
resistors (selected for each bit). The Port C output buffers have 
symmetrical drive characteristics with both high sink and source 
capability. As inputs, Port C pins that are externally pulled low will 
source current if the pull-up resistors are activated.
The Port C pins are tri-stated when a reset condition becomes active, 
even if the clock is not running. If the JTAG interface is enabled, the 
pull-up resistors on pins PC5(TDI), PC3(TMS) and PC2(TCK) will be 
activated even if a reset occurs.
Port C also serves the functions of the JTAG interface and other special 
features of the ATmega16 as listed on page 61.
----------------
Gast #2681374
Lesenswert?

:D das wars schon... Habs abgeschaltet und jetzt gehts! Was bedeutet das 
jetzt wenn der aus is? Dann kann ich meinen Mikrocontroller nicht mehr 
über JTag programmieren/debuggen bis ichs wieder umstelle?
Gast #2681375
Lesenswert?

schau doch mal ins Datenblatt seite 61.

Port C Pins Alternate Functions

PC5 TDI (JTAG Test Data In)
PC4 TDO (JTAG Test Data Out)
PC3 TMS (JTAG Test Mode Select)
PC2 TCK (JTAG Test Clock)

JTAG abschalten sollte helfen.

Antwort schreiben

Bitte melde dich an, um einen Beitrag zu schreiben.

oder

Mit Google-Account einloggen

Die Registrierung ist kostenlos und dauert nur eine Minute.

Jetzt registrieren