RF Transmitter Receiver 433Mhz

Discussion in 'Embedded Systems and Microcontrollers' started by naveen89, Feb 27, 2010.

  1. naveen89

    Thread Starter New Member

    Feb 27, 2010
    10
    0
    Sir,

    I have atmega128 and I m using 433Mhz Tx Rx Module. I have made my connections according to the following circuit connections

    For Transmitter [​IMG]

    For Reciever [​IMG]

    The diagram has atmega8 but I made it on Atmega128.

    But now I want to know how to test my connections with sample code. Can anyone provide me with the sample code for atmega128.

    Regards.
     
  2. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    Do you have any programming experience? Are you planning to use C-language or Assembler?

    What software development tools are you using?

    hgmjr
     
    Last edited: Feb 27, 2010
  3. naveen89

    Thread Starter New Member

    Feb 27, 2010
    10
    0
    Sir,

    Yes I do programming in C Language. AVR-GCC Compiler. I had done UART Transmission earlier also, but between microcontroller and Computer. Now I suppose I have to use UART for Wireless Transmission. But how should I begin about it?
    What parameters, baud rate, ubrr and all should I set. Just want a basic test program.

    Regards.
     
  4. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    If you have the beginning of the code, how about posting it here and let's see what it needs to make it work.

    hgmjr
     
  5. naveen89

    Thread Starter New Member

    Feb 27, 2010
    10
    0
    I m adding my program files for Tx and Rx...


    Working (as I thought)...

    I decided to form 4 byte data packages in order to send one byte information. These include:

    one dummy synchronization byte (10101010);

    one address byte – in case there are more receivers(or transmitters);

    one data byte;

    and checksum which is actually a sum of address and data(address+data).

    First byte tunes receiver to accept normal signal after then address byte, data and checksum can be read more reliably.

    In my case I used UART 1200 baud rate.

    Transmitter sends two commands (LEDON and LEDOFF) to receiver with 100ms gaps. Receiver recognizes these commands and switches LED on or off depending on received command. This way I can monitor if data transfer works correctly. If LED blink is periodical – then transmission goes without errors. If there is an error in received data then LED should give shorter blink.

    But this program isn't working for me...

    Regards.
     
    • Tx.zip
      File size:
      6.8 KB
      Views:
      239
    • Rx.zip
      File size:
      6.9 KB
      Views:
      181
  6. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    Since you schematic is drawn using an ATMEGA8 symbol and your post mentions the ATMEGA128 as your target device, your request is a bit confusing. The ATMEGA128 has two USART ports while an ATMEGA8 has only one.

    Can you confirm that your attached code is written to run on the ATMEGA128?

    hgmjr
     
  7. naveen89

    Thread Starter New Member

    Feb 27, 2010
    10
    0
    Sir,

    Yes... I'm using Atmega128 only...on both Transmitter and Reciever side... and all the connections are made on atmega128 only... For atmega128 I m using TX1 RX1 Pins... I have written code for UART1...

    Regards
     
    Last edited: Mar 1, 2010
  8. naveen89

    Thread Starter New Member

    Feb 27, 2010
    10
    0
    No reply... What happened?
     
  9. blueroomelectronics

    AAC Fanatic!

    Jul 22, 2007
    1,758
    98
    Actually the UART is a poor choice for wireless, better to use something like Manchester encoding.
     
Loading...