avr-chat
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-chat] A simple problem ?


From: Erik Christiansen
Subject: Re: [avr-chat] A simple problem ?
Date: Sat, 18 Jun 2016 18:43:31 +1000
User-agent: Mutt/1.5.21 (2010-09-15)

On 18.06.16 00:45, Ray Pasco wrote:
> I just can't seem to recreate the program. What do you think is wrong or
> missing ?

What happens when the while loop is replaced with a write of 0x0F to one
port? Do you see 4 static highs and four lows? (Deduction is a process of
elimination, after all.)

If that also fails, and you're able to confirm that the board is OK
(i.e. it runs other software), check the few assembler instructions of
your creation with:

$ avr-objdump -D Blink.elf > Blink.dump

Looking at that, you'll see precisely which hardware addresses are
linked to the DDRx and PORTx symbols, and you can check them against the
ATmega2560 datasheet. You can then also confirm that your occasional
"0XFF" instead of "0xFF" is not doing anything unanticipated.

If the static test works, you can debug your use of the avr-libc
function by checking its documentation.

Erik



reply via email to

[Prev in Thread] Current Thread [Next in Thread]