Protocol for Radio Transmission

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

formatting link
for the protocol.

I read the example which is turning LED on and off.

formatting link

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.

Reply to
sommes
Loading thread data ...

Since you are using AVRs, there are examples and code on

formatting link
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
Design Engineer         J & K Micro Systems
Microcomputer solutions for industrial control
Note reply address is invalid, convert address above to machine form.
Reply to
Adrian Jansen

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

Reply to
sommes

By the way, Do you think SNAP is a good one for radio transmission? or should I go for other encoding method?

Reply to
sommes

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 ?

formatting link

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
Design Engineer         J & K Micro Systems
Microcomputer solutions for industrial control
Note reply address is invalid, convert address above to machine form.
Reply to
Adrian Jansen

Adrian:

Can I ask you a private question? A you living in Queensland?

Reply to
sommes

Can I ask you a private question? A you living in Queensland?

***** How private do you want it???

Try posting your request on something other than a newsgroup!

Wotta wanker!

Brian Goldsmith.

Reply to
Brian Goldsmith.

thanks for advice.

Reply to
sommes

I wonder if BG will ever post anything other than insults. You can join Phil et al. Plonk.....

Reply to
The Real Andy

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.