raspberry pi/uart introduction - github pages

47
Raspberry Pi/UART Introduction Bryce Himebaugh E210 Engineering Cyber-Physical Systems (Spring 2021)

Upload: others

Post on 10-Jan-2022

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Raspberry Pi/UART Introduction - GitHub Pages

Raspberry Pi/UART Introduction

Bryce Hime baugh

E210 Engineering Cyber-Physical Systems (Spring 2021)

Page 2: Raspberry Pi/UART Introduction - GitHub Pages

INDIANA UNIVERSITY BLOOMINGTON

https://engr210.github.io/

Page 3: Raspberry Pi/UART Introduction - GitHub Pages

INDIANA UNIVERSITY BLOOMINGTONINDIANA UNIVERSITY BLOOMINGTON

Raspberry Pi/UART

Page 4: Raspberry Pi/UART Introduction - GitHub Pages

Raspberry Pi Overview

Page 5: Raspberry Pi/UART Introduction - GitHub Pages

INDIANA UNIVERSITY BLOOMINGTON

Raspberry Pi History• Collaboration between University of Cambridge and Broadcom

• Released in 2012 to teach basic computer science in schools and developing countries.

• Managed by Raspberry Pi Foundation

• Original target application was robotics.

• 3B+ Costs $35, 4B Costs $75

Page 6: Raspberry Pi/UART Introduction - GitHub Pages

Raspberry Pi Hardware • Processor

• Broadcom BCM2837B0 quad-core ARM A53• 64-bit 1.4Ghz

• GPU• Broadcom Videocore-IV

• 1GB LPDDR2 SDRAM• Gigabit Ethernet, 2.4GHz and 5GHz

802.11b/g/n/ac Wi-Fi• HDMI Video Output • Audio Output• 32GB SD Card Drive

Presenter
Presentation Notes
Over 30 million units sold
Page 7: Raspberry Pi/UART Introduction - GitHub Pages

Raspberry Pi Software • Typically runs a variant of Linux• Pi OS Linux

• Formerly known as Raspian• Debian based• Created in 2012• Managed by the Raspberry Pi Foundation• Uses LXDE (lightweight X11 Desktop Environment) Desktop Environment by default

• Others• Ubuntu• LibreElec• RetroPie• TLXOS

• Possible to create “bare-metal” programs. • Documentation can be challenging

Page 8: Raspberry Pi/UART Introduction - GitHub Pages

Raspberry Pi Block Diagram

https://xdevs.com/article/rpi3_oc/

Page 9: Raspberry Pi/UART Introduction - GitHub Pages
Page 10: Raspberry Pi/UART Introduction - GitHub Pages
Page 11: Raspberry Pi/UART Introduction - GitHub Pages
Page 12: Raspberry Pi/UART Introduction - GitHub Pages
Page 13: Raspberry Pi/UART Introduction - GitHub Pages
Presenter
Presentation Notes
1.4Ghz 32-bit and 64-bit code ARMv8-A Architecture 8-stage in-order pipeline Includes NEON SIMD extensions for media engine and signal processing applications
Page 14: Raspberry Pi/UART Introduction - GitHub Pages
Page 15: Raspberry Pi/UART Introduction - GitHub Pages

https://medium.com/@ghalfacree/benchmarking-the-raspberry-pi-4-73e5afbcd54b

Page 16: Raspberry Pi/UART Introduction - GitHub Pages

https://medium.com/@ghalfacree/benchmarking-the-raspberry-pi-4-73e5afbcd54b

Page 17: Raspberry Pi/UART Introduction - GitHub Pages

https://medium.com/@ghalfacree/benchmarking-the-raspberry-pi-4-73e5afbcd54b

Page 18: Raspberry Pi/UART Introduction - GitHub Pages

https://medium.com/@ghalfacree/benchmarking-the-raspberry-pi-4-73e5afbcd54b

Page 19: Raspberry Pi/UART Introduction - GitHub Pages

https://medium.com/@ghalfacree/benchmarking-the-raspberry-pi-4-73e5afbcd54b

Page 20: Raspberry Pi/UART Introduction - GitHub Pages

https://gadgetversus.com/processor/intel-core-i7-8565u-vs-broadcom-bcm2837/

Page 21: Raspberry Pi/UART Introduction - GitHub Pages

UART Overview

Page 22: Raspberry Pi/UART Introduction - GitHub Pages

INDIANA UNIVERSITY BLOOMINGTON

UART Overview• Universal Asynchronous Receiver Transmitter

• Full-Duplex - Receive and Transmit Simultaneously

• Communication with systems using different clocks.

Page 23: Raspberry Pi/UART Introduction - GitHub Pages

INDIANA UNIVERSITY BLOOMINGTON

Waveform

Page 24: Raspberry Pi/UART Introduction - GitHub Pages

INDIANA UNIVERSITY BLOOMINGTON

Pins• TX (output): Transmit Data

• RX (input): Receive Data

• Flow Control

• nCTS: Clear to Send - prevents STM32 from transmitting data when high.

• nRTS: Ready to Send - indicates STM32 is ready to receive data when low

Page 25: Raspberry Pi/UART Introduction - GitHub Pages

USB to Serial Converter

Page 26: Raspberry Pi/UART Introduction - GitHub Pages

Serial Connection to PIUSB-to-Serial Adapter

Page 27: Raspberry Pi/UART Introduction - GitHub Pages

Pi

Workstation

UARTUSB

FTDI USB-UART Converter

RX/TXVirtual COM Port

Page 28: Raspberry Pi/UART Introduction - GitHub Pages
Page 29: Raspberry Pi/UART Introduction - GitHub Pages
Page 30: Raspberry Pi/UART Introduction - GitHub Pages

Connecting the Pi

Page 31: Raspberry Pi/UART Introduction - GitHub Pages

Connecting with Putty• Connect USB cable• Determine the COM port of FTDI cable • Connect to COM port using Putty

Page 32: Raspberry Pi/UART Introduction - GitHub Pages

Console Connections

Page 33: Raspberry Pi/UART Introduction - GitHub Pages
Page 34: Raspberry Pi/UART Introduction - GitHub Pages
Page 35: Raspberry Pi/UART Introduction - GitHub Pages

Might have to hit Enter a couple of times …Username: piPassword: e101class

Page 36: Raspberry Pi/UART Introduction - GitHub Pages

Connecting with Mac/Linux• Connect the USB/Serial Cable• Look in the /dev directory to find name of device.

• Linux: ttyUSBx where x is an integer starting at 0 • MacOS: cu.x where x is likely something like usbserial

• Connect to the device using screen • https://pbxbook.com/other/mac-tty.html

Page 37: Raspberry Pi/UART Introduction - GitHub Pages
Page 38: Raspberry Pi/UART Introduction - GitHub Pages
Page 39: Raspberry Pi/UART Introduction - GitHub Pages
Page 40: Raspberry Pi/UART Introduction - GitHub Pages

After logging into the machine: • Username: pi• Password: e101class

Page 41: Raspberry Pi/UART Introduction - GitHub Pages

Determine IP Address• If you are in Luddy, the PI will connect automatically to IU

DeviceNet• You should have an IP address that begins with 140. • Use the command ifconfig to verify address of wlan0 interface

Page 42: Raspberry Pi/UART Introduction - GitHub Pages
Page 43: Raspberry Pi/UART Introduction - GitHub Pages

SSH to this IP Address

Page 44: Raspberry Pi/UART Introduction - GitHub Pages

Not at Luddy … • Use the raspi-config utility to add the name and password of

your wireless access point. • Run the command using sudo. For Example:

• “sudo raspi-config”

Page 45: Raspberry Pi/UART Introduction - GitHub Pages
Page 46: Raspberry Pi/UART Introduction - GitHub Pages
Page 47: Raspberry Pi/UART Introduction - GitHub Pages