Relocating Software Functions to Hardware Components
Let's dive into the fascinating world of experimentation where Igor Brichkov chose to implement the I2C protocol directly using hardware. This is a daunting task, as usually we opt for programmable computers or microcontrollers for all but the most basic tasks, but not Igor, he's got guts!
To pull off this stunt, he recognized the significance of timing in programming a communications protocol in hardware. Starting with the initial communication between the device and another on the bus, Igor will build the signal piece by piece, then OR them together. This process kicks off with an oscillator combined with a counter to create the start condition, which also introduces a pause. After the pause, a second oscillator steps in and sends data out.
The essential data for I2C is the address, which is transmitted with the help of a shift register and a counter set to fire the correct bits onto the communication lines. The rest of the signal, including data from the rotary encoder Igor's using for his project, is constructed by coupling sets of shift registers and counters. These pairs pass the data through the I2C lines sequentially, like a hardware program's main loop stepping through all functions one at a time.
Remember that decade-old project where the user had to manually key in the data instead of automating the task of sending it on I2C? Well, Igor's approach could be thought of as a more sophisticated version of that!
Now, to feed your curiosity, let's take a look at the nuts and bolts of implementing the I2C protocol in hardware. In essence, we're talking about designing and configuring electronic circuits and components to enable master-slave communication using just two signal lines: SDA (Serial Data) and SCL (Serial Clock).
The master device controls the communication, initiating data transfers and generating the clock signal (SCL). Slave devices respond to commands and addresses sent by the master. Each slave device has a unique address, allowing the master to select the intended slave for communication.
The process kicks off by connecting the devices, adding external pull-up resistors to both SDA and SCL lines. Then, we move on to designing the master device, where we generate the SCL clock signal at a defined frequency, initiate communication by employing start/stop conditions, send the slave address, read/write commands, and data bytes.
Slave devices, on the other hand, listen for their address on the I2C bus and participate in the data transfer once they recognize it. There's an example of implementing I2C in a microcontroller or FPGA, along with a high-level overview of designing an FPGA for the task. Remember, this process forms the foundation for efficient I2C hardware implementation in various systems!
In the endeavor to implement the I2C protocol directly using hardware, Igor Brichkov recognized the necessity of programming the timing accurately, using oscillators and counters. Instead of relying on programmable computers or microcontrollers for this complex task, Igor opted to hack the hardware signals, constructing the essential data for I2C, such as the address, using shift registers and counters, which can be compared to a more sophisticated version of a decade-old project that required manual data entry.