• No results found

Hardware Versions

In document Hacking Raspberry Pi 2013 (Page 32-37)

It is important to remember that the Raspberry Pi is a full-fledged personal computer and not just a simple microcontroller. A personal computer is a self-contained system that performs the following data processing tasks:

Input: The computer receives instructions and data from the user or application.

Processing: The computer performs preprogrammed actions upon its input.

Output: The computer displays the processing results in one or several ways to the user or application.

In addition, a personal computer typically also includes persistent storage and an operating system that features a user interface. Much more is discussed concerning these topics in Chapters 2 and 3, “A Tour of Raspberry Pi Peripheral Devices.”

Suffice to say that the Raspberry Pi does essentially all the things that your full-sized desktop or

laptop computer does, albeit more slowly and on a smaller scale.

By contrast, a microcontroller is a much more specialized piece of hardware. A microcontroller is an integrated circuit that is similar to a personal computer inasmuch as it receives input, performs processing on that input, and finally generates output of some kind or another.

However, the microcontroller is set apart from the personal computer by the following three characteristics:

A microcontroller’s operation depends on precise timing: Because the microcontroller is generally a single-purpose device, there’s no driver or operating system overhead to slow down the system. Therefore, the microcontroller can perform work by using extremely precise clock cycles. This time-dependent operation is difficult to accomplish with the Pi because the Pi must access its hardware through several software layers.

A microcontroller gives the user full and direct access to hardware: As you learn in Chapter 4, “Installing and Configuring an Operating System,” most of the Raspberry Pi

hardware (particularly the Broadcom BCM2835 system-on-a-chip) is proprietary. By contrast, most microcontrollers such as the Atmel Reduced Instruction Set Computing (RISC) chip at the heart of the Arduino are open source and are therefore completely accessible to users. With the Pi, we are limited to interacting with the board’s hardware components via software

application programming interfaces (APIs).

A microcontroller typically has no user interface: A programmer must use an external system to send data to and receive data from a microcontroller.

A microcontroller is typically designed for a single purpose: A microcontroller is intended to perform a single task—and to do that task precisely and very well. For instance, consider an Arduino-powered weather station that senses the environment and reports on air temperature, relative humidity, barometric pressure, and so forth.

A representative Arduino microcontroller (specifically the Uno) board is shown in Figure 1.2.

FIGURE 1.2 The Uno is the flagship of the Arduino microcontroller line.

You learn in Chapter 19, “Raspberry Pi and Arduino,” how well the Raspberry Pi “plays” with the Arduino platform. In the meantime, here is a list that provides you with some of the most popular Raspberry Pi-compatible microcontrollers in use today:

Arduino (http://arduino.cc)

BeagleBone (http://beagleboard.org/bone/)

Dwengo (http://www.dwengo.org/products/dwengo-board)

Now then, let’s get down to business and formally introduce the Raspberry Pi.

As of spring 2013, the Raspberry Pi Foundation has two Raspberry Pi models, Model A and Model B. The differences between the two are shown in Table 1.1.

TABLE 1.1 Comparison of the Two Raspberry Pi Models

Note: History, History, All Around Me

Even the Raspberry Pi nomenclature pays tribute to the British Broadcasting Company (BBC) Micro personal computer. As it happens, the Micro BBC had a Model A and Model B, with Model B offering substantially more processing horsepower than the modest Model A.

So aside from the price difference, what are the key points of distinction between Model A and Model B? In the simplest terms:

Model B has twice the RAM as Model A.

Model B has an onboard Ethernet RJ-45 jack.

Model B has an extra USB port.

Model A uses 30% as much power as Model B.

If you spend time analyzing the two models (and I certainly hope you invest in one of each and do so), you’ll notice that the printed circuit boards are indeed identical.

Instead of a redesign, the Foundation simply stripped components off Model B to make Model A.

Look at the image of Model A in Figure 1.3, focusing on the lower right—see that empty socket?

That’s where the Ethernet port is soldered on the Model B board.

FIGURE 1.3 Raspberry Pi board, Model A.

Also notice in this image the unpopulated pad just above the Ethernet area; this is where the Foundation soldered an SMSC LAN9512 integrated circuit (IC) that controls the Ethernet jack in Model B.

Because the extra $10 buys you so much more computer, I focus on Model B exclusively in this book.

The good news for Model A owners, however, is that all of the software, hardware, and programming we undertake here can be performed on both models.

Note: Why Model A?

The question probably came to your mind, “Why would someone purchase Model A when you get so much more ‘bang for your buck’ with Model B?” The answer probably has something to do with power consumption. Because the power footprint of Model A is so tiny, Pi hackers can leverage the Model A platform for low-energy or solar-powered projects much easier than they can with Model B.

One more thing about the Model B boards specifically: As of spring 2013, the Raspberry Pi Foundation released two revisions to the Model B PCBs. You can tell at a glance which board revision you have in front of you by inspecting the light-emitting diode (LED) bank to the right of the

USB port(s). Check it out:

If the first status LED is labeled OK, you have a Revision 1 board.

If the first status LED is labeled ACT, you have a Revision 2 board.

You learn more about the Pi’s status LEDs in Chapter 2.

In document Hacking Raspberry Pi 2013 (Page 32-37)