Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

Question about how to tell if my chip is broken

Question about how to tell if my chip is broken

2007-05-04 by David Greenberg

I am just getting back into using AVRs with linux, and here's my
situation.  I'm using avr-gcc, an STK500v2, and an AT90S2313 (I know,
it's old, but I already have a couple) to try some test programs.
This is the program that builds ok, programs and verifies okay, and
then doesn't work.  It should let my control lights with the
pushbuttons, but i'm clearly doing something wrong.  Thanks for your
advice!

#include <avr/io.h>

int main(void)
{
        DDRB = 0xFF;    /* We put port B pins in output mode */
        PORTB = 0xFF;   /* put all lights in off state */

        PORTB = 0x00;

        DDRD = 0x00;    /* We put port D pins in input mode */

        for(;;){
                PORTB = PORTD; //match the ports
        }

        PORTB = 0xAA;
        return(0);
}

Re: Question about how to tell if my chip is broken

2007-05-04 by bobby cossum

--- In AVR-Chat@yahoogroups.com, enkitec@... wrote:
>
> On 4 May 2007 at 18:03, David Greenberg wrote:
> 
> > 
> >         DDRD = 0x00;    /* We put port D pins in input mode */
> > 
> >         for(;;){
> >                 PORTB = PORTD; //match the ports
>              ^^^^
> 	In assembler it would be PIND here.
>

how about a little bit of DDRB = 0xff;

Re: Question about how to tell if my chip is broken

2007-05-06 by kernels_nz

In C it should be PIND aswell. 

Cheers
Hein B
Auckland, New Zealand

--- In AVR-Chat@yahoogroups.com, "David Greenberg" <dsg123456789@...>
wrote:
Show quoted textHide quoted text
>
> I am just getting back into using AVRs with linux, and here's my
> situation.  I'm using avr-gcc, an STK500v2, and an AT90S2313 (I know,
> it's old, but I already have a couple) to try some test programs.
> This is the program that builds ok, programs and verifies okay, and
> then doesn't work.  It should let my control lights with the
> pushbuttons, but i'm clearly doing something wrong.  Thanks for your
> advice!
> 
> #include <avr/io.h>
> 
> int main(void)
> {
>         DDRB = 0xFF;    /* We put port B pins in output mode */
>         PORTB = 0xFF;   /* put all lights in off state */
> 
>         PORTB = 0x00;
> 
>         DDRD = 0x00;    /* We put port D pins in input mode */
> 
>         for(;;){
>                 PORTB = PORTD; //match the ports
>         }
> 
>         PORTB = 0xAA;
>         return(0);
> }
>

Re: Question about how to tell if my chip is broken

2007-05-06 by kernels_nz

PORTB = PORTD; //match the ports

PORTD in this case would hold the values of the bits for which the
pullup resistors have been turned on. This will probably just set all
the bits of PORTB always off without caring about whats on PIND.

Cheers
Hein B
Auckland,
New Zealand




--- In AVR-Chat@yahoogroups.com, "kernels_nz" <kernels@...> wrote:
Show quoted textHide quoted text
>
> In C it should be PIND aswell. 
> 
> Cheers
> Hein B
> Auckland, New Zealand
> 
> --- In AVR-Chat@yahoogroups.com, "David Greenberg" <dsg123456789@>
> wrote:
> >
> > I am just getting back into using AVRs with linux, and here's my
> > situation.  I'm using avr-gcc, an STK500v2, and an AT90S2313 (I know,
> > it's old, but I already have a couple) to try some test programs.
> > This is the program that builds ok, programs and verifies okay, and
> > then doesn't work.  It should let my control lights with the
> > pushbuttons, but i'm clearly doing something wrong.  Thanks for your
> > advice!
> > 
> > #include <avr/io.h>
> > 
> > int main(void)
> > {
> >         DDRB = 0xFF;    /* We put port B pins in output mode */
> >         PORTB = 0xFF;   /* put all lights in off state */
> > 
> >         PORTB = 0x00;
> > 
> >         DDRD = 0x00;    /* We put port D pins in input mode */
> > 
> >         for(;;){
> >                 PORTB = PORTD; //match the ports
> >         }
> > 
> >         PORTB = 0xAA;
> >         return(0);
> > }
> >
>

Re: Question about how to tell if my chip is broken

2007-05-07 by kernels_nz

HI David,

How did you do the FFT ? Did you use a special chip or embedded
software ? 




--- In AVR-Chat@yahoogroups.com, "David Greenberg" <dsg123456789@...>
wrote:
>
> Thanks--with that solved, my project is complete.  And I'm so glad,
b/c it
> has turned out very cool (a dynamic light show dependent on the FFT
of the
> music playing).
> 
> On 5/6/07, kernels_nz <kernels@...> wrote:
> >
> >   PORTB = PORTD; //match the ports
> >
> > PORTD in this case would hold the values of the bits for which the
> > pullup resistors have been turned on. This will probably just set all
> > the bits of PORTB always off without caring about whats on PIND.
> >
> > Cheers
> > Hein B
> > Auckland,
> > New Zealand
> >
> > --- In AVR-Chat@yahoogroups.com <AVR-Chat%40yahoogroups.com>,
"kernels_nz"
> > <kernels@> wrote:
> > >
> > > In C it should be PIND aswell.
> > >
> > > Cheers
> > > Hein B
> > > Auckland, New Zealand
> > >
> > > --- In AVR-Chat@yahoogroups.com <AVR-Chat%40yahoogroups.com>, "David
> > Greenberg" <dsg123456789@>
> > > wrote:
> > > >
> > > > I am just getting back into using AVRs with linux, and here's my
> > > > situation. I'm using avr-gcc, an STK500v2, and an AT90S2313 (I
know,
> > > > it's old, but I already have a couple) to try some test programs.
> > > > This is the program that builds ok, programs and verifies
okay, and
> > > > then doesn't work. It should let my control lights with the
> > > > pushbuttons, but i'm clearly doing something wrong. Thanks for
your
Show quoted textHide quoted text
> > > > advice!
> > > >
> > > > #include <avr/io.h>
> > > >
> > > > int main(void)
> > > > {
> > > > DDRB = 0xFF; /* We put port B pins in output mode */
> > > > PORTB = 0xFF; /* put all lights in off state */
> > > >
> > > > PORTB = 0x00;
> > > >
> > > > DDRD = 0x00; /* We put port D pins in input mode */
> > > >
> > > > for(;;){
> > > > PORTB = PORTD; //match the ports
> > > > }
> > > >
> > > > PORTB = 0xAA;
> > > > return(0);
> > > > }
> > > >
> > >
> >
> >  
> >
> 
> 
> [Non-text portions of this message have been removed]
>

Re: [AVR-Chat] Re: Question about how to tell if my chip is broken

2007-05-07 by David Greenberg

Thanks--with that solved, my project is complete.  And I'm so glad, b/c it
has turned out very cool (a dynamic light show dependent on the FFT of the
music playing).

On 5/6/07, kernels_nz <kernels@slingshot.co.nz> wrote:
>
>   PORTB = PORTD; //match the ports
>
> PORTD in this case would hold the values of the bits for which the
> pullup resistors have been turned on. This will probably just set all
> the bits of PORTB always off without caring about whats on PIND.
>
> Cheers
> Hein B
> Auckland,
> New Zealand
>
> --- In AVR-Chat@yahoogroups.com <AVR-Chat%40yahoogroups.com>, "kernels_nz"
> <kernels@...> wrote:
> >
> > In C it should be PIND aswell.
> >
> > Cheers
> > Hein B
> > Auckland, New Zealand
> >
> > --- In AVR-Chat@yahoogroups.com <AVR-Chat%40yahoogroups.com>, "David
> Greenberg" <dsg123456789@>
> > wrote:
> > >
> > > I am just getting back into using AVRs with linux, and here's my
> > > situation. I'm using avr-gcc, an STK500v2, and an AT90S2313 (I know,
> > > it's old, but I already have a couple) to try some test programs.
> > > This is the program that builds ok, programs and verifies okay, and
> > > then doesn't work. It should let my control lights with the
> > > pushbuttons, but i'm clearly doing something wrong. Thanks for your
> > > advice!
> > >
> > > #include <avr/io.h>
> > >
> > > int main(void)
> > > {
> > > DDRB = 0xFF; /* We put port B pins in output mode */
> > > PORTB = 0xFF; /* put all lights in off state */
> > >
> > > PORTB = 0x00;
> > >
> > > DDRD = 0x00; /* We put port D pins in input mode */
> > >
> > > for(;;){
> > > PORTB = PORTD; //match the ports
> > > }
> > >
> > > PORTB = 0xAA;
> > > return(0);
> > > }
> > >
> >
>
>  
>


[Non-text portions of this message have been removed]

Re: [AVR-Chat] Re: Question about how to tell if my chip is broken

2007-05-07 by David Greenberg

I did the FFT on my pc, and passed the results to the AVR. (My 2GHz pentium
runs at 90% doing the FFT.  I doubt an embedded system could do it).

On 5/6/07, kernels_nz <kernels@slingshot.co.nz> wrote:
>
>   HI David,
>
> How did you do the FFT ? Did you use a special chip or embedded
> software ?
>
> --- In AVR-Chat@yahoogroups.com <AVR-Chat%40yahoogroups.com>, "David
> Greenberg" <dsg123456789@...>
> wrote:
> >
> > Thanks--with that solved, my project is complete. And I'm so glad,
> b/c it
> > has turned out very cool (a dynamic light show dependent on the FFT
> of the
> > music playing).
> >
> > On 5/6/07, kernels_nz <kernels@...> wrote:
> > >
> > > PORTB = PORTD; //match the ports
> > >
> > > PORTD in this case would hold the values of the bits for which the
> > > pullup resistors have been turned on. This will probably just set all
> > > the bits of PORTB always off without caring about whats on PIND.
> > >
> > > Cheers
> > > Hein B
> > > Auckland,
> > > New Zealand
> > >
> > > --- In AVR-Chat@yahoogroups.com <AVR-Chat%40yahoogroups.com><AVR-Chat%40yahoogr
> oups.com>,
> "kernels_nz"
> > > <kernels@> wrote:
> > > >
> > > > In C it should be PIND aswell.
> > > >
> > > > Cheers
> > > > Hein B
> > > > Auckland, New Zealand
> > > >
> > > > --- In AVR-Chat@yahoogroups.com <AVR-Chat%40yahoogroups.com><AVR-Chat%40yahoogr
> oups.com>, "David
> > > Greenberg" <dsg123456789@>
> > > > wrote:
> > > > >
> > > > > I am just getting back into using AVRs with linux, and here's my
> > > > > situation. I'm using avr-gcc, an STK500v2, and an AT90S2313 (I
> know,
> > > > > it's old, but I already have a couple) to try some test programs.
> > > > > This is the program that builds ok, programs and verifies
> okay, and
> > > > > then doesn't work. It should let my control lights with the
> > > > > pushbuttons, but i'm clearly doing something wrong. Thanks for
> your
> > > > > advice!
> > > > >
> > > > > #include <avr/io.h>
> > > > >
> > > > > int main(void)
> > > > > {
> > > > > DDRB = 0xFF; /* We put port B pins in output mode */
> > > > > PORTB = 0xFF; /* put all lights in off state */
> > > > >
> > > > > PORTB = 0x00;
> > > > >
> > > > > DDRD = 0x00; /* We put port D pins in input mode */
> > > > >
> > > > > for(;;){
> > > > > PORTB = PORTD; //match the ports
> > > > > }
> > > > >
> > > > > PORTB = 0xAA;
> > > > > return(0);
> > > > > }
> > > > >
> > > >
> > >
> > >
> > >
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
>  
>


[Non-text portions of this message have been removed]

Re: [AVR-Chat] Re: Question about how to tell if my chip is broken

2007-05-07 by David Greenberg

I doubt a 4MHz chip could do a 40 channel FFT over a 19200baud connection ;)

On 5/7/07, Tom Becker <gtbecker@rightime.com> wrote:
>
>    > ... I doubt an embedded system could do [an FFT]...
>
> You might not want to say that in public.
>
> Tom
>  
>


[Non-text portions of this message have been removed]

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.