1
\$\begingroup\$

I have been to school and through these topics, understand that "bits on a bus" is a behaviour emerging from the very way a CPU works. But still, I suppose this requires some interaction... it doesn't just happen at a clock cycle, when I press a button, something is taking these bits and putting them on a circuit, as if a switch was "manually" activated.

I tried to look into the Linux source regarding i2c, but still in my mind I can't get around this thing, what is "putting" these bits on-demand on the i2c bus?

\$\endgroup\$
  • \$\begingroup\$ Devices put bits on a bus when they want to talk to something else on the bus. The actual details depend entirely on what sort of bus and what you want to do with it. \$\endgroup\$ – Finbarr Sep 12 '18 at 8:57
2
\$\begingroup\$

I2C is a form of serial communication (<= read that article).

The data ("bits") are transferred as a sequence.

Usually it is some application software that determines what data needs to be send, what address must be used and what data must be send to it.

Then an I2C controller takes that information and puts it on the I2C bus (the actual wires). The I2C controller consists of transistors which form a certain logic operation which is designed to be have in the way I2C needs.

Before diving into I2C (which can be a bit complex for a beginner), have a look at a simpler protocol called SPI

I say "protocol" and by that I mean something that describes the way I2C (or SPI) works including the voltages on the bus wires.

Then later read more about I2C here.

\$\endgroup\$
-3
\$\begingroup\$

Well transistors are switching more transistors that are switching more transistors and so on. Software defines what state some transistors are in.

Bits are loaded from ram into a CPU where they are in registers before and after going though some logic gates to perform an operation before going back to ram. When a cpu is starting it will load bits from a specific static place which kick starts the whole thing.

\$\endgroup\$
  • \$\begingroup\$ This is a very vague answer, similar to "when this happens, that happend" which doesn't tell us anything really. \$\endgroup\$ – Bimpelrekkie Sep 12 '18 at 10:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.