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: Mon, 10 Jan 2005 07:54:27 +0000
User-agent: KMail/1.5.3

On Monday 10 Jan 2005 7:33 am, Chris Donovan wrote:
> > > 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.
>
> Yes, that is exactly what I meant 0V.
>
> > > pin1(PB0) --> 40ohm --> LED(2V)
> >
> > with the other end of the LED to GND?
>
> Yes it is connected to the 0V.
>
> > 2V,20mA LED means the resistor has to drop 3V. V=IR, so
> > R=V/I,
> >  =3/0.02 = 150 ohms
>
> I am putting 5V into the pin40(VCC) and it seems to come out right at
> 2V which is exactly what the specs say is within the minV and maxV
> amounts (3mm diffused LED).

Don't depend on the voltage. LEDs have a complex voltage dependence. You 
will always get a correct voltage, probably even when you feed it too 
much current or too little. Only use the voltage to calculate the 
voltage drop, and then calculate the resistor to give the typical 
current ("If" on the datasheet.) LEDs typically work down to below 5mA, 
and if you're happy with the brightness that's fine and you'll be 
reducing the overall current for the project, but you will only get the 
rated brightness at the rated current.

> > 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.
>
> What does pulling it high mean, and what is the purpose of that?  I
> haven't done this part yet 

There is a resistor in the chip that connects RESET to Vcc, that's why 
it's working now. But the datasheet (at least the 90s2313) recommends 
doing so externally too.

> but I did the below steps(adding a 
> crystal, and 2 33pf caps) and it is working just fine(to me of
> course).

> > > 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.
> >
> > 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.
>
> I have it working now.  I connected a 4Mhz crystal to the pins XTAL1
> and 2 , and then from each of those connected a 33pf cap from there
> to the GND.  I know I should be using a 27pf (at least examples on
> the net show those being used for a 4Mhz crystal) but so far it
> hasn't broke anything by using the 33pf.  So basically it looks like
> this:
>
> XTAL1 --> crystal1 --> 33pf --> \
>                                  --> GND
> XTAL2 --> crystal2 --> 33pf --> /
>
> I really appreciate everyone's time and help for this seemingly
> simple step for me.

I'm really glad we could help, it's good to hear it's working. 
Congratulations.

-- 
Richard Urwin


reply via email to

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