logo elektroda
logo elektroda
X
logo elektroda
REKLAMA
REKLAMA
Adblock/uBlockOrigin/AdGuard mogą powodować znikanie niektórych postów z powodu nowej reguły.

[AtMega8][BASCOM AVR] Wysyłanie ASCII

dj_volt 15 Wrz 2008 00:56 2459 2
REKLAMA
  • #1 5536425
    dj_volt
    Poziom 26  
    Witam!

    Podpowiedzcie proszę, chcę zbudować prosty sterownik do urządzenia. Komunikacja po RS232C, parametry: 8 bitów danych, 2 bity stopu, kontrola XON/XOFF, prędkość 9600bps.

    W jaki sposób zmusić AVR'a do wysłania po tak skonfigurowanym UART kodów ASCII (65,66,67,68,153) co odpowiadać ma istniejącym w urządzeniu klawiszom UP,DOWN,LEFT,RIGHT,MENU. Ma to być coś na styl zdalnej klawiatury.

    Z tego co i wiadomo ATTiny2313 może konfigurować UART tylko na xxxbps 8,N,1 - czy ATMega8 poradzi sobie z 8,XON/XOFF,2?

    Pozdrawiam!
  • REKLAMA
  • #3 5538852
    dawid512
    Poziom 32  
    Cytat z noty katalogowej:
    Cytat:
    USART The Universal Synchronous and Asynchronous serial Receiver and Transmitter (USART) is a
    highly-flexible serial communication device. The main features are:
    • Full Duplex Operation (Independent Serial Receive and Transmit Registers)
    • Asynchronous or Synchronous Operation
    • Master or Slave Clocked Synchronous Operation
    • High Resolution Baud Rate Generator
    • Supports Serial Frames with 5, 6, 7, 8, or 9 Databits and 1 or 2 Stop Bits
    • Odd or Even Parity Generation and Parity Check Supported by Hardware
    • Data OverRun Detection
    • Framing Error Detection
    • Noise Filtering Includes False Start Bit Detection and Digital Low Pass Filter
    • Three Separate Interrupts on TX Complete, TX Data Register Empty and RX Complete
    • Multi-processor Communication Mode
    • Double Speed Asynchronous Communication Mode


    Google nie gryzą...
REKLAMA