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>>

_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Reply via email to