Problem w serial comms ATmega128 <-> PC
CASTalk.com Forum Index CASTalk.com
Discussion of DSP, FPGA, storage and embedded system.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web castalk.com
Problem w serial comms ATmega128 <-> PC

 
Post new topic   Reply to topic    CASTalk.com Forum Index -> Embedded System
Author Message
A. Drosos
Guest





Posted: Sun Dec 04, 2005 4:52 pm    Post subject: Problem w serial comms ATmega128 <-> PC Reply with quote

Problem with serial communications between ATmega128 and PC

I have used WinAVR and Peter Fleury's interrupt controlled uart library
successfully in the past with the STK500 board and the AT90S8515 and
ATmega16 devices. Moving on to a bigger project I purchased the STK501 board
with an ATmega128. Connecting it to the STK500 I can program the device with
the default xmas_tree_leds_flashing program so I assume it is working OK.
However, trying out a simple test_uart program I get nothing out of the
serial port. I have fiddled with fuses, clocks, pins etc. and still nothing.
There is probably something here that I have not understood, some setting or
connection that I should do and am not doing.

My setup:

- STK500+STK501 with the ATmega128 device
- default settings on all jumpers both boards
- RS232 spare pins to PD0 and PD1 on STK500
(assume this still works with STK501/ATmega128 combo)
- listen to PC com port with Bray's terminal application at 9600 baud
- internal clock for device (no external osc) have tried all settings
available on AVRStudio (latest version 4.12 - build 460) from 1 to 8 MHz.

My suspicion is that the 501 board uses another port for serial comms other
than portD or requires some other jumper? / connection? than the default
one.

Someone must have the same parts as I do and hopefully has this working.
Please give me some pointers on what I should look into.

Thank you
Back to top
Alejandro Weinstein
Guest





Posted: Mon Dec 05, 2005 12:15 am    Post subject: Re: Problem w serial comms ATmega128 <-> PC Reply with quote

Rich Webb wrote:
Quote:
On Sun, 4 Dec 2005 16:52:01 +0000 (UTC), drososa@otenet.gr (A. Drosos)
wrote:


Problem with serial communications between ATmega128 and PC

Check the ATmega103 compatibility fuse. It is set by default.

Regards,
Alejandro.
Back to top
Rich Webb
Guest





Posted: Mon Dec 05, 2005 12:33 am    Post subject: Re: Problem w serial comms ATmega128 <-> PC Reply with quote

On Sun, 4 Dec 2005 16:52:01 +0000 (UTC), drososa@otenet.gr (A. Drosos)
wrote:

Quote:

Problem with serial communications between ATmega128 and PC

I have used WinAVR and Peter Fleury's interrupt controlled uart library
successfully in the past with the STK500 board and the AT90S8515 and
ATmega16 devices. Moving on to a bigger project I purchased the STK501 board
with an ATmega128. Connecting it to the STK500 I can program the device with
the default xmas_tree_leds_flashing program so I assume it is working OK.
However, trying out a simple test_uart program I get nothing out of the
serial port. I have fiddled with fuses, clocks, pins etc. and still nothing.
There is probably something here that I have not understood, some setting or
connection that I should do and am not doing.

My setup:

- STK500+STK501 with the ATmega128 device
- default settings on all jumpers both boards
- RS232 spare pins to PD0 and PD1 on STK500
(assume this still works with STK501/ATmega128 combo)
- listen to PC com port with Bray's terminal application at 9600 baud
- internal clock for device (no external osc) have tried all settings
available on AVRStudio (latest version 4.12 - build 460) from 1 to 8 MHz.

My suspicion is that the 501 board uses another port for serial comms other
than portD or requires some other jumper? / connection? than the default
one.

The internal RC oscillator, especially if you don't apply the
calibration byte, isn't likely to be sufficiently close to the nominal
frequency to support reliable serial coms. Have you checked the TX pin?
Is there anything happening there at all?

--
Rich Webb Norfolk, VA
Back to top
Rene Tschaggelar
Guest





Posted: Mon Dec 05, 2005 9:15 am    Post subject: Re: Problem w serial comms ATmega128 <-> PC Reply with quote

A. Drosos wrote:

Quote:
Problem with serial communications between ATmega128 and PC

[snip]

Someone must have the same parts as I do and hopefully has this working.
Please give me some pointers on what I should look into.

The Mega128 requires a tristatebuffer at the normal serial 1 since the
SPI programming pin is shared with the serial 1. There is also a
serial 2.

Rene
--
Ing.Buero R.Tschaggelar - http://www.ibrtses.com
& commercial newsgroups - http://www.talkto.net
Back to top
Jacek Meyerhold
Guest





Posted: Fri Dec 09, 2005 1:15 am    Post subject: Re: Problem w serial comms ATmega128 <-> PC Reply with quote

Uzytkownik "Rich Webb" <bbew.ar@mapson.nozirev.ten> napisal w wiadomosci
news:c1d6p1tmlklpivjg2uoiptdo8kp4apnuon@4ax.com...
Quote:
On Sun, 4 Dec 2005 16:52:01 +0000 (UTC), drososa@otenet.gr (A. Drosos)
wrote:


Problem with serial communications between ATmega128 and PC

The internal RC oscillator, especially if you don't apply the
calibration byte, isn't likely to be sufficiently close to the nominal
frequency to support reliable serial coms. Have you checked the TX pin?
Is there anything happening there at all?
I have used UART on internal oscillator for test purposes many times and I

never had troubles with internal oscillator frequency different from
nominal.

Best regards,
Jacek
Back to top
Anton Erasmus
Guest





Posted: Sat Dec 10, 2005 9:15 am    Post subject: Re: Problem w serial comms ATmega128 <-> PC Reply with quote

On Fri, 9 Dec 2005 00:37:23 +0100, "Jacek Meyerhold"
<jacekmey@poczta.onet.pl> wrote:

Quote:
Uzytkownik "Rich Webb" <bbew.ar@mapson.nozirev.ten> napisal w wiadomosci
news:c1d6p1tmlklpivjg2uoiptdo8kp4apnuon@4ax.com...
On Sun, 4 Dec 2005 16:52:01 +0000 (UTC), drososa@otenet.gr (A. Drosos)
wrote:


Problem with serial communications between ATmega128 and PC

The internal RC oscillator, especially if you don't apply the
calibration byte, isn't likely to be sufficiently close to the nominal
frequency to support reliable serial coms. Have you checked the TX pin?
Is there anything happening there at all?
I have used UART on internal oscillator for test purposes many times and I
never had troubles with internal oscillator frequency different from
nominal.


Then you have never tested your devices over any sort of temperature
range. The inter oscillator changes quite a lot with temperature. For
any sort of device which should work years without problems you need
to test that it works over at least the temperature range -10 C to 70
C for reasonably hot regions. For desert countries, one probably need
to go to at least 85 C, and for cold countries probably down to -40 C.

Regards
Anton Erasmus
Back to top
 
Post new topic   Reply to topic    CASTalk.com Forum Index -> Embedded System All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




VoIP Electronics Powered by phpBB