[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Help Needed (UART / USART)
From: |
kitts |
Subject: |
Re: [avr-gcc-list] Help Needed (UART / USART) |
Date: |
Mon, 19 Mar 2007 09:52:49 +0530 |
User-agent: |
KMail/1.9.6 |
On Monday 19 Mar 2007 IST, mickhail mcanuff wrote:
> bit 3 in UCR is TX enable. I moved the initialization to the main()
> function as you recommended. I also relaced the line of code: "if
> (bit_is_set(USR,UDRE));" with "while(USR & (1<<UDRE) ==0);". The
> Transmission part seems to be working fine. I place my oscilloscope on
> the TX pin of the AT90S2313 MCU and i see a waveform that is not uniform
> (i.e. i guess its the actual data).
> After that i connected the TX pin of the MCU to an infra red LED
> (QED123). I have the infra red receiver (QSD123) on the other side
> connected between 5Volts and a 10kOhm resistor(see attached file for
> outline). The output of this circuit is input to the ATmega8515 MCU (i.e.
> attached to RX pin). The code below is what i have for the receiver
> "ATmega8515"; it however does seem to work. I sent a character '8' and
> have set up receiving code to accept and interpret it. Could you please
> evaluate the RX code, am I missing something? Thanks much in advance.
Your receive code seems fine but before you debug that i recommend that
confirm with your oscilloscope that the RXD pin is actually receiving the
data and in the right pattern.
--
Cheers!
kitts