execution speed

Benjie

Senior Member
I completed successfully a remote control via 433MHz radio modules at 600 Baude (1200 gives erratic results). The receiver PIC is a 28X1 running at 4 MHZ because it drives servos. The data transfer is however slow.....about 700ms between data acceptance. Is there any method to assess the time taken by the various blocks of the code in order to investigate possible execution speed-up?

In my transmitter code I spend many lines driving a two lines LCD which may be the slow-down reason; the fixed LCD text is written only once before the "main" routine. Any other suggestion like "better goto then gosub" etc. or have the transmitter 28X1 running at 16MHz and the receiver at 4MHz or....

Thanks
 

inglewoodpete

Senior Member
I use a spare output pin and an oscilloscope to determine execution times.
Code:
High 2  'Indicate the start
<code under test>
Low 2   'Indicate the end
You can use a PC sound-card based oscilloscope if you don't have a real one.
 

westaust55

Moderator
Can you post your code for both ends of the 433MHz link.
Folks here may be then better placed to auggest ways to speed up the program execution.
 

Pauldesign

Senior Member
It addition to what Westauss suggested; just remember it takes at least two to be corrupt ;). Never-mine, in other words, your hardware design, physical & environment factors, operating conditions and most importantly RF layout plays an important role and should all be taken into consideration.
 
Top