I am moving over from the motorola world and making my first attempt at using an avr. I started my first project by initializing a 16x2 lcd and displaying the number 255. I basically used the same algorithm that has worked for the motorolas and just substituted the asm code of the avr. This appears to have been successful.
I rushed the project and neglected to setup the stack pointer until after I had a working display. At this point I decided for good measure and before expanding my project I better initialize the stack pointer.
Now the problem. Stack pointer initialization crashes the program. Here is my setup code:
ldi r16,low (RAMEND)
it would seem a sph instruction would be useless because the sram of the 2313 only has 128 bytes.
It doesn't seem that a stack overflow could be a problem because my program is very simple.
An help would be appreciated.