View Single Post
  #8   Spotlight this post!  
Unread 21-08-2006, 04:05
6600gt's Avatar
6600gt 6600gt is offline
Registered User
AKA: Lohit
FRC #0226 (Hammerhead)
Team Role: Alumni
 
Join Date: Jan 2006
Rookie Year: 2004
Location: Troy, MI
Posts: 221
6600gt is a jewel in the rough6600gt is a jewel in the rough6600gt is a jewel in the rough
Re: Distinguish Serial Data?

Ok I have a new problem now...

How demanding are serial port interrupts and communication in general on the RC?

I am writing an application that communicates to the RC through the program port. Some of the data that I am trying to send can be compressed into a byte...for example say I want to tell which pwms I want to be controlled by my app, I can either send 16 bytes(if I want to control all 16) numberd 1-16 or I can send 2 bytes(16 bits) to tell me which pwms to control. Now the bits require extra processing after the data has be recieved( you have the open up the bytes and go through an if statement then the data follows after in a sequence). On the other hand the bytes can be immedietly followed by the byte data for the particular pwm(thus a for loop can take care of all of them).

Using the bits requires 18 total bytes to be sent while using the bytes requires 32 total bytes(if I want to control all 16). I want to do this about 40 times a second. And I couldn't care less if the PC was doing all 64 bit floating point math...

Which one is more efficient and less demanding on the RC?

Thanks again.

Last edited by 6600gt : 21-08-2006 at 04:09.