I created the following setup:

I created one circuit in which the PC connects to an HM-TRP radio module via a max232 DIP IC. This circuit for the test is the master to all devices and sends a 16 byte packet to each slave in turn.

The second circuit is a whole system on a microcontroller with an HM-TRP radio module. This circuit is meant to be a slave. This slave sends a result packet which is 16 bytes twice in a row the moment a valid packet is received from the master.

When the master sends any kind of data continuously at 56K speed, the slave receives all of it.

If the master attempts to send 16 bytes of data at 56K speed that the slave expects to receive and the master waits 20ms after sending the last bit of data, then it is able to receive the correct result data the slave has sent back.

Now if I change the waiting time from 20ms to 15ms, then no data is returned from the slave. I know this by observing the lights on the radio modules themselves.

So this suggests to me it's not the computer nor the microcontroller that's the problem, but the timing.

If my math is correct, then I believe the timing should be as follows:

Master sends out 16-byte packet. Master receives a 16-byte result from correct slave. Master receives same result again.

So 1/57600 times 10 bits a byte times 48 = 8.3ms

Which means it should take 8.3ms plus maybe a few hundred microseconds to process the entire communication between the master and any one slave.

So why do I need to make the waiting time to 20mS instead of 8ms? I mean I heard somewhere about some "ramp-up" time when receiver switches to transmit mode or vice-versa? but I don't know. and the documentation for the module doesn't explain anything about delays.

  • \$\begingroup\$ maybe the delay is software related ..... it is impossible to guess without the program listing \$\endgroup\$ – jsotola Aug 12 '18 at 17:40
  • \$\begingroup\$ No because I written all the software and the delay under test is what I put into the master each time 16. Bytes of data are sent out. If I thought it was a coding issue then id post on stackoverflow \$\endgroup\$ – Mike Aug 12 '18 at 17:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.