Home
Prox / RFID
Verichips
Ladder Logic
[interfacing] †
Tube Joints
Key Code From Photo
SolveSpace (3d CAD)
SketchFlat (2d CAD)
Photographs
Miscellany
Resume / Consulting
Contact Me

LDmicro Forum - Subroutine within ATMEGA16

(you are viewing a thread; or go back to list of threads)

Subroutine within ATMEGA16 (by Jorge Jacome)
Hi all
There is a file written in Assembler attached to this, then I hope my explanation is clear with the problem that I have.

I am using Studio 4 for ATMEL microcontrollers for a Mega16 chip running the simulator step by step , I can see the arrow is executing the first subroutine call Dly jumping to the label Dly and stay in that loop ( it is a delay subroutine ) until reach the command ret.

My surprise is instead of returning to the instruction lsr Acc and executing the rest of commands , then calling the same subroutine for the second time;it jumps to ldi Acc, 0x87 inmediately after the label Loop:

I already used all the options available, or the ones I Know without succesful.

Any help ?
Sat Apr 28 2012, 03:39:32, download attachment Display_withsubroutine
(no subject) (by Jorge Jacome)
Any help

Jorge
Sat May 5 2012, 18:39:04
Post a reply to this comment:
Your Name:
Your Email:
Subject:
(no HTML tags; use plain text, and hit Enter for a line break)
Attached file (if you want, 5 MB max):