Problem w serial comms ATmega128 <-> PC

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

Reply to
A. Drosos
Loading thread data ...

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

Regards, Alejandro.

Reply to
Alejandro Weinstein

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
Reply to
Rich Webb

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
Reply to
Rene Tschaggelar

Uzytkownik "Rich Webb" napisal w wiadomosci news: snipped-for-privacy@4ax.com...

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

Reply to
Jacek Meyerhold

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

Reply to
Anton Erasmus

MHz.

Hi,

I think the problem is, that you use the wrong connection between the UAR outputs and the STK500. Are you using the UART 0 ? If so you must connec PE0 with SpareRx and PE1 with SpareTX - not PD0,1.

Good luck Michael

Reply to
mhupp

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.