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

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View


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
microcontroller?

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...




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


Quoted text here. Click to load it
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.

Ken

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


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.



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



Quoted text here. Click to load it

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
resent.

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



Quoted text here. Click to load it



i answered this a few weeks ago.  you have 10 bits to send

 abcdefghjk
 
 send 1abc
 then defg
 then 0hjk
 
 then re-read your 10 bits and repeat....
 
when receiving

 you'll get anonymous 4 bit symbols
 
 wait till you get one starting with 0
 then wait for one starting with 1
 
 that's guaranteed to be an example of the first symbol.
 and contains bits abc
 
 the next contains cdef
 
 and finally 0hjk
 
Bye.
   Jasen

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


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

then

"defg"

then

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

repeat it to get other 10 bits

Am I on the right track?



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


Quoted text here. Click to load it

yes, that was the plan...  others mentioned error checking, and if errors in
the data will be a critical problem it's prtobably worth looking at going
that way it they'll only be an inconvenience my way man be easier,

it's the change from 0 to 1 that indicates the first symbol
(1 and three bits)  
the middle symbol could have either 1 or 0 in that place but never
immmediately after 0xxx symbol so can't be confusd ....)

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

--

Bye.
   Jasen

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


Thank Jasen

"personally I'd be looking for a way to connect the AVR's serial port
directly
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?



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


Quoted text here. Click to load it


I mean just writing the bytes to the serial port asif the sending chip's
transmit pin was attached to the receiving chips receive pin.

You could put a preamble in there (say two bytes for address data to help
with rejecting other transmssions on the same frequency (eg door openers etc))

Then at the receiver watch for the two bytes and store the data the data

Andy reccomends checksumming it, which is probably not a bad idea. for
data this short it's as easy to invert the bits and tack it onto the end

when you receive exclusive-or the good and inverted data together and if you
don't get all bits set there's been an error.... so ignore that packet
and wait for the next.

Bye.
   Jasen

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



Quoted text here. Click to load it

Comms 101. Always use error checking. An 8 bit crc adds virtually no
overhead, but provides increased reliability.

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


Thanks Andy.

What is meaning of "Comms 101"?

cheers



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



Quoted text here. Click to load it

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

It usually means you need to go read a book.
 
Quoted text here. Click to load it


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


Quoted text here. Click to load it


   I normally ignore typos, but "Shcool" is just too funny in the
context of your message. ;-)


--
Service to my country? Been there, Done that, and I've got my DD214 to
prove it.
We've slightly trimmed the long signature. Click to see the full one.
Re: HT-12E with AVR problem. I really need help.


On Sun, 30 Apr 2006 16:36:31 GMT, "Michael A. Terrell"

Quoted text here. Click to load it

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
autosmarts.


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


Quoted text here. Click to load it


   I still use Netscape 4.78 to read newsgroups.  it has a decent spell
checker, and if it doesn't recognize a word you can copy and paste it
into Google.  If you get a "Do you mean" with an alternate spelling and
its right you can copy that back to your message.  Run the spell checker
again and click on "Learn" so it will remember it for the next time.


--
Service to my country? Been there, Done that, and I've got my DD214 to
prove it.
We've slightly trimmed the long signature. Click to see the full one.
Re: HT-12E with AVR problem. I really need help.


On Mon, 01 May 2006 12:14:47 GMT, "Michael A. Terrell"

Quoted text here. Click to load it

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.

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


Quoted text here. Click to load it

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!

Daniel

***

Site Timeline