Encoder Decoder and interrupt

Go To Last Post
13 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I built as system where I used multiple TX/RX modules to transmit data. The data was encoded using AVR microcontrollers with codes I wrote myself. It seemed perfect when only 1 TX was on and it could select addresses and send data to any of the 3 respective RX modules with respect to the address sent by the TX. But when 2 TX modules was ON the RX received data from only the nearest TX module.

1. I did not use interrupt in my coding. I modified some code I saw on the net and used this checklist to make sure the address matches

while(1)
{
sync=getchar();
if(sync==25)
break;
}
add=getchar();
data=getchar();
chksm=getchar();
if(add==20)
{
if(chksm==(add+data) )
{
PORTA.0=(data>>7)&0b00000001;
PORTA.1=(data>>6)&0b00000001;
}
}

2. All TX/RX modules work at the same frequency i.e 434MHz.

Is there any way i can overcome this problem through coding.?

I want to race cars using this system as the wirless control method. But I can not do so if the RX modules receive data from only the nearest TX module.

Is there any other DIY remote control methods I can use for this purpose??

Looking forward to your generous help.

If u want to see the code just knock me I'll mail it to you. or upload it here if needed.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

putchar(sync);
putchar(add);
putchar(data1);
putchar(add+data1);
this is the sequence in which i sent the data

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

didnt use any interrupt through out
lookin forward to ur help

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There might be an error in any of the chars, so you need a check character at the end. A checksum is better than nothing, but isnt as 'strong' as a crc.

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

hmm oki dat would improve...but doesnt solve da main prob ..of only receiving data from the nearest tx module. i want it to receive data from all of them.... I didnt get ne errors in the characters i sent or received.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

One question about your Tx modules. Do they have the carrier on at all times, or only when sending data? Receivers will lock on to the strongest signal. If the transmitter is on only when sending data, then the strongest signal is the one sending. If the transmitter is on all the time, then the strongest signal will be the closest transmitter, even if it's not the one sending data.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

hmm
yea it is on always but i think I can get around it by giving the transmitters power only when sending data

if i keep dem at a fair distance ..nd 2 transmitters of comparable signal strenght. will the receiver still receive the strongest signal ..even though it is by a very small amount?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
hmm oki dat would improve...but doesnt solve da main prob

Interpret as

Hmm.. OK, that would improve....but doesn't solve the problem....

Quote:
. I didnt get ne errors in the characters i sent or received.

If I translate the "ne" to "no", read

Quote:
I didn't get no errors....etc.
So being a double negative I assume you got lots of errors.
Lack of spelling, punctuation , poor grammar does not improve your chances of getting a reply to your problem. This is not an SMS system!

What modulation is being used?

You will need to use an advanced protocol like AX25
(or others) to be able to operate in an environment where collisions are almost certain to occur.

Charles Darwin, Lord Kelvin & Murphy are always lurking about!
Lee -.-
Riddle me this...How did the serpent move around before the fall?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Waddup holmes. Word up. Yo be needin' sum shizzle wid da transmit n stuff.Wot ya don't be knowin' is dat da transmitter be interferin wid each ovver causin da bad sheet yo be havin. Power only one ov da transmit thingys at da one time and yo be ridin high on da shizzle.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Your ebonics encoder (to stay on-topic :-)) must be better than mine. The one I found converts "hello my friend" into a sentence containing the f-word and the n-word.

Stealing Proteus doesn't make you an engineer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Rispekt Arnoldo. Viddy this my young bro:

http://www.youtube.com/watch?v=E...

Out here in the projects in Australia, you need to speak the word on the street.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you all for all your help I figured out another way to get it to work.
@Charles or LDEVRIES : You shouldn't be so picky about language. My language, grammar and spelling is a thousand times better then yours can ever be. I just didn't exercise that ability of mine because I was in a hurry and wanted some help on a possible solution to get around the problem through coding not win an English writing competition. If you found it so hard to read then why did you end up bothering to give a reply. Everyone here who is actually looking for real help would be better of with out your cynical and really stupid solution as it could not be applied in this case.

@Chris-Mouse Thanks a lot man. Your question about the carrier being on at all times helped me figure out a solution.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Damn Holmes, yo be gettin' a bit snakey wid da bros. Best be chillin' or da gang be ridin yo ass, ya know wot I'm sayin? Keep yo shizzle wickedy-wak and da main man pointin' upwards.

Quote:
My language, grammar and spelling is a thousand times better then yours can ever be.

We've yet to see evidence of this. Just keep on digging that hole....