For some reason seems that while compiling for ATmega8, direct port manipulation commands, that were working fine on the 328, are simply ignored.
I am still able to use DPM for other things like setting up timers and internal pull ups.
Here’s an example of what i had to do:
if /*(!(PIND &= (1<<PD4)))*/
(!digitalRead(4))
{
if ((a <= 65535) && (a>30))
a=a-10;
delay(5);
Serial.print(a);
Serial.print(" ");
Serial.println ((float) 7812/a);
}
//Serial.println(a);
if //(!(PIND &= (1<<PD5)))
(!digitalRead(5))
{
if ((a >= 0) && (a <65500))
a=a+10;
delay(5);
Serial.print(a);
Serial.print(" ");
Serial.println (float(7812/a));
}
Any ideas what the problem might be!?