avr-gcc-list
[Top][All Lists]
Advanced

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

Re: [avr-gcc-list] GCC Functions


From: Patrick Lanphier
Subject: Re: [avr-gcc-list] GCC Functions
Date: Wed, 28 Nov 2001 09:56:40 -0500 (EST)

Well the lights do not turn on when using the function when they do with
the simple assignment statement.  As you can see this is a very simple
test.  I could put more in the function, however, I would then have to
implement this in the main also.  I was attempting find the problem with
the simplest possible test.

Patrick Lanphier
The Artemis Group
http://www.artemisgroup.com
phone: 814-235-0444
  fax: 800-582-9710

On Wed, 28 Nov 2001, Joerg Wunsch wrote:

> Patrick Lanphier <address@hidden> wrote:
>
> > Thanks everyone for the help but things are still not working.  It
> > has to do with the function or the global variable.  If you toggle
> > between the lines you will see this.
>
> What will we see?  Can you elaborate more?
>
> Generating assembler code shows that both statements create
> identical lines of the form:
>
>         sts ledlight,__zero_reg__
>
> Unless you tell us a bit more, there's probably not much help.  Your
> code /is/ correct (assuming your LEDs are connected between port B and
> Vcc).
>
> Also, why don't you try one of my suggestions about implementing a
> somewhat more sophisticated logic inside led1() (like counting the
> variable ledlight up)?  This would allow you a few more hardware
> tests, like connecting an oscilloscope to the various output lines of
> port B.  This will help you find out whether the output lines are
> actually toggling at some frequency, are "floating", or maybe just one
> of the output drivers has been damaged by your experiments.
>
>




reply via email to

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