How the dataport works

From DIDEAS Wiki
Revision as of 21:44, 27 October 2010 by Mike (talk | contribs) (Created page with "To send data from the PIC to a computer, a datastream is sent (either over wireless radio or physical serial connection). However, for the receiving computer to understand the st...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

To send data from the PIC to a computer, a datastream is sent (either over wireless radio or physical serial connection). However, for the receiving computer to understand the stream of 1's and 0's, there must be a header of sorts to describe the incoming data. This is the vlist. This list must be defined on both the PIC side and computer side as follows:

PIC: -To send data from the PIC to the PC, the information is stored in a C structure. This structure type is defined in dataport.h, and is called USER_DATAPORT_OBJ_T (you'll see "typedef struct PACKED" that starts the definition, followed by USER_DATAPORT_OBJ_T, which is the new name for this datatype). -