interfacing

[|INTERFACING] refers to connecting different kinds of electronic devices together.
Devices must be __compatible__ in order to interface successfully. This may simply require having the correct voltage or impedance (such as when interfacing a microphone to a sound card), or it may be more complex, requiring compatible data types or protocols, such as interfacing a computer system to the Internet. **There's more to it than simply having "The right kind of plug that can fit in the socket!"**

In the Weather Station project we will have several different types of devices connected to each other, and we will have to pay attention to the requirements of their different interfaces. This is not as difficult as it looks, because in most cases the hardware or software we're using takes care of many of the details already.

First, we need to get data **IN** to our MicroController, from our Weather Sensors. We will use two kinds of __INPUTS:__

1. DIGITAL INPUTS

 * Connect a [|Digital Signal] from some external device to a MicroController
 * Only see a 1 ("ONE" or ON) or a 0 ("ZERO" or OFF) signal
 * Less than 0.2 Volts is seen as ZERO More than 1.8 Volts is seen as ONE

2. ANALOG INPUTS

 * Connect an [|Analog Signal] voltage from some external device to a MicroController.
 * Analog means the signal voltage can vary continuously over some range.
 * Our MicroController converts the analog voltage level to a digital number using its built-in [|Analog-to-Digital Converter.]

Here are the Interfaces we will need to figure out:

Anemometer (Wind Speed Sensor) __INTERFACED TO__ our MicroController (tiny Computer):

 * Type of Interface: Digital (On-off, One-Zero) square wave. Two On-Off cycles per revolution of sensor.
 * Signal / Voltage requirements: CMOS/TTL voltage levels ("Zero" <= 0.2 V, "One" >= 3.0V)
 * Speed requirements: Up to 50 Hz (Cycles per second)
 * Data type requirements: Not Applicable
 * Data Protocol Requirements:Not Applicable

Wind Direction Vane __INTERFACED TO__ our MicroController (tiny Computer):

 * Type of Interface: Analog (Varying Voltage).
 * Signal / Voltage requirements: Voltage from Vane will be between 0.0 and 5.0 Volts
 * Speed requirements: Measure at least once every two seconds
 * Data type requirements: Not Applicable
 * Data Protocol Requirements: Not Applicable

Thermometers __INTERFACED TO__ our MicroController (tiny Computer):

 * Type of Interface: "1-wire Network" (Send AND Receive digital data on 1 wire)
 * Signal / Voltage requirements: 1000 Ohm resistor pullup to +5.0V, 1 >= 4.0, 0 <=0.5
 * Speed requirements: Up to 50,000 cycles per second (50 KiloHertz) (50KHz)
 * Data type requirements: 8-bit bytes
 * Data Protocol Requirements: "1-wire" specific, complex, see 18S20 .PDF file. BUT we will use a pre-written piece of software to do this.

Next, we need to get data **OUT** of our MicroController, to a desktop computer. __

__

Our MicroController __INTERFACED TO__ a Desktop Personal Computer to display our data

 * Type of Interface: Personal Computer "Com Port" or "[|Serial Port"]
 * Signal / Voltage requirements: [|RS232C] (0 <= -4.0V, 1 >= +4.0V )
 * Speed requirements: 9600 Baud (Bits per second)
 * Data type requirements: No Parity, 8 bits per character, 1 Stop bit
 * Data Protocol Requirements: Specific data characters for Temp, Wind etc. Depends on PC Software.