0% found this document useful (0 votes)
2K views

Raspberry Pi - Case Study

The document provides details about the Raspberry Pi, a series of small single-board computers developed to promote computer science education. It discusses the origins and popularity of the Raspberry Pi. Several generations of Raspberry Pi models are described, ranging from the original Model B to the latest Model 3B+. The hardware components, performance capabilities, and manufacturing of the Raspberry Pi models are summarized. Overclocking options to increase the processors' speeds are also outlined.

Uploaded by

Ali Raza Haider
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2K views

Raspberry Pi - Case Study

The document provides details about the Raspberry Pi, a series of small single-board computers developed to promote computer science education. It discusses the origins and popularity of the Raspberry Pi. Several generations of Raspberry Pi models are described, ranging from the original Model B to the latest Model 3B+. The hardware components, performance capabilities, and manufacturing of the Raspberry Pi models are summarized. Overclocking options to increase the processors' speeds are also outlined.

Uploaded by

Ali Raza Haider
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 18

CASE STUDY

Submitted By: -
Ali Raza Haider
Muhammad Maisam Bin Khaqan
ID: -
F2017266003
F2017266001
Subject: -
Microprocessor and Assembly Language
Section: -
V5
Submitted To: -
Sir Rehan Saleem
Raspberry Pi
The Raspberry Pi is a series of small single-board computers developed in the
United Kingdom by the Raspberry Pi Foundation to promote teaching of modern
computer science in schools and in developing countries. The original model
became far more popular than anticipated, selling outside its target market for uses
such as robotics. It does not include peripherals (such as keyboards and mice) and
cases. However, some accessories have been included in several official and
unofficial bundles.

Figure 1: Raspberry Pi Logo

The organization behind the Raspberry Pi consists of two arms. The first two
models were developed by the Raspberry Pi Foundation. After the Pi Model B was
released, the foundation set up Raspberry Pi Trading, with Eben Upton as CEO, to
develop the third model, the B+. Raspberry Pi Trading is responsible for
developing the technology while the Foundation is an educational charity to
promote the teaching of basic computer science in schools and in developing
countries.
According to the Raspberry Pi Foundation, more than 5 million Raspberry Pis were
sold by February 2015, making it the best-selling British computer. By November
2016 they had sold 11 million units, and 12.5m by March 2017, making it the third
best-selling “general purpose computer”. In July 2017, sales reached nearly 15
million. In March 2018, sales reached 19 million.
Most Pis are made in a Sony factory in Pencoed, Wales, some are made in China
or Japan.
Figure 2: Raspberry Pi 3 Model B+

Generations of released models


Several generations of Raspberry Pis have been released. All models feature a
Broadcom system on a chip (SoC) with an integrated ARM-integrated central
processing unit (CPU) and on-chip graphics processing unit (GPU).
Processor speed ranges from 700 MHz to 1.4 GHz for the Pi 3 Model B+; on-board
memory ranges from 256 MB to 1 GB RAM. Secure Digital (SD) cards in
MicroSDHC form factor (SDHC on early models) are used to store the operating
system and program memory. The boards have one to four USB ports. For video
output, HDMI and composite video are supported, with a standard 3.5mm tip-ring-
sleeve jack for audio output. Lower-level output is provided by a number of GPIO
pins, which support common protocols like I2C. The B-Models have an 8P8C
Ethernet port and the Pi 3 and the Pi Zero W have on-board Wi-Fi 802.11n and
Bluetooth. Prices range from US$5 to $35.
The first generation (Raspberry Pi 1 Model B) was released in February 2012,
followed by the simpler and cheaper Model A. In 2014, the Foundation released a
board with an improved design, Raspberry Pi 1 Model B+. These cards are
approximately credit-card sized and represent the standard mainline form-factor.
Improved A+ and B+ models were released a year later. A “Compute Model” was
released in April 2014 for embedded applications. The Raspberry Pi 2, which
added more random-access memory, was released in February 2015.
A Raspberry Pi Zero with smaller size and reduced input/output (I/O) and
general-purpose input/output (GPIO) capabilities was released in November 2015
for US$5. By 2017, it became the newest mainline Raspberry Pi. On 28 February
2017, the Raspberry Pi Zero W was launched, a version of Zero with Wi-Fi and
Bluetooth capabilities, for US$10. On 12 January 2018, the Raspberry Pi Zero
WH was launched, a version of the Zero W with pre-soldered GPIO headers.
Raspberry Pi 3 Model B was released in February 2016 with a 1.2 GHz 64-bit
quad core processor, on-board Wi-Fi, Bluetooth and USB boot capabilities. On Pi
Day 2018 the Raspberry Pi Model B+ was launched with a faster 1.4 GHz
processor and a three-times faster gigabit Ethernet (throughput limited to ca. 300
Mbit/s by the internal USB 2.0 connection) or 2.4 / 5 GHz dual-band Wi-Fi (100
Mbit/s). Other features are Power over Ethernet (PoE), USB boot and network boot
(an SD card is no longer required).

Figure 3: The Raspberry Pi Zero, a US$5 model first introduced in 2015

Hardware
The Raspberry Pi hardware has evolved through several versions that feature
variations in memory capacity and peripheral-device support.

This block diagram describes Model B and B+; Model A, A+, and the Pi Zero are
similar, but lack the Ethernet and USB hub components. The Ethernet adaptor is
internally connected to an additional USB port. In Model A, A+, and the Pi Zero,
the USB port is connected directly to the system on a chip (SoC). On the Pi 1
Model B+ and the later models the USB/Ethernet chip contains a five-port USB
hub, of which four ports are available, while the Pi 1 Model B only provides two.
On the Pi Zero, the USB port is also connected directly to the SoC, but it uses a
micro USB (OTG) port.
Processor
The Broadcom BCM2835 SoC used in the first-generation Raspberry Pi includes a
700 MHz ARM11 76JZF-S processor, VideoCore IV graphics processing unit
(GPU), and RAM. It has a level 1 (L1) cache of 16 KB and a level 2 (L2) cache of
128 KB. The level 2 cache is used primarily by the GPU. The SoC is stacked
underneath the RAM chip, so only its edge is visible. The 1176JZ(F)-S is the same
CPU used in the original iPhone, although at a higher clock rate, and mated with a
much faster GPU.
The earlier V1.1 model of the Raspberry Pi 2 used a Broadcom BCM2836 SoC
with a 900 MHz 32-bit, quad-core ARM Cortex-A7 processor, with 256 KB shared
L2 cache. The Raspberry Pi 2 V1.2 was upgraded to a Broadcom BCM 2837 SoC
with a 1.2 GHz 64-bit quad-core ARM Cortex-A53 processor, the same SoC which
is used on the Raspberry Pi 3, but underclocked (by default) to the same 900 MHz
CPU clock speed as the V1.1. The BCM2836 is no longer in production as of late
2016.
The Raspberry Pi 3+ uses a Broadcom BCM2837B0 with a 1.4 GHz 64-bit quad-
core ARM Cortex-A53 processor, with 512 KB shared L2 cache.
The Raspberry Pi Zero and ZeroW use the same Broadcom BCM2835 SoC as the
first-generation Raspberry Pi, although now running at a 1GHz CPU clock speed.

Figure 4: The Raspberry Pi B uses a 32-bit 900 MHz quad-core ARM Cortex-A7 processor.

Performance
While operating at 700 MHz by default, the first-generation Raspberry Pi provided
a real-world performance roughly equivalent to 0.041 GFLOPS. On the CPU level
the performance level is similar to a 300 MHz Pentium II of 1997-99. The GPU
provides 1 Gpixel/s or 1.5 Gtexel/s of graphics processing or 24 GFLOPS of
general-purpose computing performance. The graphical capabilities of Raspberry
Pi are roughly equivalent to the performance of the Xbox of 2001.
Raspberry Pi 2 V1.1 included a quad-core Cortex-A7 CPU running at 900 MHz
and 1 GB RAM. It was described as 4-6 times more powerful than its predecessor.
The GPU was identical to the original. In parallelized benchmarks, the Raspberry
Pi 2 V1.1 could be up to 14 times faster than Raspberry Pi 1 Model B+.
The Raspberry Pi 3, with a quad-core ARM Cortex-A53 processor, is described as
having ten times the performance of a Raspberry Pi 1. This was suggested to be
highly dependent on task threading and instruction set use. Benchmarks showed
the Raspberry Pi 3 to be approximately 80% faster than the Raspberry Pi 2 in
parallelized tasks.
Overclocking
Most Raspberry Pi systems-on-chip could be overclocked to 800 MHz, and some
to 1000 MHz. There are reports that the Raspberry Pi 2 can be similarly
overclocked, in extreme cases, even to 1500 MHz (discarding all safety features
and over-voltage limitations). In the Raspbian Linux distro the overclocking
options on boot can be done by a software command running “sudo raspi-config”
without voiding the warranty. In those cases, the Pi automatically shuts the
overclocking down if the chip temperature reaches 85 o C (185 o F), but it is
possible to override automatic over-voltage and overclocking settings (voiding the
warranty); an appropriately sized heat sink is needed to protect the chip from
serious overheating.
Newer versions of the firmware contain the option to choose between five
overclock (“turbo”) presets that when used, attempt to maximize the performance
of the SoC without impairing the lifetime of the board. This is done by monitoring
the core temperature of the chip and the CPU load, and dynamically adjusting
clock speeds and the core voltage. When the demand is low on the CPU or it is
running too hot the performance is throttled, but if the CPU has much to do and the
chip’s temperature is acceptable, performance is temporarily increased with clock
speeds of up to 1 GHz, depending on the board version and on which of the turbo
settings is used.
The seven overclock presets are:
 none; 700 MHz ARM, 250 MHz core, 400 MHz SDRAM, 0 overvolting
 modest; 800 MHz ARM, 250 MHz core, 400 MHz SDRAM, 0 overvolting,
 medium; 900 MHz ARM, 250 MHz core, 450 MHz SDRAM, 2 overvolting,
 high; 950 MHz ARM, 250 MHz core, 450 MHz SDRAM, 6 overvolting,
 turbo; 1000 MHz ARM, 500 MHz core, 600 MHz SDRAM, 6 overvolting,
 Pi 2; 1000 MHz ARM, 500 MHz core, 500 MHz SDRAM, 2 overvolting,
 Pi 3; 1100 MHz ARM, 550 MHz core, 500 MHz SDRAM, 6 overvolting. In
system information the CPU speed will appear as 1200 MHz. When idling,
the speed lowers to 600 MHz.
In the highest (turbo) preset SDRAM clock was originally 500 MHz, but this was
later changed to 600 MHz because 500 MHz sometimes causes SD card
corruption. Simultaneously in high mode the core clock was lowered from 450 to
250 MHz, and in medium mode from 333 to 250 MHz.
The CPU on the first- and second-generation Raspberry Pi mode did not require
cooling, such as a heat sink or fan, even when overclocked, but the Raspberry Pi 3
may generate more heat when overclocked.
RAM
On the older beta Model B boards, 128 MB was allocated by default to the GPU,
leaving 128 MB for the CPU. On the first 256 MB release Model B (and Model
A), three different splits were possible. The default split was 192 MB (RAM for
CPU), which should be sufficient for standalone 1080p video decoding, or for
simple 3D, but probably not for both together. 224 MB was for Linux only, with
only a 1080p framebuffer, and was likely to fail for any video or 3D. 128 MB was
for heavy 3D, possibly also with video decoding (e.g. Kodi). Comparatively the
Nokia 701 uses 128 MB for the Broadcom VideoCore IV.
For the later Model B with 512 RAM, new standard memory split files
(arm256_start.elf, arm384_start.elf, arm496_start.elf) were initially released for
256 MB, 384 MB and 496 MB CPU RAM (and 256 MB, 128 MB and 16 MB
video RAM) respectively. But a week or so later the RPF released a new version of
start.elf that could read a new entry in config.txt (gpu_mem=xx) and could
dynamically assign an amount of RAM (from 16 to 256 MB in 8 MB steps) to the
GPU, so the older method of memory splits became obsolete, and a single start.elf
worked the same for 256 MB and 512 MB Raspberry Pis.
The Raspberry Pi 2 and the Raspberry Pi 3 have 1 GB of RAM. The Raspberry Pi
Zero and Zero W have 512 MB of RAM.
Networking
The Model A, A+ and Pi Zero have no Ethernet circuitry and are commonly
connected to a network using an external user-supplied USB Ethernet or Wi-Fi
adapter. On the Model B and B+ the Ethernet is provided by a built-in USB
Ethernet adapter using the SMSC LAN9514 chip. The Raspberry Pi 3 and Pi Zero
W (wireless) are equipped with 2.4 GHz WiFi 802.11n (150 Mbit/s) and Bluetooth
4.1 (24 Mbit/s) based on the Broadcom BCM43438 FullMAC chip with no official
support for monitor mode but implemented through unofficial firmware patching
and the Pi 3 also has a 10/100 Mbit/s Ethernet port. The Raspberry Pi 3B+ features
dual-band IEEE 802.11b/g/n/ac WiFi, Bluetooth 4.2, and Gigabit Ethernet (limited
to approximately 300 Mbit/s by the USB 2.0 bus between it and the SoC).
Special-purpose features
The Pi Zero can be used as a USB device or a “USB gadget”, plugged into another
computer via a USB port on another machine. It can be configured in multiple
ways, for example to show up as a serial device or an ethernet device. Although
originally requiring software patches, this was added to the mainline Raspbian
distribution in May 2016.
The Pi 3 can boot from USB, such as from a flash drive. Because of firmware
limitations in other models, the Pi 3A, 3B and 3B+ are the only boards that can do
this.
Peripherals
The Raspberry Pi may be operated with any generic USB computer keyboard and
mouse. It may also be used with USB storage, USB to MIDI converters, and
virtually any other device/component with USB capabilities.
Other peripherals can be attached through the various pins and connectors on the
surface of the Raspberry Pi.

Figure 5: The Model 2B boards incorporate four USB ports for connecting peripherals.
Video
The video controller can generate standard modern TV resolutions, such as HD and
Full HD, and the higher or lower monitor resolutions as well as older NTSC or
PAL standard CRT TV resolutions. As shipped (i.e., without custom overclocking)
it can support the following resolutions: 640x350 EGA; 640x480 VGA; 800x600
SVGA; 1024x768 XGA; 1280x720 720p HDTV; 1280x768 WXGA variant;
1280x800 WXGA variant; 1280x1024 SXGA; 1366x768 WXGA variant;
1400x1050 SXGA+; 1600x1200 UXGA; 1680x1050 WXGA+; 1920x1080 1080p
HDTV; 1920x1200 WUXGA.
Higher resolutions, up to 2048x1152, may work or even 3840x2160 at 15 Hz (too
low a frame rate for convincing video). Note also that allowing the higher
resolutions does not imply that the GPU can decode video formats at these
resolutions; in fact, the Pis are known to not work reliably for H.256 (at those high
resolutions), commonly used for very high resolutions (however, most common
formats up to Full HD do work).
Although the Raspberry Pi 3 does not have H.265 decoding hardware, the CPU is
more powerful than its predecessors, potentially fast enough to allow the decoding
of H.265-encoded videos in software. The GPU in the Raspberry Pi 3 runs at
higher clock frequencies of 300 MHz or 400 MHz, compared to previous versions
which ran at 250 MHz.
The Raspberry Pis can also generate 576i and 480i composite video signals, as
used on old-style (CRT) TV screens and less-expensive monitors through standard
connectors – either RCA or 3.5 mm phono connector depending on model. The
television signal standards supported are PAL-BGHID, PAL-M, PAL-N, NTSC
and NTSC-J.

Figure 6: The early Raspberry Pi 1 Model A, with an HDMI port and a standard RCA composite video port for older displays
Real-time clock
None of the current Raspberry Pi models have a built-in real-time clock, so they
are unable to keep track of the time of day independently. Instead, a program
running on the Pi can retrieve the time from the network time server or from user
input at boot time, thus knowing the time when powered on. To provide
consistency of time for the file system, the Pi automatically saves the current
system time on shutdown, and re-loads that time at boot.
A real-time hardware clock with battery backup, such as the DS1307, may be
added (often via the I2C interface). Note however that conflicts with the camera’s
CSI interface, effectively disabling the camera.
Connectors
Pi Zero

Figure 7: Location of connectors and main ICs

Model A

Figure 8: Location of connectors and main ICs on Raspberry Pi 1 model A


Figure 9: Location of connectors and main ICs on Raspberry Pi 1 Model A+ revision 1.1

Model B

Figure 10: Location of connectors and main ICs on Raspberry Pi 1 Model B revision 1.2

Figure 11: Location of connectors and main ICs on Raspberry Pi 1 Model B+ revision 1.2 and Raspberry Pi 2
Figure 12: Location of connectors and main ICs on Raspberry Pi 3

General purpose input-output (GPIO) connector


Raspberry Pi 1 Models A+ and B+, Pi 2 Model B, Pi 3 Models A, B and B+, and
Pi Zero and Pi Zero GPIO J8 have a 40-pin pin-out. Raspberry Pi 1 Models A and
B have only the first 26 pins.
GPIO# 2nd func. Pin# Pin# 2nd func. GPIO#
+3.3V 9 2 +5V
2 SDA1 (I2C) 3 4 +5V
3 SCL1 (I2C) 5 6 GND
4 GCLK 7 8 TXD0 (UART) 14
GND 9 10 RXD0 (UART) 15
17 GEN0 11 12 GEN1 18
27 GEN2 13 14 GND
22 GEN3 15 16 GEN4 23
+3.3V 17 18 GEN5 24
10 MOSI (SPI) 19 20 GND
9 MISO (SPI) 21 22 GEN6 25
11 SCLK (SPI) 23 24 CE0_N (SPI) 8
GND 25 26 CE1_N (SPI) 7
(Pi 1 Models A and B stop here)
EEPRO ID_SD 27 28 ID_SC EEPROM
M
5 N/A 29 30 GND
6 N/A 31 32 12
13 N/A 33 34 GND
19 N/A 35 36 N/A 16
26 N/A 37 38 Digital IN 20
GND 39 40 Digital OUT 21

Model B rev. 2 also has a pad (called P5 on the board and P6 on the schematics) of
8 pins offering access to an additional 4 GPIO connections.
Function 2nd func. Pin# Pin# 2nd func. Function
+5V 1 2 +3.3V
GPIO28 GPIO_GEN7 3 4 GPIO_GEN8 GPIO29
GPIO30 GPIO_GEN9 5 6 GPIO_GEN1 GPIO31
0
GND 7 8 GND

Models A and B provide GPIO access to the ACT status LED using GPIO 16.
Models A+ and B+ provide GPIO access to the ACT status LED using GPIO 47,
and the power status LED using GPIO 35.

NOOBS Setting
New Out of Box Software (NOOBS) is an easy operating system installation
manager for the Raspberry Pi.
 How to get NOOBS

BUY A PRE-INSTALLED SD CARD


SD cards with NOOBS preinstalled are available from many of our distributors and
independent retailers, including GeeekPi, Adafruit and pi hub.

DOWNLOAD
Alternatively, NOOBS is available for download on Raspberry Pi website:
raspberrypi.org/downloads

HOW TO INSTALL NOOBS ON AN SD CARD


Once you have downloaded the NOOBS zip file, you’ll need to copy the contents
to a formatted SD card on your computer.
 To set up a blank SD card with NOOBS:
Format an SD card which is 8 GB or larger as FAT. See the
instructions given below.
Download and extract the files from the NOOBS zip file.
Copy the extracted files onto the SD card you just
formatted, so that this file is at the root directory of the
SD card.
Please note that in some cases it may extract the files into
a folder;
If this is the case, then please copy across the files from
inside the folder rather than the folder itself.
On first boot, the “RECOVERY” FAT partition will be
automatically resized to a minimum,
and a list of OSes that are available to install will be
displayed.

HOW TO FORMAT AN SD CARD AS FAT


Note: if you are formatting an SD (or micro SD) card that has a capacity over 32
GB (i.e. 64 GB and above),
 WINDOWS
If you are a Windows user, we recommend formatting your SD
card using the SD Association’s Formatting Tool,
which can be downloaded from sdcard.org.
Instructions for using the tool are available on the same
site.
 MAC OS
The SD Association’s Formatting Tool is also available for
Mac users,
although the default OS X Disk Utility is also capable of
formatting the entire disk.
To do this, select the SD card volume and choose Erase with
MS-DOS format.
 LINUX
For Linux users we recommend gparted (or the command line
version parted). Norman Dunbar has written up instructions
for Linux users.
 What’s included in NOOBS
The following operating systems are currently included in NOOBS:
 Raspbian
 Pidora
 LibreELEC
 OSMC
 RISC OS
 Arch Linux
As of NOOBS v1.3.10 (September 2014), only Raspbian is installed by default in
NOOBS. The others can be installed with a network connection.
 NOOBS and NOOBS Lite
NOOBS is available in two forms: offline and network
install, or network install only.
The full version has Raspbian included, so it can be installed from the SD card
while offline, whereas using NOOBS Lite or installing any other operating system
requires an internet connection.
Note that the operating system image on the full version can
be outdated if a new version of OS is released, but if
connected to the internet you will be shown the option of
downloading the latest version if there is a newer one
available.
 NOOBS development
 LATEST NOOBS RELEASE
The latest NOOBS release is v2.4.5, released on 29 th November
2017.
(From NOOBS v1.4.0 onwards, NOOBS Lite only shares the first
two digits of the version number, i.e. v1.4)

Example Code
Python Code:
import RPi.GPIO as gpio
import time

gpio.setmode(gpio.BCM)
gpio.setup(18, gpio.OUT)

while True:
gpio.output(18, gpio.HIGH)
passcode = raw_input(“What is pi?: “)
if passcode == “Awesome”:
gpio.output(18, gpio.LOW)
time.sleep(4)

else:
gpio.output(18, gpio.HIGH)
print(“Wrong Password!”)
Assembly Language Code:
.text
.global_start

_start:
mov r7, #4 ; write system call
mov r0, #1 ; file (stdout)
ldr r1, =message
mov r2, #14 ; message length
svc #0
mov r7, #1 ; exit system call
mov r0, #0 ; return code
svc #0
.data

message:
.ascii “Hello, world!\n”

You might also like