Newbie UART question. Thanks

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View


I would like to connect two AVR 8535 uC with UART serial link by TxD and
RxD. I am using BASCOM-AVR.

I can use "print" command to show the desired value on terminal emulator
(default rs232 port to pc). However, I can not receive this value when I
transmit it by TxD (Port group D, pin1) and connected with a wire to other
uC RxD (Port group D, pin0). I've try to use command such as "input',
"waitkey", "inkey", "inputbin" to input, but still can't receive the value
from master uC.

I set bith crystal at 8MHz and Baud at 9600.

Could you guy please let me know What I did wrong.






Sorry guys. I solve in by printbin and inputbin



Quoted text here. Click to load it



Re: Newbie UART question. Thanks


sommes scrobe on the papyrus:

Quoted text here. Click to load it

Two things you did wrong. Firstly you used an 8MHz crystal. With a
7.3728MHz crystal you can achieve 115200Baud with no errors. Secondly
you used BASCOM-AVR, but maybe you don't have a choice. >-:}

--
John B

Re: Newbie UART question. Thanks


how come BASCOM-AVR would be an disadvantage?



Re: Newbie UART question. Thanks



Quoted text here. Click to load it

Maybe it gets between you and the hardware. Compilers sometimes do
such things, and especially Basic compilers. But I've not used this
particular one. Serial reception is one of those things that's tied up
with OS-like issues. Often it has to be interrupt-driven to be
practical in all but the most mindless of applications. So you end up
with buffers and read pointers and write pointers and that sort of
stuff.


Best regards,
Spehro Pefhany
--
"it's the network..."                          "The Journey is the reward"
snipped-for-privacy@interlog.com             Info for manufacturers: http://www.trexon.com
We've slightly trimmed the long signature. Click to see the full one.
Re: Newbie UART question. Thanks


sommes scrobe on the papyrus:

Quoted text here. Click to load it

There is no standard for BASIC compilers. If you choose a C compiler
you will have an ANSI reference standard to work to and all compliant
compilers should compile the same source code. Although the resultant
machine code may be different the action should be the same.

Alternatively work in assembler and then you know what is happening.

--
John B

Re: Newbie UART question. Thanks



Quoted text here. Click to load it

You might also try asking this over on alt.microcontrollers.8bit and
comp.arch.embedded.

I work with the AVR chips and their UARTs quite frequently but use asm
or C to write my own ISRs; afraid I don't have a clue about the
particular quirks of BASCOM.

--
Rich Webb   Norfolk, VA

Site Timeline