Connect with us

HT-12E with AVR problem. I really need help.

Discussion in 'Hobby Electronics' started by sommes, Apr 27, 2006.

Scroll to continue with content
  1. sommes

    sommes Guest

    I need to send 0-999 from one microcontroller to other microcontroller by
    HT-12E and HT-12D.

    There are 8 address bits + 4 data bits in HT-12E. I would to like to ask,
    How can I send 0-999 with these 4 data bits and received by other

    In the testing, I could send 1 digit successfully. For example, 9, which is
    1001, then put 1001 to data bits 0-3 of HT-12E. It is becuase there is an
    address to tell when to start and stop.

    1) How can I use data bit 0 of HT-12E to send first digit, bit 1 to send
    second digit and bit 2 to send third digit?

    2) How can I send data which is more than 4 bit with HT-12E?

    For example, I want to send 8 bit data which is 1001 0111, the HT-12E will
    encode like 8 address bits + 1001 then 8 address bits + 0111, so how can I
    put 1001 0111 back together?

    P.S. I am using Atmel AT90S8535 with Bascom-AVR complier

    Thank you for help...
  2. Ken Taylor

    Ken Taylor Guest

    Why are you so hung up on using the HT-12D/E pair? Is it just that they
    are the first things you came across or are you *really* stuck with
    using them/ It seems to me they are making your life unnecessarily
    complicated. There are better modules around for your task, as has been
    pointed out before.

  3. sommes

    sommes Guest

    Thank you ken.

    Could you please sugguest me some "better modules" for transmitting three
    message at the same time.

    It is because HT-12E is 1 to 1 encoder and seem it is design to send more
    than one message at the same time.

    I really get stuck on HT-12E, but it is what my partner wants.

    Thank you for your time.
  4. You need to define yourself a simple protocol. For example,
    <start snetinal><message length><message><crc><end sentinal>

    Send the message 4 bits at a time, then use a software shit register
    to reassemble the message. If the crc is wrong, discard the message.
    If the message needs to be sent reliably, then you need some kind of
    acknowledgement mechanism in your protocol, so a failed message can be
  5. sommes

    sommes Guest

    Thank Jasen.

    Could you please explain some more detail about that method.

    For example, 10 bits is "abcd efgh ij"

    I send the first 4 bits as

    "1abc" with 1 to tell reciever it is the start four bit




    "0hij " with 0 to tell reciever it is last four bit

    repeat it to get other 10 bits

    Am I on the right track?
  6. Comms 101. Always use error checking. An 8 bit crc adds virtually no
    overhead, but provides increased reliability.
  7. sommes

    sommes Guest

    Thank Jasen

    "personally I'd be looking for a way to connect the AVR's serial port
    to the transmitter and leave the encder out entirely."

    Do you mean do the software encoding by AVR chip and output that encoded
    data by serial port and connect to transmitter directly?
  8. sommes

    sommes Guest

    Thanks Andy.

    What is meaning of "Comms 101"?

  9. It means this is the very basics, ie, the first subject you learn at

    It usually means you need to go read a book.
  10. One day i will use a spell checker!

    When i try to compile code i often have to spend several hours
    removing typos. MS make it easy these days with there 'intellisense',
    i just need to find a decent newsreader that has the built in
  11. Agent has a spell checker too, it just means I have to click the 'ABC'
    button up the top. Word is smarter, it does the spell check for me and
    underlines it in red. Perhaps i should give the new outlook 2003
    newsreader a go, that is if 2003 has a newsreader built in.
  12. Daniel

    Daniel Guest

    and find a decent grammar checker as well. "there 'intellisense',"
    should be "their 'intellisense'," or, maybe, that package will do both!
    No, "there" is the correct spelling of a word, so probably will not
    raise an error flag. Oh, well!


    *** ***
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day