I was messing with the below assembler program and I am confused about how to get it to set PortG to output and toggle the PING0 high and low.
If I use the "Out DDRG, Temp" command I get a compiler error, so I tried the individual pin command instead. Thus it compiles without errors and appears to run OK.
When I run the below program on the emulator and debug single step it, PortG doesn't do anything at all.
I am using AVRStudio 4.04.
Can anyone please tell me what I am doing wrong?
;A simple program
.include "m128def.inc" ;Includes the m128 definitions file
;define the variables being used
.def Temp = R16
.org 0x0000 ;Start the program code at address 0x0000
rjmp RESET ;Take a Relative Jump to the RESET Label
; initialize the stack pointer
ldi Temp, 0xFF ;Store 255 in Temp
;out DDRG, Temp ;causes an error
ldi Temp, 0xFF
ldi Temp, 0x01
rjmp Loop ; Loop Endlessly