Ok, we have PORTA to control what voltage levels for the pins. (i.e 0 volts or 5 volts <-- 0 , 1)
DDRA to control what pins are input and what pins are output. (i.e 1 for output , 0 for input )
PINA to read which voltage levels are low or high.
But how can we determine from PINA what "A pins" are
input and what are output.
Is the only way to do it is to reading DDRA into a varible and using That?
I know this is a stupid question but I am wondering if their was an all in one varible that told you both the voltage and weather the pin was an input or output pin all in one.
Also I am using the delay function to do PWM is their a better or more efficient way?
Curious to know how fast the fastest frequency for PWM can be with the atmega32 avr chip?
Like if I do
PORTA = 0x01;
PORTA = 0x00;
what would the frequency of the square wave be for the pin0. I am assuming this is the fastest it can be since their is no delay's in between?