avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] different behavior on port A and port C


From: dfx
Subject: [avr-gcc-list] different behavior on port A and port C
Date: Sat, 07 Dec 2013 11:32:09 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.1.1

I have a simple program for ATmega324PA:

#include <avr/io.h>
#define F_CPU 20000000UL
#include <util/delay.h>

int main (void) {
  DDRA = 0xFF;

   while (1) {
     _delay_ms (1);
     PORTA = 0X00;
     _delay_ms (1);
     PORTA = 0XFF;
}

that on Port A works perfectly and generates a square wave on all pins.

The same program, on port C generates the square wave only on pins 0, 1,
6, 7 while the others remain fixed.

The processor is not dead (I've changed 3 processors), and the port's
pins are free (unconnected).

What could be the cause of this different behavior of the two Ports?

(The delay function could interfere with the Port C?)

thank you very much

--
Domenico



---
Questa e-mail è priva di virus e malware perché è attiva la protezione avast! 
Antivirus.
http://www.avast.com

Attachment: dfx.vcf
Description: Vcard


reply via email to

[Prev in Thread] Current Thread [Next in Thread]