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

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

Re: [avr-gcc-list] newbie trying to get at90s8515 to work on breadboard


From: Richard Urwin
Subject: Re: [avr-gcc-list] newbie trying to get at90s8515 to work on breadboard
Date: Sat, 8 Jan 2005 15:44:57 +0000
User-agent: KMail/1.5.3

On Saturday 08 Jan 2005 1:41 pm, Chris Donovan wrote:
> On Sat, 8 Jan 2005 11:34:49 +0000
>
> Richard Urwin <address@hidden> wrote:
> > >  I am trying to get an at90s8515 to work on a breadboard. 
> > > Basically I have an atstk500 and the chip(at90s8515) works just
> > > fine on that board but when I move it to a breadboard I can't get
> > > it to work correctly. The C code for it is below.  portb0-7 are
> > > being used to activate/de-activate the LED's on the stk500 board,
> > > and they work just fine when the chip is inserted into the
> > > stk500.
> > >
> > >  I have connected pin 40(vcc) to the +9V supply(tried 5-9V) with
> > >  misc
> > > resistance to lower it to 5V.  When I connect up portb0 on the
> > > breadboard to the +LED terminal, it does not work as expected. 
> > > It just keeps the LED on all the time instead of blinking like it
> > > should. If I connect pin20 to the  the 9V it doesn't activate the
> > > LED at all, and the LED just stays off.
> >
> > It would be worth checking that the LED still lights when you
> > connect it to portb0. Feeding voltage directly to an LED will kill
> > it in milliseconds. It's also worth putting the 8515 back into the
> > STK500 and checking that it still works too.
>
> Yes it does work when I put it back on the stk500.  The LED does work
> as I am reducing the voltage via a 410ohm resistor.  I am trying to
> get to a target voltage of roughly 5V.  I think that is what I need
> since the VCC in the spec sheet says 5V I am not sure of the amperes
> though but I am guessing .01?

Maybe, when the LED is off. When it's on you've got 0.3A. It's going to 
be non-trivial to get a dropper resistor of the right value.

I would echo what others have said: get yourself a 5V supply. Very cheap 
and easy to build. Let me know if you want help with that.

>
> > >  I really haven't the slightest clue of why it isn't working but
> > > I am
> > > thinking perhaps I need to connect more pins on the breadboard to
> > > more things?
> >
> > Could you tell us the full connections you are making to the
> > processor? You don't mention 0V or RESET. These are required, as is
> > XTAL1 and XTAL2 if you haven't set the fuses to use an internal
> > clock.
>
> I don't have either XTAL1|2 connected to anything at the moment.
>
> Ok so basically I have the following:
>
> +9V --> 410ohm --> pin40(VCC)
> pin20(GND) --> -9V

I assume you mean the negative side of a 9V supply - that's 0V, -9V 
would be if you had an 18V supply.

> pin1(PB0) --> 40ohm --> LED(2V)

with the other end of the LED to GND?

2V,20mA LED means the resistor has to drop 3V. V=IR, so
R=V/I,
 =3/0.02 = 150 ohms

It will light with 460 ohms, but dimly.

RESET should be pulled high with a resistor, somewhere around 500-2K, 
the exact value doesn't much matter.

>
> When I connect the GND the LED goes out but when disconnected the LED
> is on, and I don't exactly understand why as yet.

The chip is not running, every part of it is at +5V, including the 
output pin. When you connect GND the chip starts to work, and grounds 
the LED output.

> > If the same chip works in the STK500, and the clock speeds are
> > comparable, then the software is working well enough at the moment,
> > and you don't want to change it.
>
> I am trying to use the internal clock(oscillator?), but from what I
> have read so far from a couple of emails sent to me already I will
> need to buy a crystal(4Mhz?).  I might have to adjust the delay
> because of the different speeds.  I think the internal clock runs at
> 3.68 roughly.  Do I just need a crystal or a full oscillator?  Which
> one is more efficient?  I saw on page 6 of the spec sheet that it can
> be done either way but I don't have either the oscillator or the
> crystal with 2 caps, so what is a good way to go?  I was thinking of
> just getting an oscillator(4 pin?) and using that instead of getting
> the crystal with 2 caps.

I like 3 pin ceramic resonators. You just connect the outside pins to 
XTAL1 and XTAL2 and ground the centre pin. Dead easy, and no capacitors 
to worry about. I wouldn't worry about oscillators, they're expensive 
and not as straight forward to use as they sound. Don't get two pin 
resonators though; they still need capacitors, you might as well use a 
crystal. If your application needs exact time-keeping then you need a 
crystal. Be sure to fit exactly the right capacitors for the crystal 
you buy.

If the 8515 has an internal oscillator then you can just use that, but 
you have to program the fuses in the chip to use it. Check the fuse 
descriptions in the data sheet and the manual of your programmer.

-- 
Richard Urwin


reply via email to

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