PDA

View Full Version : Sending out 70 Bytes - need help on speed



khufumen
- 9th October 2005, 20:44
I have a 70 byte array that is being read into from a GPS unit. I'm trying to send the data in this array (70 bytes) out to another PIC. Is there a way to send the 70 bytes out all at once that is fast and simple?

One option is:

For X = 0 To 69
SEROUT2 OffBoardGPS_Tx, GPSBaudRate, [GPS1_StrRMC[X]]
Next X

The above option seems quite slow and redundant.

Another option is:
SEROUT2 OffBoardGPS_Tx, GPSBaudRate, [GPS1_StrRMC[0], GPS1_StrRMC[1],GPS1_StrRMC[2], ....etc.

Seems the above option would take alot of code writing.

Is there any better way?

Kind Regards,
Eric

mister_e
- 9th October 2005, 20:59
YourArray var byte[70]

Serout2.... [STR YourArray]

khufumen
- 9th October 2005, 21:11
By George, that certainly works perfectly!!!

Thanks for your help

Eric