EngineersGarage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise
You are here: Home / Topics / UART1 of atmega problem

UART1 of atmega problem

|

Microcontroller › AVR › UART1 of atmega problem

  • This topic has 1 reply, 2 voices, and was last updated 11 years, 2 months ago by Ashutosh Bhatt.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • February 8, 2015 at 6:16 pm #3444
    Darpan
    Participant

    Hello,

    I am using atmega128 for my application where I transmit data using UART. It has 2 UARTs-UART0 and UART1. 

    Transmission of data perfectly works for UART0.Here is the code for UART0 transmission:

    #include<avrio.h>
     
    int main()
    {
    UCSR0A=0x20;
    UCSR0B=0x08;
    UCSR0C=0x06;
    UBRR0H=0x00;
    UBRR0L=0x5F;
     
    while(1)
    {
    UDR0='D';
    while(TXC0==0)
    {
    }
    UCSR0A=0x00;
    }
    }
    When I use the same sequence for UART1 , it is not working.
    Could anyone help
    February 10, 2015 at 4:28 am #12576
    Ashutosh Bhatt
    Participant

    actually it should work. 

    why do u want both UARTs in your application

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Log In

RSS Recent Posts

  • timing delay code statements using Swordfish April 20, 2026
  • S1MJ ? April 20, 2026
  • Bot checks April 19, 2026
  • Getting into an LED bulb April 19, 2026
  • Understanding reversing polarity at astable multivibrator April 19, 2026

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2026 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise