We are building a Robot which will use your ATMega128 Mini Header Board. 4 of the boards were ordered and everyone on our team has the same problem:
Code for it which involves a subroutine or interrupt service routine will not work.
For example:
====================
int main()
{
PORTA = 0xFF;
} // will work
====================
void setA()
{
PORTA = 0xFF;
}
int main()
{
setA(); // does not work, does not exit method
}
====================
We have tried both CodeVision and WinAvr programming enviornments in atmega128 mode. We are using ponyprog set for the atmega128.
Has anyone else reported this problem? Could it have something to do with the board since it was designed for the atmega103? Perhaps a compatability fuse bit?
The PCB is compatible with both the ATMega103 and 128. I don’t think it has anything to do with the hardware.
Take a look at the assembly generated by your compiler. What does the return call look like? You will need to read the docs for your compiler to make sure returns are automatically generated.
uC compilers do some crazy things. I have seen a compiler happily generate the assembly and hex files and completely miss arrays and strings. Doesn’t sound like your problem - but just be aware that they do not always report glaring errors.