use usart for large data size

Discussion in 'Embedded Systems and Microcontrollers' started by mohammad2050, Nov 20, 2014.

  1. mohammad2050

    Thread Starter Member

    Nov 14, 2014
    56
    1
    hi

    i have a device that have communication port (tx,rx,gnd) for connect to pc . i use hyper terminal for send command to device. device wake up when received tab buttons three times and information page appears and show more information with other keyboard keys . i want to use avr microcontroller for connect to device but want know that do can use usart for this purpose ? do can getting full data returned from device because returned data have large size ?
     
  2. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,564
    2,379
    On a PIC you would receive data up to the capacity of the particular PIC, if more memory is required a memory IC can be added and if necessary could be an Ic2 read/write type.
    The usart device will depend on the protocol presently being used, RS232, RS485 etc.
    Max.
     
    Last edited: Nov 20, 2014
  3. JWHassler

    Member

    Sep 25, 2013
    201
    33
    Often, the returned data will have a specific character, like ">" or "?", that signals that control has been handed over to you.
    Or, your microcontroller program can know ahead of time how much of the returned data to ignore.

    If you can talk to this device with HyperTerminal, you can do the same with an AVR's USART. The hardware interface (i.e., level-shifting) must be worked out, too.
     
  4. mohammad2050

    Thread Starter Member

    Nov 14, 2014
    56
    1
    JWHassler
    why i must use level-shifting ?
    You mean of level-shifting is for example SN74HCT244 ?
     
  5. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,564
    2,379
    A USART transmission can take a few protocol formats, and specialized IC's are available for each protocol, such as EIA, RS232, RS422, or RS485.
    e.g. the RS232 common IC is the MAX232
    Max.
     
  6. mohammad2050

    Thread Starter Member

    Nov 14, 2014
    56
    1
    device connection port is ttl , so not necessary to level-shifting .
     
  7. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,564
    2,379
    You said you use Hyperterminal, suggesting a PC at one end, generally this uses either a DP9 RS232 port or a USB port, but the USB generally has to be configured on the PC as a regular serial port for protocol tranlation?
    Max.
     
  8. mohammad2050

    Thread Starter Member

    Nov 14, 2014
    56
    1
    i used of converter for connect pc to device . this converter Is provided by the manufacturer . but i used ttl to rs232 converter and was able to Contact to device .
     
  9. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,564
    2,379
    I see now you have started a new thread for the the same issue?
    Best to contain it to one problem at a time or a combined issues??
    Max.
     
Loading...