Hardware Reference
In-Depth Information
Most standard components use the 100 kHz bus speed. Be aware that you can-
not mix bus speeds; all components use the same bus speed as dei ned by the
master. Arduinos are programmed to use a 100 kHz clock speed. It is possible
to change this speed, but it involves editing the source code of the Arduino
programming environment, which is out of the scope of this topic. For stan-
dard Arduino applications, the bus is limited to 100 kHz, which is sufi cient
for most sensors.
Shields with I 2 C
Some shields require the presence of I 2 C, but this is a problem for some boards. If
you use an Arduino Uno, the I 2 C pins are A4 and A5. However, on the Arduino
Mega 2560, I 2 C is on pins 20 and 21, so shields requiring I 2 C that work on the
Uno will not work on the Mega 2560. Be careful if using a shield with I 2 C.
Summary
In this chapter, you have seen how to connect I 2 C devices, and how to com-
municate with them. You have also seen how the Arduino can become an I 2 C
master, and how to coni gure it to become an I 2 C slave.
In the next chapter, you will consider the Ethernet protocol and how it is used
to network computers together. I will show you how to connect your Arduino
to a local network, how to coni gure the board, and how to communicate both
as a client and as a server.
 
Search WWH ::




Custom Search