Do you have a question? Post it now! No Registration Necessary
May 10, 2006, 11:46 am

I require to send 10bit data from ADC (Atmel AVR 8535) to other Atmel AVR
8535 via radio transmission.
I decided to use S.N.A.P (Scaleable Node Address Protocol) from HTH
(http://www.hth.com/snap ) for the protocol.
I read the example which is turning LED on and off.
(http://www.hth.com/filelibrary/snap/usrcode/SNAP-IO.ZIP )
However I just found this is only for receiver part as the program is only
wait for the incoming packege byte.
I would like to ask, What I need to set in the transmitter to send out
proper packege?
Could you guy please give me some simple idea about serial protocol?
Thank you very much
Please let me know if more infomation are desired.

Re: Protocol for Radio Transmission

Since you are using AVRs, there are examples and code on
http://www.mcselec.com for SNAP protocol. Look in the app notes section.
I also use SNAP extensively, although on wired RS485 links, but the
principles are the same.
--
Regards,
Adrian Jansen adrianjansen at internode dot on dot net
Regards,
Adrian Jansen adrianjansen at internode dot on dot net
We've slightly trimmed the long signature. Click to see the full one.

Re: Protocol for Radio Transmission
Thanks Adrian,
Could you please explain some more what I require to send from the
transmitter?
It is becuase I only found the example from receiver side.
What I think on the Receiver side is -
Wait for the serial signal to come in, check the sync byte, header byte and
CRC, if all correct then read the data byte and send ACK, send NAK if
incorrect.
However, What I need to send from the transmitter as I am doing a wireless
transmission? Do I have to do in two way transmission?(send feedback
ACK/NAK).
Sorry for my bad knowledge on protocol.
Cheers

Re: Protocol for Radio Transmission

Answering both posts:
On the transmit end you generate all the correct sync, header, address
bytes and data packet, plus of course the CRC. Then send it as a SNAP
packet. Did you look at AN101 as I suggested ?
http://www.mcselec.com/index.php?option=com_content&task=view&id65%&Itemid57 %
This has a code example for AVR with both transmit and receive.
Radio transmission has some special requirements, depending on exactly
what your Tx/Rx pair already does. If it does the encoding to fix DC
offsets - eg Manchester encoding - then you just give it byte strings,
and get them back. Else you need to do more stuff.
But as long as you use relatively short packets, less than 40 bytes is
recommended, and at least 16 bit CRC, then it should work ok. Yes you
need to do something useful at the Tx end if the Rx signals a bad
packet. Depends on what you are sending - eg if you regularly send
updated data, then a bad packet is just ignored, and the next one is
used. But if you only send one packet containing vital data, then you
must have a way to repeat it if its rejected.
I see you already post on MCS electronics forum, so maybe that is a
better place to go into more details.
--
Regards,
Adrian Jansen adrianjansen at internode dot on dot net
Regards,
Adrian Jansen adrianjansen at internode dot on dot net
We've slightly trimmed the long signature. Click to see the full one.
Site Timeline
- » Loooong distance IR detection, and IR collimation
- — Next thread in » Electronics Down Under
-
- » Re: New Wi-Fi Hot Spot List
- — Previous thread in » Electronics Down Under
-
- » Jaycar.
- — Newest thread in » Electronics Down Under
-
- » Formowanie kondensatorów elektrolitycznych, odwrócon a biegunowość, norma branżowa
- — The site's Newest Thread. Posted in » Electronics (Polish)
-
- » Dal cinese rebus
- — The site's Last Updated Thread. Posted in » Electronics Hobby (Italian)
-