How to send the USART data through USB to PC.

Discussion in 'Embedded Systems and Microcontrollers' started by veerubiji, Dec 1, 2012.

  1. veerubiji

    Thread Starter New Member

    Oct 9, 2012
    13
    0
    Hi All,
    I am new to programming AVR micro controllers. I have one board which was designed to get some sensor values, which contains ATmega32-A micro controller, AD9833 programmable waveform generator, external ADC and some other peripherals. I have designed the firmware for that board. I have used USART communication (RS232) to display data in hyper terminal. I am sending one command to display the data in hyper terminal. I am using CodeVision AVR compiler.
    Now the problem is I have to connect this board to the other board, which having RS232 point. The second board is communicating to the PC using USB communication, which contains AT90USB1287 micro controller and some other peripherals.
    I have to send the data what is getting using my board to the PC by connecting this RS232 cable to the second board, which sending data to the PC using USB communication. Please help me how can I transfer the data what I am getting by using USART communication in my board to the PC using second board which is communicating through USB.

    thanks in advance.
     
  2. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,670
    804
    Can´t you just use an usb to rs232 cable instead of the second board?
    In the AVR you only need to set the baudrate for the usart to work and put your data in the usart data register, very simple. I think that you even have a C example in the atmega datasheet.
     
  3. veerubiji

    Thread Starter New Member

    Oct 9, 2012
    13
    0
    the boards are already designed and both are working. I have connected my board which contains ATmega32-A controller to the main board (AT90USB1287) via RS232 cable, but I am not sure what changes i have to do in the firmware of at90usb1287 to get the from second board and send to PC via usb.
     
Loading...