Sign in

username:

password:



Not a member?

Search avrclub



Search tips

Subscribe to avrclub



avrclub by Keywords

AT90S2313 | AT90S8515 | ATMega | ATmega128 | ECL | FETS | IAR | Keyboard | LCD | STK50 | TMOS | UART

Ads

Discussion Groups

See Also

DSPFPGAElectronics

Discussion Groups | AVRclub | "back plane" connection for Atmega128 MLF package

Atmel AVR Microcontroller discussion group.

"back plane" connection for Atmega128 MLF package - inpactmicro - Aug 4 4:16:00 2004

Is it absolutely necessary to connect to GRROUND the back plane
connection of the 64 pin MLF package for the ATmega128L package or is
this purely for thermal dissipation. what is the effect of not
connecting this underside pin to Ground?





(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )


Having Problem with TWI using ATmega8535 - Andrew Lim - Aug 6 8:45:00 2004


Hi there, I am trying to interface my EEPROM (24FC128) using TWI. but I cant get ACK from the EEPROM. Can anyone help me? I managed to get 0x08 from EEPROM but fail to get ACK from it after that.

I have wired my A0,A1 and A2 to ground. SCL and SDA to pull-up resistor.
Thanks.
Regards,

Andrew ---------------------------------


______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.


(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )

Re: [AVR club] Having Problem with TWI using ATmega8535 - Jan Weber - Aug 6 11:08:00 2004

I don't know, what programming language you're using, but maybe you want to
take a look at the WinAVR examples explaining the use of the TWI peripherals
in C.

WinAVR can be obtained at www.avrfreaks.net , maybe there's also a separate
download for the TWI examples.

Jan ----- Original Message -----
From: "Andrew Lim" <normaxcite@norm...>
To: <avrclub@avrc...>
Sent: Friday, August 06, 2004 2:45 PM
Subject: [AVR club] Having Problem with TWI using ATmega8535 >
> Hi there, I am trying to interface my EEPROM (24FC128) using TWI. but I
cant get ACK from the EEPROM. Can anyone help me? I managed to get 0x08 from
EEPROM but fail to get ACK from it after that.
>
> I have wired my A0,A1 and A2 to ground. SCL and SDA to pull-up resistor. >
> Thanks. >
> Regards,
>
> Andrew > --------------------------------- >
> Yahoo! Groups Links




(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )

Re: [AVR club] Having Problem with TWI using ATmega8535 - Andrew Lim - Aug 6 22:46:00 2004

Hi Jan,

I'm using AVR studio 4. Its assembly language. Do u have experience with TWI ? Regards,
Andrew

Jan Weber <jan.weber@jan....> wrote:
I don't know, what programming language you're using, but maybe you want to
take a look at the WinAVR examples explaining the use of the TWI peripherals
in C.

WinAVR can be obtained at www.avrfreaks.net , maybe there's also a separate
download for the TWI examples.

Jan ----- Original Message -----
From: "Andrew Lim" <normaxcite@norm...>
To: <avrclub@avrc...>
Sent: Friday, August 06, 2004 2:45 PM
Subject: [AVR club] Having Problem with TWI using ATmega8535 >
> Hi there, I am trying to interface my EEPROM (24FC128) using TWI. but I
cant get ACK from the EEPROM. Can anyone help me? I managed to get 0x08 from
EEPROM but fail to get ACK from it after that.
>
> I have wired my A0,A1 and A2 to ground. SCL and SDA to pull-up resistor. >
> Thanks. >
> Regards,
>
> Andrew > --------------------------------- >
> Yahoo! Groups Links Yahoo! Groups SponsorADVERTISEMENT ---------------------------------
Yahoo! Groups Links

To
---------------------------------


______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.


(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )

Re: [AVR club] Having Problem with TWI using ATmega8535 - Jan Weber - Aug 7 2:12:00 2004

Hi Andrew,

I have not used TWI yet, but it seems to be quite hard to use.

Jan
----- Original Message -----
From: "Andrew Lim" <normaxcite@norm...>
To: <avrclub@avrc...>
Sent: Saturday, August 07, 2004 4:46 AM
Subject: Re: [AVR club] Having Problem with TWI using ATmega8535 > Hi Jan,
>
> I'm using AVR studio 4. Its assembly language. Do u have experience with
TWI ? > Regards,
> Andrew
>
> Jan Weber <jan.weber@jan....> wrote:
> I don't know, what programming language you're using, but maybe you want
to
> take a look at the WinAVR examples explaining the use of the TWI
peripherals
> in C.
>
> WinAVR can be obtained at www.avrfreaks.net , maybe there's also a
separate
> download for the TWI examples.
>
> Jan > ----- Original Message -----
> From: "Andrew Lim" <normaxcite@norm...>
> To: <avrclub@avrc...>
> Sent: Friday, August 06, 2004 2:45 PM
> Subject: [AVR club] Having Problem with TWI using ATmega8535 > >
> > Hi there, I am trying to interface my EEPROM (24FC128) using TWI. but I
> cant get ACK from the EEPROM. Can anyone help me? I managed to get 0x08
from
> EEPROM but fail to get ACK from it after that.
> >
> > I have wired my A0,A1 and A2 to ground. SCL and SDA to pull-up resistor.
> >
> >
> >
> > Thanks.
> >
> >
> >
> > Regards,
> >
> > Andrew
> >
> >
> > ---------------------------------
> >
> >
> >
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> > Yahoo! Groups SponsorADVERTISEMENT > ---------------------------------
> Yahoo! Groups Links
>
> To >
> --------------------------------- >
> Yahoo! Groups Links




(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )

RS232 Baud Rate questions - Andrew Lim - Aug 12 11:19:00 2004


Hi Everyone,

I'm currently developing RS232 module for my project. I'm using ATmega8535 for RS232 developement. I'm using internal oscilator of 1MHz.

When I set my baud rate to 19.2kbps, I found that the data that I receive has lots of noice. For example if the uC is receiving 'a' and transmit back 'a', I will some times see 'q' on my screen.

However, I have solve it by tweaking the OSCCAL to 0xFF. At the same time, I have read that if my internal OSC is more than 10% of the nomimal frequency, my EEPROM and Flash write may fail (Atmega8535 datasheet pg.28) . If this is the case, how can I solve my RS232 problem and yet still can write to my Flash and EEPROM?
Thanks a lot.
Regards,

Andrew ---------------------------------




(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )

Re: [AVR club] RS232 Baud Rate questions - Jan Weber - Aug 12 14:07:00 2004

For asynchronous serial communication it is better to use a crystal as clock
source. That's what I would do to solve the accuracy problems. Otherwise, a
slight change in ambient temperature could render your device unuseable.

Jan ----- Original Message -----
From: "Andrew Lim" <normaxcite@norm...>
To: <avrclub@avrc...>
Sent: Thursday, August 12, 2004 5:19 PM
Subject: [AVR club] RS232 Baud Rate questions >
> Hi Everyone,
>
> I'm currently developing RS232 module for my project. I'm using ATmega8535
for RS232 developement. I'm using internal oscilator of 1MHz.
>
> When I set my baud rate to 19.2kbps, I found that the data that I receive
has lots of noice. For example if the uC is receiving 'a' and transmit back
'a', I will some times see 'q' on my screen.
>
> However, I have solve it by tweaking the OSCCAL to 0xFF. At the same
time, I have read that if my internal OSC is more than 10% of the nomimal
frequency, my EEPROM and Flash write may fail (Atmega8535 datasheet pg.28) .
If this is the case, how can I solve my RS232 problem and yet still can
write to my Flash and EEPROM? >
> Thanks a lot. >
> Regards,
>
> Andrew > --------------------------------- >
> Yahoo! Groups Links


______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.


(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )

Re: RS232 Baud Rate questions - Graham Davies - Aug 12 18:04:00 2004

--- In avrclub@avrc..., Andrew Lim <normaxcite@y...> wrote:

> ... RS232 ... ATmega8535 ...
> internal oscilator of 1MHz.
> ... baud rate to 19.2kbps ...

Let's see. For a bit rate of 19200 you need to set the bit rate
generator for 16 * 19200 which is 307,200 Hz. With 1 MHz in, if you
divide by 3 you get 333,333 Hz, which is 8% high. That's too far off
for start/stop serial communication. You should try to be within 2%.
(If your MCU has a double speed UART you might be in better shape,
but still not close enough.)

Your fiddling with OSCCAL is probably slowing the 1 MHz clock down
enough to make it work, but if you check the data sheet you may find
that the internal clock is not stable enough over voltage and
temperature to keep it working always.

So, I'm afraid I agree that you will need to have a crystal or
ceramic resonator clock source.

We would need to know more about your project to help you pick out
the right part. Is power consumption critical? What about size? Or
did you just go with the internal source for convenience? (My
favorite crystal frequency for ATmegas is 7.3728 MHz.)

Graham.




(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )

Re: [AVR club] Re: RS232 Baud Rate questions - Andrew Lim - Aug 14 1:53:00 2004



"Is power consumption critical? What about size? Or
did you just go with the internal source for convenience? (My
favorite crystal frequency for ATmegas is 7.3728 MHz.)"
Hi Graham,

Power consumption is critical for my project. Thats why I'm lowering the clk freq. I have to build my board as small as possible too. The max temp it has to go through will be 65 celcius.

If I switch to external crystal, does it mean that my uC will also use the xternal xtal ? Or I can actually use intercall oscillator for my uC and xternal xtal for RS232 ?

Andrew

Graham Davies <YahooGroups@Yaho...> wrote:--- In avrclub@avrc..., Andrew Lim <normaxcite@y...> wrote:

> ... RS232 ... ATmega8535 ...
> internal oscilator of 1MHz.
> ... baud rate to 19.2kbps ...

Let's see. For a bit rate of 19200 you need to set the bit rate
generator for 16 * 19200 which is 307,200 Hz. With 1 MHz in, if you
divide by 3 you get 333,333 Hz, which is 8% high. That's too far off
for start/stop serial communication. You should try to be within 2%.
(If your MCU has a double speed UART you might be in better shape,
but still not close enough.)

Your fiddling with OSCCAL is probably slowing the 1 MHz clock down
enough to make it work, but if you check the data sheet you may find
that the internal clock is not stable enough over voltage and
temperature to keep it working always.

So, I'm afraid I agree that you will need to have a crystal or
ceramic resonator clock source.

We would need to know more about your project to help you pick out
the right part. Is power consumption critical? What about size? Or
did you just go with the internal source for convenience? (My
favorite crystal frequency for ATmegas is 7.3728 MHz.)

Graham.
Yahoo! Groups SponsorADVERTISEMENT ---------------------------------
Yahoo! Groups Links

To

---------------------------------


______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.


(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )

Re: [AVR club] RS232 Baud Rate questions - David Lloyd-Jones - Aug 15 16:33:00 2004

When I was buliding my first computer -- from a manual called "Tezukuzri
Computa-a O Tsukurimasho-o," back when Doctor Dobbs was in mimeo -- I went
to Akihabara to pick up a 4-meg crystal oscillator. Went through the
tunnels, and found the right guy -- "oscillators over there..." -- and he
said (after I paid him something like 125 yen, "Let me just test it.")

He stuck it in some test instrument, and after some fribblering the numbber
came out on the LCD read-out: 4,000,000. Seven significant digits.

Now either he fixed the machine, or he fixed the osclilator he was about to
sell me, or he performed a bit of pristadigitateurisme.

Whichever. Damn, but thank the world for Akiharbara.

-dlj.

>From: "Jan Weber" <jan.weber@jan....>
>Reply-To: avrclub@avrc...
>To: <avrclub@avrc...>
>Subject: Re: [AVR club] RS232 Baud Rate questions
>Date: Thu, 12 Aug 2004 20:07:55 +0200
>
>For asynchronous serial communication it is better to use a crystal as
>clock
>source. That's what I would do to solve the accuracy problems. Otherwise, a
>slight change in ambient temperature could render your device unuseable.
>
>Jan >----- Original Message -----
>From: "Andrew Lim" <normaxcite@norm...>
>To: <avrclub@avrc...>
>Sent: Thursday, August 12, 2004 5:19 PM
>Subject: [AVR club] RS232 Baud Rate questions > >
> > Hi Everyone,
> >
> > I'm currently developing RS232 module for my project. I'm using
>ATmega8535
>for RS232 developement. I'm using internal oscilator of 1MHz.
> >
> > When I set my baud rate to 19.2kbps, I found that the data that I
>receive
>has lots of noice. For example if the uC is receiving 'a' and transmit back
>'a', I will some times see 'q' on my screen.
> >
> > However, I have solve it by tweaking the OSCCAL to 0xFF. At the same
>time, I have read that if my internal OSC is more than 10% of the nomimal
>frequency, my EEPROM and Flash write may fail (Atmega8535 datasheet pg.28)
>.
>If this is the case, how can I solve my RS232 problem and yet still can
>write to my Flash and EEPROM?
> >
> >
> >
> > Thanks a lot.
> >
> >
> >
> > Regards,
> >
> > Andrew
> >
> >
> > ---------------------------------
> >
> >
> >
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> _________________________________________________________________
Scan and help eliminate destructive viruses from your inbound and outbound
e-mail and attachments.
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines
Start enjoying all the benefits of MSNŽ Premium right now and get the
first two months FREE*.




(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )

[AVR club] Re: RS232 Baud Rate questions - Graham Davies - Aug 16 9:40:00 2004

--- In avrclub@avrc..., Andrew Lim <normaxcite@y...> wrote:

> Power consumption is critical ...
> ... as small as possible too.
> If I switch to external crystal,
> does it mean that my uC will
> also use the xternal xtal?

Andrew,

At this point, someone who is familiar with your MCU, the ATmega8535,
needs to step in and help. I agree that low-power and small suggest
using the internal oscillator running slowly. But this makes it hard
to get a fast accurate clock for the UART. Take a look at what Atmel
do with the Butterfly. It has a 32.768 kHz watch crystal, which is
pretty small. The MCU runs from its internal RC oscillator, which is
calibrated at run-time using the watch crystal frequency as a
reference. This technique might be just what you need. If your UART
supports double speed (1/8 of the bit rate generator frequency
instead of 1/16), so much the better.

Graham.


______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.


(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )

[AVR club] Re: RS232 Baud Rate questions - David Jones - Aug 16 19:24:00 2004



>>> YahooGroups@Yaho... 16/08/2004 11:40:18 pm >>>
--- In avrclub@avrc..., Andrew Lim <normaxcite@y...> wrote:

> Power consumption is critical ...
> ... as small as possible too.
> If I switch to external crystal,
> does it mean that my uC will
> also use the xternal xtal?

Andrew,

At this point, someone who is familiar with your MCU, the ATmega8535,
needs to step in and help. I agree that low-power and small suggest
using the internal oscillator running slowly. But this makes it hard
to get a fast accurate clock for the UART. Take a look at what Atmel
do with the Butterfly. It has a 32.768 kHz watch crystal, which is
pretty small. The MCU runs from its internal RC oscillator, which is
calibrated at run-time using the watch crystal frequency as a
reference. This technique might be just what you need. If your UART
supports double speed (1/8 of the bit rate generator frequency
instead of 1/16), so much the better.
Graham. If power consumption is critical then there are several methods you can
use:
1) Use a 32.768KHz crystal if you don't need high speed processing.
2) Use the various SLEEP and Power Down modes available
3) Use a combination of 1 and 2.

If you need an accurate UART then you must use a crystal or ceramic
resonator at the least, it's that simple, RC is too unstable. The
internal RC oscillators are FAST, so they chew power compared with a
slow 32.768Khz crystal.

Low power desing is all about getting the best compromise. You have to
look at your design and see what type of processing you will be doing.
If you need continuous high speed processing then you basically can't do
much to save power except go to a lower supply voltage and turn off
peripherals that aren't being used.

If you only need processing to be done on a periodic or slow interrupt
basis (like when a user pushes a button) you can use the SLEEP modes and
get very low power easily.

If you need continuous processing but not very fast then you can go for
a slow 32.768KHz crystal. You'll still be able to use the UART at say
300baud.

Generally speaking, the two major factors that influence power
consumption are clock frequency and supply voltage. Many people make the
mistake of using a fast crystal when they don't need to, and then try to
implement all sorts of convoluted power down modes when a simple slow
crystal is all that was needed.

Dave :)





(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )

Re: [AVR club] Re: RS232 Baud Rate questions - Andrew Lim - Aug 18 6:54:00 2004


"If you need continuous processing but not very fast then you can go for
a slow 32.768KHz crystal. You'll still be able to use the UART at say
300baud."
Dave,

If I stick with my internal RC for clocking and RS232 using 32.768kHz xtal, can I still get 19.2kbps? cos I need to achieve this speed for my project. My microP is only turned on in a period of time say 15mins once.
One more question, I'm thinking of using chip cap(0805) for my RS232 interface chip instead of electrolytic cap. Would there be any issue with my RS232?
Thanks.
Regards,

Andrew
---------------------------------




(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )

Re: [AVR club] Re: RS232 Baud Rate questions - Zack Widup - Aug 18 8:53:00 2004

It seems the really low-power route and higher baud rates with stability
are mutually exclusive. You're going to have to use a crystal of at least
1 MHz to get that baud rate.

Also, chip caps should be fine. I've made projects using the MAX232 chip
and 0.1 to 1.0 uF chip caps. Or you can get a MAX202 and do away with the
capacitors completely.

Zack On Wed, 18 Aug 2004, Andrew Lim wrote: > "If you need continuous processing but not very fast then you can go for
> a slow 32.768KHz crystal. You'll still be able to use the UART at say
> 300baud." >
> Dave,
>
> If I stick with my internal RC for clocking and RS232 using 32.768kHz xtal, can I still get 19.2kbps? cos I need to achieve this speed for my project. My microP is only turned on in a period of time say 15mins once. >
> One more question, I'm thinking of using chip cap(0805) for my RS232 interface chip instead of electrolytic cap. Would there be any issue with my RS232? >
> Thanks. >
> Regards,
>
> Andrew


______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.


(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )

[AVR club] Re: RS232 Baud Rate questions - Graham Davies - Aug 18 9:01:00 2004

--- In avrclub@avrc..., Andrew Lim <normaxcite@y...> wrote:

> If I stick with my internal RC
> for clocking and RS232 using
> 32.768kHz xtal, can I still get
> 19.2kbps?

Not directly. I told you how this is possible in an earlier post. The
AVR Butterfly does it.

> ... using chip cap(0805) for my
> RS232 interface chip ...

This will be fine if you use the recommended capacitance. Choose a
chip that needs 0.1 uF caps, not 1 uF.

Graham.




(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )