Acquiring Sensor Data: User Defined Flags (variables) Logical use of UDF Can be checked before code Analog to Digital Conversion (ADC) execution Successive Approximation Triggering UDFs Convert to what? Example use: How does it work? o A button has been pressed Voltage References Data Structures Output formats Application of Linear Equation Object Creation Example Isolation Calculations Manipulation of Object Data Typedefs
Digital to Analog Conversion (DAC)
Code Example: Proportional Output struct person{ Discrete Voltage char name[50]; Voltage References char gender; Binary Control of Voltage char hairColour[3]; Example Calculations int age; TTL int weight; FAST! int height; Active or Not Active }; Active High or Low struct person chris;
Pulse Counting Typedef
For Sensors with Frequency Output Definition Timer Modules as Counters Use Value Comparison Example Example Calculations for Frequency Nyquist Principle typedef struct person person_t; person_t bob; // Creates a user defined variable, of type Pulse Width Modulation struct person, named "bob". Definition Changing Duty Cycles Calculating Average Voltage Calculating Duty Cycle