Bus & Signal Processing

Size: px
Start display at page:

Download "Bus & Signal Processing"

Transcription

1 Prototyping Electronic Devices Class 12 Bus & Signal Processing Deqing Sun, Peiqi Su ITP, Fall, 2018

2 What is bus 2

3 Differences between Bus and Cab? 3

4 Differences between Bus and Cab Bus is capable to carry many passengers that sharing the same route. 4

5 In electronics How to connect different devices so that they can communicate with each other? Device A Device B Device A Device B Device C Device D Device C Device D Cab Concept Bus Concept 5

6 Bus in electronics Bus is a set of connections shared by multiple hardware components. Signals are dropped off or picked up at every device attached to the bus. What s the advantage to use bus? Cab Concept Bus Concept 6

7 Advantage of Bus The purpose of buses is to reduce connections between components. It carries out all communications over a single data channel. Cab Concept Bus Concept 7

8 Parallel bus and Serial bus Buses can be divided into two types: Parallel: Conveying multiple binary digits (bits), simultaneously Serial: Sending data one bit at a time, sequentially 8

9 Examples of serial and parallel interface Flag semaphore Parallel. Multiple bits at same time (two flags with various position) Morse code Serial. One bit at a time (either on or off) 9

10 Serial/Parallel Hard drives Hard drive buses shifted from Parallel (left) to Serial (right) since Serial bus has 2 main advantages Fewer wires (Very useful) Faster clock speed capability 10

11 Parallel Bus is rare today Due to the complexity in connection, parallel bus is rarely used today. Memory module is one of the few hardware still using parallel bus. As we won t use it, we won t talk much about it in this class. 11

12 Common serial buses in ITP projects Synchronous I2C - 2 wires SPI - 3 wires+1 slave select for each device (e.g. 4 wires for one device, 5 for 2) Asynchronous RS wires 1-Wire - 1 wire 12

13 Diff. between synchronous and asynchronous Whether the interface uses a clock line to synchronize signal. Asynchronous interface sends data at certain rate. Receiver needs to count time by itself. Synchronous interface has a clock line that inform receiver when to receive a new bit. What if sender freezes for a while? 13

14 USB 14

15 USB s advantage USB can supply some power USB is robust USB support hub USB is supported by a lot of devices 15

16 Extend USB Extend USB with repeater: This type of USB extension cord has a hub on it s female end. It decode signal and encode again to fix distortion in transmission. Limited Length, High reliability, High speed. 16

17 Extend USB Extend USB with ethernet cable: This pair of adaptor convert USB signal on Ethernet cable and back. You can use a long cable for connection. Longer Length, Lower reliability, Low speed. Arduino, thermal printer, etc OK Webcam, Kinect, Storage, etc, NOT OK 17

18 Lesson we learned from USB extension We used non-shield ethernet 30ft cable to extend USB from computer to control circuit. Everything works well until show starts. Frequent disconnections happens. Using shielded cable will be more reliable, especially in space filled with radio noise like trade shows. 18

19 I2C 19

20 What is I2C The Inter-integrated Circuit (I2C) Protocol is a protocol intended to allow multiple slave digital integrated circuits ( chips ) to communicate with one or more master chips. It uses 2 wires. Normally we only have one master and Microcontroller will take that role. It requires pull-up resistors. 20

21 Pull-up & Pull-up resistor When you use a button and connect the button between input Pin and GND, you need to add a resistor between input Pin and VCC, to pull input Pin level to VCC. Such resistor is called Pull-up resistor. 21

22 How I2C works Master sends out clock and address of a slave device. If there is a slave device with matching address, it will respond and all other slave devices will keep silent. Arduino's Wire Library handles all lower level work. 22

23 Address of slave device The Wire library uses 7 bit addresses. The addresses from 0 to 7 are not used because they are reserved. So, there are addresses are available =120 As long as slave devices have different address, there will be no conflict. 23

24 Address of slave device is not arbitrary When you get a I2C chip. Manufacturer usually already pre-programmed its slave address. Some chips may let you change the last few bits of its address, but you can not change all bits of it. If you are using a microcontroller as slave, you may change the whole address. 24

25 Figure out the slave address Let s say we like this LED matrix from adafruit. It has a controller called HT16K33. We open it s datasheet. 25

26 Address of HT16K33 The address is (binary) A2 A1 A0 And A2, A1, A0 is configurable. If one pin is unconnected, the corresponding bit will be zero. For example, If we only connect A1, The devices address will be =0x72 Quiz: if A0 and A2 are connected, the address? =0x75 26

27 Pads for address configuration These 3 pad are used for configuration. You can bridge them to change address. Quiz: How should we set address to 0x74 ( )? Bridge A2 pad only Quiz: In the same I2C bus, how many HT16K33 can I connect? 8 (000,001,010,011,100,101,110,111) 27

28 A common I2C device: EEPROM EDID EEPROM, describes monitor s parameters in VGA, DVI and HDMI SPD EEPROM, describes memory module s size, type and speed, etc. Simple IC card, used to keep non-critical simple data. Used in early laundry system, etc. 28

29 SPI 29

30 SPI connection SPI uses separate connections for sending and receiving data. Each slave has own slave select. SPI device doesn t have address. 30

31 Compare to I2C SPI has separate input and output lines. SPI don t need to send address. SPI is faster and used on BLE module and SD cards. Due to the complexity of wiring (at least 4 vs 2), SPI is not as common as I2C. 31

32 One Wire 32

33 1-Wire 1-Wire is an interesting bus that only use one wire. For low power application, even power wire can be removed by using data line to provide power. Each 1-wire device has been programmed with a unique ID. Master device can perform a search algorithm to find all available devices on bus. 33

34 1-wire devices Temperature sensor IO breakout ibutton Widely used as checkpoints in security guard tour system 34

35 RS485 35

36 Rs485 RS485 is a type serial communication, but it uses a pair of wires to send one signal. You can use a transceiver to translate serial on Arduino to and from RS

37 Why do we need RS485 RS485 use twisted wire pair to transmit data. If you do wiring in industrial standard level, RS485 can go up to 4000ft (1200m) 37

38 Where we should use RS485 If you need to send data in a long distance, RS485 is a good choice. In public theater, we used RS485 to transfer data from main controller to LED displays. 38

39 Quiz 39

40 Quiz: which bus to use? Scenario: The Penis Wall 4 x 4 feet; 81 modules; control each module individually 40

41 Quiz: which bus to use? Scenario: The Bay Lights 1.8 miles (2.9 km) of the cables; 25,000 individual white LEDs; control each LED individually 41

42 Quiz: which bus to use? A light bulb? For power transmission without communication. Bus is not needed. 42

43 in-class practice i2c 43

44 What will we do We will connect 2 Arduino with i2c. The master Arduino will send a value to slave Arduino to control the onboard LED, and read analog value on A0 from slave Arduino. 44

45 Connect 2 Arduino Connect 5V, GND, SCL and SDA ports. On Arduino Uno: SCL is on A5 SDA is on A4 Arduino_i2c_master.ino Arduino_i2c_slave.ino USB to computer 45

46 Code on Master Arduino Upload class12/arduino_i2c_master to Master Arduino github.com/deqingsun/prototyping-electronic-devi ces 46

47 Code on Slave Arduino Upload class12/arduino_i2c_slave to Slave Arduino github.com/deqingsun/prototyping-electronic-devi ces 47

48 What to observe After uploading code to slave Arduino, connect USB to master Arduino. Open Serial monitor. How the LED on slave blinks? How you change the blinking timing? Try to connect A0 of slave Arduino to 5V or GND. What you see? If you finish the experiment, how you connect 2 slave Arduino to one master one? 48

49 Signal Processing 49

50 Signal Processing Signal Processing - Averaging - Hysteresis - Peak detection - Envelope detection 50

51 Why we need signal processing? When getting signals from physical world, we get some noisy signal. For example, you read a sensor value or do computer vision and get location. You can do signal processing to clean signal or extract feature from signal. 51

52 When we need it FSR sensor: Noise affects ON/OFF triggering, we don t want false trigger caused by noise. 52

53 When we need it Pulse sensor: If we know position of each peak, we can calculate heart rate 53

54 When we need it Kinect: We want to know whether user waved his hand. The position of hand can be seen as an input signal. We know X,Y position of hand. What kind of change in hand position can be defined as waving? 54

55 Platform we use deqingsun.github.io/javascript-signal-processing/ Short link: bit.do/signalprocessing Open this link on phone Open this link on Laptop 55

56 UI explanation Graph of Values View of camera JS code playground 56

57 Camera view In camera view, it s looking for a magenta object in its view. You should see a green rectangle around your phone. Your phone s vertical position will be used as input, copied to global variable value_input 57

58 Graph of values global variable value_input is drawn in Red 255 global variable value_output is drawn in Blue Now Red and blue is overlapping. Value 0~255 0 Time 58

59 Code Playground This is the place you can write code to do signal processing. Code in this box will be executed every frame. After finishing coding, click Apply code. If there is no syntax error, your code will be applied to graph. Otherwise you will see the error message. Try to type: value_output=255-value_input; 59

60 Use a new variable In Javascript if we read a variable before we create it, we will get an error. if(typeof new_var === 'undefined'){ new_var=0; Create a variable and assign a new value }; Is this variable not created yet? 60

61 Algorithm 61

62 What if we need a smoother signal? We get a noisy signal, how to clean it? 62

63 Average Filtering 63

64 Average Let refresh what is averaging. We basically add a few values together and divide the sum with count of the values. 64

65 Average Filtering (smoothing) To smooth of a signal, we don t average all data points. We take each sample points and average them with a few values before it. The spikes are suppressed and the signal become much more smooth. 65

66 How to average a streaming signal We store N recent values and calculate their average. We can create a queue of certain length to store recent data points from stream. New data will be added and old data will be discarded. 66

67 Use ring buffer to keep data In real application, shift values in array may takes a long time. We can treat an array as ring buffer. New data will overwrite old data automatically. 67

68 Live demo Try this code in browser and play with it. 68

69 Code //average filtering if(typeof data_filter === 'undefined'){ //We need to initialize variable before we use them data_filter=[0,0,0,0,0,0,0,0]; }; if(typeof data_pointer === 'undefined'){ data_pointer=0; }; data_filter[data_pointer]=value_input; //store previous values into array data_pointer++; if (data_pointer==8) data_pointer=0; sum=0; for (i=0;i<8;i++){ //get average value from array sum+=data_filter[i]; } value_output=sum/8; 69

70 Trade off of queue length if(typeof data_filter === 'undefined'){ //We need to initialize variable before we use them data_filter=[0,0,0,0,0,0,0,0]; }; if (data_pointer==8) data_pointer=0; Too short: not enough to smooth noise (demo) Too long: desired signal will be smoothed (demo) You may want to do some experiment on how long queue you are going to use. 70

71 Try different queue length 5 Mins 71

72 What if we need a threshold on a noisy signal How we void jumping result caused by noise? 72

73 Hysteresis 73

74 Hysteresis in comparator When trying to convert a signal to boolean values, we may get unwanted transition due to noisy signal. 74

75 Live demo of a simple comparator Noise introduces glitches. //Direct Comparison if (value_input>(128)){ value_output=255; }else{ value_output=0; } 75

76 How to solve the problem Using 2 different threshold! 76

77 Live demo 77

78 Code to do threshold if(typeof value_was_above_threshold === 'undefined'){ if (value_input>value_threshold){ value_was_above_threshold=true; //We need to initialize variable before we use them }else{ value_was_above_threshold=false; value_was_above_threshold=false; }; } if (value_was_above_threshold){ if (value_was_above_threshold){ value_output=255; value_threshold=128-5; }else{ }else{ value_output=0; value_threshold=128+5; } } 78

79 Try bigger and smaller Hysteresis 5 Mins 79

80 We need heartrate from heartbeat signal How we know when is heartbeat? 80

81 Peak detection 81

82 Peak detection What is a peak: A point higher than previous value and next value. 82

83 Live demo 83

84 Code to do peak detection (Simple) if(typeof previous_frame_data === 'undefined'){ //We need to initialize variable before we use them previous_frame_data=0; }; if(typeof two_frame_ago_data === 'undefined'){ //We need to initialize variable before we use them two_frame_ago_data=0; }; if (value_input<previous_frame_data && two_frame_ago_data<previous_frame_data){ //the Y axis is pointing downward this this example value_output=255; }else{ value_output=0; } two_frame_ago_data=previous_frame_data; previous_frame_data=value_input; //push new data and discard old ones. 84

85 Try to modify code to valley detection 5 Mins 85

86 Improved Peak Detection You may miss some peaks if you just compare 3 points. A better way to do peak detection is to check if signal has changed its trend. 86

87 Improved Peak Detection When algorithm is looking for peak, it will record highest value since last valley point. Once current value is lower than highest value by delta, then we found a peak. Signal decreased from highest point by delta Then we look for valley in opposite way until we find it Looking for Peak Looking for Valley Signal increased from lowest point by delta 87

88 Adjust sensitivity of algorithm You can change delta to change sensitivity of the algorithm Delta = 3 A bigger delta will be more resistant to noise, at the cost of latency. Delta = 30 88

89 Try better peak detection Try the code and change delta. 5 Mins 89

90 Envelope detection 90

91 How we know a person is waving hand? 91

92 What is envelope Envelope function is a smooth curve outlining its extremes. 92

93 Hand movement and Envelope If you hand hold still and them move up and down, the difference of upper and lower envelope will increase. So you can use difference of upper and lower envelope to figure out if you hand is waving or still. Upper Envelope Lower Envelope 93

94 Envelope detection When we want to know the range of a changing signal we can detect it s envelop to determine it. We have a slowly decreasing value, but it will go up to signal value if it is smaller than signal 94

95 Live demo 95

96 Code to do Envelop detection //envelop detection lower if (value_input<value_output){ value_output=value_input; }else{ value_output+=0.5; } //envelop detection upper if (value_input>value_output2){ value_output2=value_input; }else{ value_output2-=0.5; } 96

97 Change decrease speed of envelope 5 Mins 97

98 Wrap Up

99 Next class We will discuss: Design a case for PCB Bluetooth low energy Please bring: A Computer with Chrome installed A ios device supports BLE and you can install app 99

Parallel Data Transfer. Suppose you need to transfer data from one HCS12 to another. How can you do this?

Parallel Data Transfer. Suppose you need to transfer data from one HCS12 to another. How can you do this? Introduction the Serial Communications Huang Sections 9.2, 10.2, 11.2 SCI Block User Guide SPI Block User Guide IIC Block User Guide o Parallel vs Serial Communication o Synchronous and Asynchronous Serial

More information

Introduction the Serial Communications Parallel Communications Parallel Communications with Handshaking Serial Communications

Introduction the Serial Communications Parallel Communications Parallel Communications with Handshaking Serial Communications Introduction the Serial Communications Parallel Communications Parallel Communications with Handshaking Serial Communications o Asynchronous Serial (SCI, RS-232) o Synchronous Serial (SPI, IIC) The MC9S12

More information

Interfacing Techniques in Embedded Systems

Interfacing Techniques in Embedded Systems Interfacing Techniques in Embedded Systems Hassan M. Bayram Training & Development Department training@uruktech.com www.uruktech.com Introduction Serial and Parallel Communication Serial Vs. Parallel Asynchronous

More information

ARDUINO YÚN Code: A000008

ARDUINO YÚN Code: A000008 ARDUINO YÚN Code: A000008 Arduino YÚN is the perfect board to use when designing connected devices and, more in general, Internet of Things projects. It combines the power of Linux with the ease of use

More information

Lecture 25 March 23, 2012 Introduction to Serial Communications

Lecture 25 March 23, 2012 Introduction to Serial Communications Lecture 25 March 23, 2012 Introduction to Serial Communications Parallel Communications Parallel Communications with Handshaking Serial Communications Asynchronous Serial (e.g., SCI, RS-232) Synchronous

More information

I2C a learn.sparkfun.com tutorial

I2C a learn.sparkfun.com tutorial I2C a learn.sparkfun.com tutorial Available online at: http://sfe.io/t82 Contents Introduction Why Use I2C? I2C at the Hardware Level Protocol Resources and Going Further Introduction In this tutorial,

More information

Embedded Workshop 10/28/15 Rusty Cain

Embedded Workshop 10/28/15 Rusty Cain 2 IC Embedded Workshop 10/28/15 Rusty Cain Set up for Workshop: Please Sign in on Sheet. Please include your email. While you are waiting for the Workshop to begin 1. Make sure you are connected to the

More information

Embedded Systems and Software. Serial Interconnect Buses I 2 C (SMB) and SPI

Embedded Systems and Software. Serial Interconnect Buses I 2 C (SMB) and SPI Embedded Systems and Software Serial Interconnect Buses I 2 C (SMB) and SPI I2C, SPI, etc. Slide 1 Provide low-cost i.e., low wire/pin count connection between IC devices There are many of serial bus standards

More information

Laboratory 5 Communication Interfaces

Laboratory 5 Communication Interfaces Laboratory 5 Communication Interfaces Embedded electronics refers to the interconnection of circuits (micro-processors or other integrated circuits) with the goal of creating a unified system. In order

More information

Digital Circuits Part 2 - Communication

Digital Circuits Part 2 - Communication Introductory Medical Device Prototyping Digital Circuits Part 2 - Communication, http://saliterman.umn.edu/ Department of Biomedical Engineering, University of Minnesota Topics Microcontrollers Memory

More information

AK-DS2482S-100. Reference manual. Copyright 2016 Artekit Italy All rights reserved

AK-DS2482S-100. Reference manual. Copyright 2016 Artekit Italy All rights reserved AK-DS2482S-100 Reference manual Copyright 2016 Artekit Italy All rights reserved Contents About this document... 3 Revision history... 3 Contact information... 3 Life support policy... 3 Copyright information...

More information

ARDUINO LEONARDO ETH Code: A000022

ARDUINO LEONARDO ETH Code: A000022 ARDUINO LEONARDO ETH Code: A000022 All the fun of a Leonardo, plus an Ethernet port to extend your project to the IoT world. You can control sensors and actuators via the internet as a client or server.

More information

Growing Together Globally Serial Communication Design In Embedded System

Growing Together Globally Serial Communication Design In Embedded System Growing Together Globally Serial Communication Design In Embedded System Contents Serial communication introduction......... 01 The advantages of serial design......... 02 RS232 interface......... 04 RS422

More information

HZX N03 Bluetooth 4.0 Low Energy Module Datasheet

HZX N03 Bluetooth 4.0 Low Energy Module Datasheet HZX-51822-16N03 Bluetooth 4.0 Low Energy Module Datasheet SHEN ZHEN HUAZHIXIN TECHNOLOGY LTD 2017.7 NAME : Bluetooth 4.0 Low Energy Module MODEL NO. : HZX-51822-16N03 VERSION : V1.0 1.Revision History

More information

SILICON MICROSTRUCTURES

SILICON MICROSTRUCTURES Digital Communication with SM5800 Series Parts OVERVIEW The SM5800 series pressure product offers the corrected pressure output in both analog and digital formats. Accessing the analog output is an easy

More information

keyestudio Keyestudio MEGA 2560 R3 Board

keyestudio Keyestudio MEGA 2560 R3 Board Keyestudio MEGA 2560 R3 Board Introduction: Keyestudio Mega 2560 R3 is a microcontroller board based on the ATMEGA2560-16AU, fully compatible with ARDUINO MEGA 2560 REV3. It has 54 digital input/output

More information

Prototyping Module Datasheet

Prototyping Module Datasheet Prototyping Module Datasheet Part Numbers: MPROTO100 rev 002 Zenseio LLC Updated: September 2016 Table of Contents Table of Contents Functional description PROTOTYPING MODULE OVERVIEW FEATURES BLOCK DIAGRAM

More information

Debounced 8 8 Key-Scan Controller

Debounced 8 8 Key-Scan Controller Debounced 8 8 Key-Scan Controller Description The SN7326 is a 64 key, key-scan controller. It offloads the burden of keyboard scanning from the host processor. The SN7326 supports keypad matrix of up to

More information

ARDUINO YÚN MINI Code: A000108

ARDUINO YÚN MINI Code: A000108 ARDUINO YÚN MINI Code: A000108 The Arduino Yún Mini is a compact version of the Arduino YUN OVERVIEW: Arduino Yún Mini is a breadboard PCB developed with ATmega 32u4 MCU and QCA MIPS 24K SoC CPU operating

More information

Copyright. Getting Started with Arduino Wiring for Windows 10 IoT Core Agus Kurniawan 1st Edition, Copyright 2016 Agus Kurniawan

Copyright. Getting Started with Arduino Wiring for Windows 10 IoT Core Agus Kurniawan 1st Edition, Copyright 2016 Agus Kurniawan Copyright Getting Started with Arduino Wiring for Windows 10 IoT Core Agus Kurniawan 1st Edition, 2016 Copyright 2016 Agus Kurniawan ** Windows 10 IoT Core, Visual Studio and Logo are trademark and copyright

More information

Amarjeet Singh. January 30, 2012

Amarjeet Singh. January 30, 2012 Amarjeet Singh January 30, 2012 Website updated - https://sites.google.com/a/iiitd.ac.in/emsys2012/ Lecture slides, audio from last class Assignment-2 How many of you have already finished it? Final deadline

More information

I2CMux Grove Board 0057-GRV4I2CMux-DSBT/ SF

I2CMux Grove Board 0057-GRV4I2CMux-DSBT/ SF Features and Benefits: The is an easy to use 4 Channel I2C Multiplexer. The I2C Mux Breakout Board is a quad bidirectional translating switch controlled via the I2C bus. The SCL/SDA controlling fans out

More information

Introduction to I2C & SPI. Chapter 22

Introduction to I2C & SPI. Chapter 22 Introduction to I2C & SPI Chapter 22 Issues with Asynch. Communication Protocols Asynchronous Communications Devices must agree ahead of time on a data rate The two devices must also have clocks that are

More information

I2C a learn.sparkfun.com tutorial

I2C a learn.sparkfun.com tutorial I2C a learn.sparkfun.com tutorial Available online at: http://sfe.io/t82 Contents Introduction Why Use I2C? I2C at the Hardware Level Protocol Resources and Going Further Introduction In this tutorial,

More information

Universität Dortmund. IO and Peripheral Interfaces

Universität Dortmund. IO and Peripheral Interfaces IO and Peripheral Interfaces Microcontroller System Architecture Each MCU (micro-controller unit) is characterized by: Microprocessor 8,16,32 bit architecture Usually simple in-order microarchitecture,

More information

ARDUINO LEONARDO WITH HEADERS Code: A000057

ARDUINO LEONARDO WITH HEADERS Code: A000057 ARDUINO LEONARDO WITH HEADERS Code: A000057 Similar to an Arduino UNO, can be recognized by computer as a mouse or keyboard. The Arduino Leonardo is a microcontroller board based on the ATmega32u4 (datasheet).

More information

Part 1 Using Serial EEPROMs

Part 1 Using Serial EEPROMs Part 1 Using Serial EEPROMs copyright 1997, 1999 by Jan Axelson If you have a project that needs a modest amount of nonvolatile, read/write memory, serial EEPROM may be the answer. These tiny and inexpensive

More information

ARDUINO MICRO WITHOUT HEADERS Code: A000093

ARDUINO MICRO WITHOUT HEADERS Code: A000093 ARDUINO MICRO WITHOUT HEADERS Code: A000093 Arduino Micro is the smallest board of the family, easy to integrate it in everyday objects to make them interactive. The Micro is based on the ATmega32U4 microcontroller

More information

I2C interface Tutorial

I2C interface Tutorial UG108: Praxis II January 2013 Asian Institute of Technology Undergraduate Program Handout: I2C interface Instructor: Chaiyaporn Silawatchananai, Matthew N. Dailey I2C interface Tutorial Introduction: In

More information

Basics of UART Communication

Basics of UART Communication Basics of UART Communication From: Circuit Basics UART stands for Universal Asynchronous Receiver/Transmitter. It s not a communication protocol like SPI and I2C, but a physical circuit in a microcontroller,

More information

Raspberry Pi - I/O Interfaces

Raspberry Pi - I/O Interfaces ECE 1160/2160 Embedded Systems Design Raspberry Pi - I/O Interfaces Wei Gao ECE 1160/2160 Embedded Systems Design 1 I/O Interfaces Parallel I/O and Serial I/O Parallel I/O: multiple input/output simultaneously

More information

USER MANUAL ARDUINO I/O EXPANSION SHIELD

USER MANUAL ARDUINO I/O EXPANSION SHIELD USER MANUAL ARDUINO I/O EXPANSION SHIELD Description: Sometimes Arduino Uno users run short of pins because there s a lot of projects that requires more than 20 signal pins. The only option they are left

More information

Getting to know the Arduino IDE

Getting to know the Arduino IDE Getting to know the Arduino IDE I ve heard about Arduino, what the heck is it? Arduino is a development environment Combination of hardware and software Hardware based on Atmel AVR processors Software

More information

ECE Microcontrollers. Serial Peripheral Interface (SPI) & NRF24 Radio

ECE Microcontrollers. Serial Peripheral Interface (SPI) & NRF24 Radio ECE 381 - Microcontrollers Serial Peripheral Interface (SPI) & NRF24 Radio Lab 9 Summary We will develop a wireless temperature sensor Once a second, sample LM34CZ voltage Convert to floating point with

More information

How to Use an Arduino

How to Use an Arduino How to Use an Arduino By Vivian Law Introduction The first microcontroller, TMS-1802-NC, was built in 1971 by Texas Instruments. It owed its existence to the innovation and versatility of silicon and the

More information

Architecture of Computers and Parallel Systems Part 6: Microcomputers

Architecture of Computers and Parallel Systems Part 6: Microcomputers Architecture of Computers and Parallel Systems Part 6: Microcomputers Ing. Petr Olivka petr.olivka@vsb.cz Department of Computer Science FEI VSB-TUO Architecture of Computers and Parallel Systems Part

More information

RS485 3 click. How does it work? PID: MIKROE-2821

RS485 3 click. How does it work? PID: MIKROE-2821 RS485 3 click PID: MIKROE-2821 RS485 3 click is an RS422/485 transceiver Click board, which can be used as an interface between the TTL level UART and the RS422/485 communication bus. It features a full-duplex

More information

SN8200 LI+ DUAL BATTERY CONTROLLER

SN8200 LI+ DUAL BATTERY CONTROLLER LI+ DUAL BATTERY CONTROLLER GENERAL DESCRIPTION The SN8200 is a highly integrated IC to serve as the control logic for a system with multiple power sources. It integrates a mini-charger s path power MOS

More information

Manual iaq-engine Indoor Air Quality sensor

Manual iaq-engine Indoor Air Quality sensor Manual iaq-engine, Version 2.0 May 2011 (all data subject to change without notice) Manual iaq-engine Indoor Air Quality sensor Digital and analog I/O SMD type package Product summary iaq-engine is used

More information

Microcontrollers and Interfacing

Microcontrollers and Interfacing Microcontrollers and Interfacing Week 10 Serial communication with devices: Serial Peripheral Interconnect (SPI) and Inter-Integrated Circuit (I 2 C) protocols College of Information Science and Engineering

More information

1.3inch OLED User Manual

1.3inch OLED User Manual 1.3inch OLED User Manual 1. Key Parameters Table 1: Key Parameters Driver Chip SH1106 Interface 3-wire SPI 4-wire SPI I2C Resolution 128*64 Display Size 1.3 inch Dimension 29mm*33mm Colors Yellow, Blue

More information

or between microcontrollers)

or between microcontrollers) : Communication Interfaces in Embedded Systems (e.g., to interface with sensors and actuators or between microcontrollers) Spring 2016 : Communication Interfaces in Embedded Systems Spring (e.g., 2016

More information

mi:node User Manual Element14 element14.com/minode 1 User Manual V3.1

mi:node User Manual Element14 element14.com/minode 1 User Manual V3.1 mi:node User Manual Element14 element14.com/minode 1 Table of Contents 1) Introduction... 3 1.1 Overview... 3 1.2 Features... 3 1.3 Kit Contents... 3 2) Getting Started... 5 2.1 The Connector Board...

More information

Digital Circuits 7: MCUs... how do they work?

Digital Circuits 7: MCUs... how do they work? Digital Circuits 7: MCUs... how do they work? Created by Dave Astels Last updated on 2018-06-30 03:57:53 AM UTC Guide Contents Guide Contents Overview The building blocks CPU Memory Timers/Counters Analog

More information

BASIC Arduino. Part I

BASIC Arduino. Part I BASIC Arduino Part I Objectives Introduction to Arduino Build a 1-60MHz DDS VFO prototype, breadboard and write Sketches, with Buffer amps to be designed, and PCB Using your own laptop Go on to build other

More information

USB-to-I2C. Professional Hardware User s Manual.

USB-to-I2C. Professional Hardware User s Manual. USB-to-I2C Professional Hardware User s Manual https://www.i2ctools.com/ Information provided in this document is solely for use with the USB-to-I2C Professional product from SB Solutions, Inc. SB Solutions,

More information

Manual of Board ET-ESP32 RS485

Manual of Board ET-ESP32 RS485 ET-ESP32 RS485 is a Board Microcontroller that entirely consists of basic I/O Devices and also supports additional expansion unit easily. In a part of Microcontroller on board, it uses Module ESP32 from

More information

USER MANUAL EXPERIENCE INCREDIBLE PERFORMANCE V2.3

USER MANUAL EXPERIENCE INCREDIBLE PERFORMANCE V2.3 USER MANUAL EXPERIENCE INCREDIBLE PERFORMANCE V2.3 CONTENTS 1 INTRODUCTION... 3 2 INTERFACE DESIGN... 4 2.1 Connectivity... 5 2.2 Analog Interface... 6 2.3 I 2 C Interface... 7 2.4 I 2 C Operations...

More information

Serial Peripheral Interface. What is it? Basic SPI. Capabilities. Protocol. Pros and Cons. Uses

Serial Peripheral Interface. What is it? Basic SPI. Capabilities. Protocol. Pros and Cons. Uses Serial Peripheral Interface What is it? Basic SPI Capabilities Protocol Serial Peripheral Interface http://upload.wikimedia.org/wikipedia/commons/thumb/e/ed/ SPI_single_slave.svg/350px-SPI_single_slave.svg.png

More information

ECE 1160/2160 Embedded Systems Design. Midterm Review. Wei Gao. ECE 1160/2160 Embedded Systems Design

ECE 1160/2160 Embedded Systems Design. Midterm Review. Wei Gao. ECE 1160/2160 Embedded Systems Design ECE 1160/2160 Embedded Systems Design Midterm Review Wei Gao ECE 1160/2160 Embedded Systems Design 1 Midterm Exam When: next Monday (10/16) 4:30-5:45pm Where: Benedum G26 15% of your final grade What about:

More information

Stepper 6 click. PID: MIKROE 3214 Weight: 26 g

Stepper 6 click. PID: MIKROE 3214 Weight: 26 g Stepper 6 click PID: MIKROE 3214 Weight: 26 g Stepper 6 click is the complete integrated bipolar step motor driver solution. It comes with the abundance of features that allow silent operation and optimal

More information

Arduino Uno. Arduino Uno R3 Front. Arduino Uno R2 Front

Arduino Uno. Arduino Uno R3 Front. Arduino Uno R2 Front Arduino Uno Arduino Uno R3 Front Arduino Uno R2 Front Arduino Uno SMD Arduino Uno R3 Back Arduino Uno Front Arduino Uno Back Overview The Arduino Uno is a microcontroller board based on the ATmega328 (datasheet).

More information

DESIGNING OF INTER INTEGRATED CIRCUIT USING VERILOG

DESIGNING OF INTER INTEGRATED CIRCUIT USING VERILOG DESIGNING OF INTER INTEGRATED CIRCUIT USING VERILOG DISHA MALIK Masters of Technology Scholar, Department of Electronics & Communication Engineering, Jayoti Vidyapeeth Women s University, Jaipur INDIA

More information

ADC to I 2 C. Data Sheet. 10 Channel Analog to Digital Converter. with output via I 2 C

ADC to I 2 C. Data Sheet. 10 Channel Analog to Digital Converter. with output via I 2 C Data Sheet 10 Channel Analog to Digital Converter with output via I 2 C Introduction Many microcontroller projects involve the use of sensors like Accelerometers, Gyroscopes, Temperature, Compass, Barometric,

More information

EECS 373 Design of Microprocessor-Based Systems

EECS 373 Design of Microprocessor-Based Systems EECS 373 Design of Microprocessor-Based Systems Mark Brehob University of Michigan Timers Material taken from Dreslinski, Dutta, Le, Ramadas, Smith, Tikhonov & Mahal 1 Agenda A bit on timers Project overview

More information

EZ-Bv4 Datasheet v0.7

EZ-Bv4 Datasheet v0.7 EZ-Bv4 Datasheet v0.7 Table of Contents Introduction... 2 Electrical Characteristics... 3 Regulated and Unregulated Power Pins... 4 Low Battery Warning... 4 Hardware Features Main CPU... 5 Fuse Protection...

More information

Design and development of embedded systems for the Internet of Things (IoT) Fabio Angeletti Fabrizio Gattuso

Design and development of embedded systems for the Internet of Things (IoT) Fabio Angeletti Fabrizio Gattuso Design and development of embedded systems for the Internet of Things (IoT) Fabio Angeletti Fabrizio Gattuso Microcontroller It is essentially a small computer on a chip Like any computer, it has memory,

More information

Arduino Uno R3 INTRODUCTION

Arduino Uno R3 INTRODUCTION Arduino Uno R3 INTRODUCTION Arduino is used for building different types of electronic circuits easily using of both a physical programmable circuit board usually microcontroller and piece of code running

More information

Color 7 click. PID: MIKROE 3062 Weight: 19 g

Color 7 click. PID: MIKROE 3062 Weight: 19 g Color 7 click PID: MIKROE 3062 Weight: 19 g Color 7 click is a very accurate color sensing Click board which features the TCS3472 color light to digital converter with IR filter, from ams. It contains

More information

Preliminary Data MOS IC. Type Ordering Code Package SDA Q67100-H5092 P-DIP-8-1

Preliminary Data MOS IC. Type Ordering Code Package SDA Q67100-H5092 P-DIP-8-1 Nonvolatile Memory 1-Kbit E 2 PROM SDA 2516-5 Preliminary Data MOS IC Features Word-organized reprogrammable nonvolatile memory in n-channel floating-gate technology (E 2 PROM) 128 8-bit organization Supply

More information

EK307 Lab: Microcontrollers

EK307 Lab: Microcontrollers EK307 Lab: Microcontrollers Laboratory Goal: Program a microcontroller to perform a variety of digital tasks. Learning Objectives: Learn how to program and use the Atmega 323 microcontroller Suggested

More information

Pedometer 3 Click. PID: MIKROE 3259 Weight: 24 g

Pedometer 3 Click. PID: MIKROE 3259 Weight: 24 g Pedometer 3 Click PID: MIKROE 3259 Weight: 24 g The Pedometer 3 click is a tri-axis acceleration sensing Click board utilizing the KX126-1063. An advanced three-axis acceleration sensor, the KX126-1063

More information

Buses. Disks PCI RDRAM RDRAM LAN. Some slides adapted from lecture by David Culler. Pentium 4 Processor. Memory Controller Hub.

Buses. Disks PCI RDRAM RDRAM LAN. Some slides adapted from lecture by David Culler. Pentium 4 Processor. Memory Controller Hub. es > 100 MB/sec Pentium 4 Processor L1 and L2 caches Some slides adapted from lecture by David Culler 3.2 GB/sec Display Memory Controller Hub RDRAM RDRAM Dual Ultra ATA/100 24 Mbit/sec Disks LAN I/O Controller

More information

Fully Integrated Thermal Accelerometer MXC6225XU

Fully Integrated Thermal Accelerometer MXC6225XU Powerful Sensing Solutions for a Better Life Fully Integrated Thermal Accelerometer MXC6225XU Document Version 1.0 page 1 Features General Description Fully Integrated Thermal Accelerometer X/Y Axis, 8

More information

Today. Last Time. Motivation. CAN Bus. More about CAN. What is CAN?

Today. Last Time. Motivation. CAN Bus. More about CAN. What is CAN? Embedded networks Characteristics Requirements Simple embedded LANs Bit banged SPI I2C LIN Ethernet Last Time CAN Bus Intro Low-level stuff Frame types Arbitration Filtering Higher-level protocols Today

More information

Winford Engineering ETH32 Protocol Reference

Winford Engineering ETH32 Protocol Reference Winford Engineering ETH32 Protocol Reference Table of Contents 1 1 Overview 1 Connection 1 General Structure 2 Communications Summary 2 Port Numbers 4 No-reply Commands 4 Set Port Value 4 Set Port Direction

More information

University of Hull Department of Computer Science C4DI Interfacing with Arduinos

University of Hull Department of Computer Science C4DI Interfacing with Arduinos Introduction Welcome to our Arduino hardware sessions. University of Hull Department of Computer Science C4DI Interfacing with Arduinos Vsn. 1.0 Rob Miles 2014 Please follow the instructions carefully.

More information

Display Real Time Clock (RTC) On LCD. Version 1.2. Aug Cytron Technologies Sdn. Bhd.

Display Real Time Clock (RTC) On LCD. Version 1.2. Aug Cytron Technologies Sdn. Bhd. Display Real Time Clock (RTC) On LCD PR12 Version 1.2 Aug 2008 Cytron Technologies Sdn. Bhd. Information contained in this publication regarding device applications and the like is intended through suggestion

More information

Pmod modules are powered by the host via the interface s power and ground pins.

Pmod modules are powered by the host via the interface s power and ground pins. 1300 Henley Court Pullman, WA 99163 509.334.6306 www.store. digilent.com Digilent Pmod Interface Specification 1.2.0 Revised October 5, 2017 1 Introduction The Digilent Pmod interface is used to connect

More information

Serial Communication

Serial Communication Serial Communication Asynchronous communication Synchronous communication Device A TX RX RX TX Device B Device A clock data A->B data B->A Device B asynchronous no clock Data represented by setting HIGH/LOW

More information

Using Sensors with the RoboRIO

Using Sensors with the RoboRIO Using Sensors with the RoboRIO Jeff Bernardis jeff.bernardis@gmail.com David Zhang david.chao.zhang@gmail.com A copy of this presentation is available at: https://drive.google.com/file/d/1sjlpsrm8wbguehgyblcopmrnw2qsmxkf/view?usp=sharing

More information

Unbridled Raw Hex, https://hidiot.com/

Unbridled Raw Hex, https://hidiot.com/ Unbridled HIDIOcy @stevelord, Raw Hex, https://hidiot.com/ This Guy @stevelord on Twitter and Mastodon Raw Hex, 44CON, HIDIOT I like breaking and building (the Internet of) things What Is HIDIOT? Human

More information

ARDUINO MEGA 2560 REV3 Code: A000067

ARDUINO MEGA 2560 REV3 Code: A000067 ARDUINO MEGA 2560 REV3 Code: A000067 The MEGA 2560 is designed for more complex projects. With 54 digital I/O pins, 16 analog inputs and a larger space for your sketch it is the recommended board for 3D

More information

Hello, and welcome to this presentation of the STM32 I²C interface. It covers the main features of this communication interface, which is widely used

Hello, and welcome to this presentation of the STM32 I²C interface. It covers the main features of this communication interface, which is widely used Hello, and welcome to this presentation of the STM32 I²C interface. It covers the main features of this communication interface, which is widely used to connect devices such as microcontrollers, sensors,

More information

Manual iaq-core Indoor Air Quality sensor module

Manual iaq-core Indoor Air Quality sensor module Manual iaq-core Indoor Air Quality sensor module I²C interface SMD type package Reflow capable Product summary The iaq-core is used to measure VOC levels and provide CO 2 equivalent and TVOC equivalent

More information

DS1676 Total Elapsed Time Recorder, Erasable

DS1676 Total Elapsed Time Recorder, Erasable www.dalsemi.com Preliminary DS1676 Total Elapsed Time Recorder, Erasable FEATURES Records the total time that the Event Input has been active and the number of events that have occurred. Volatile Elapsed

More information

GT24C02. 2-Wire. 2Kb Serial EEPROM (Smart Card application)

GT24C02. 2-Wire. 2Kb Serial EEPROM (Smart Card application) ADVANCED GT24C02 2-Wire 2Kb Serial EEPROM (Smart Card application) www.giantec-semi.com a0 1/19 Table of Content 1 FEATURES...3 2 DESCRIPTION...4 3 PIN CONFIGURATION...5 4 PIN DESCRIPTIONS...6 5 BLOCK

More information

Device: MOD This document Version: 2. Matches module version: v4. Date: 10 May Description: Lightning and Storm Sensor

Device: MOD This document Version: 2. Matches module version: v4. Date: 10 May Description: Lightning and Storm Sensor Device: MOD-1016 This document Version: 2 Matches module version: v4 Date: 10 May 2013 Description: Lightning and Storm Sensor MOD-1016 HWv4 datasheet Page 2 Contents Introduction... 3 Features... 3 Hackability...

More information

Adafruit HMC5883L Breakout - Triple-Axis Magnetometer Compass Sensor

Adafruit HMC5883L Breakout - Triple-Axis Magnetometer Compass Sensor Adafruit HMC5883L Breakout - Triple-Axis Magnetometer Compass Sensor Created by lady ada Last updated on 2016-09-14 07:05:05 PM UTC Guide Contents Guide Contents Overview Pinouts Assembly Prepare the header

More information

MIKROPROCESORY PRO VÝKONOVÉ SYSTÉMY. Serial Data Transmission (Stručný přehled) České vysoké učení technické Fakulta elektrotechnická

MIKROPROCESORY PRO VÝKONOVÉ SYSTÉMY. Serial Data Transmission (Stručný přehled) České vysoké učení technické Fakulta elektrotechnická MIKROPROCESORY PRO VÝKONOVÉ SYSTÉMY Serial Data Transmission (Stručný přehled) České vysoké učení technické Fakulta elektrotechnická Ver.1.10 J. Zděnek, 2017 Serial data transfer - principle Serial data

More information

TANGIBLE MEDIA & PHYSICAL COMPUTING MORE ARDUINO

TANGIBLE MEDIA & PHYSICAL COMPUTING MORE ARDUINO TANGIBLE MEDIA & PHYSICAL COMPUTING MORE ARDUINO AGENDA RECAP ALGORITHMIC APPROACHES TIMERS RECAP: LAST WEEK WE DID: ARDUINO IDE INTRO MAKE SURE BOARD AND USB PORT SELECTED UPLOAD PROCESS COVERED DATATYPES

More information

USING LOW COST, NON-VOLATILE PLDs IN SYSTEM APPLICATIONS

USING LOW COST, NON-VOLATILE PLDs IN SYSTEM APPLICATIONS USING LOW COST, NON-VOLATILE PLDs IN SYSTEM APPLICATIONS November 2010 Lattice Semiconductor 5555 Northeast Moore Ct. Hillsboro, Oregon 97124 USA Telephone: (503) 268-8000 www.latticesemi.com 1 Using Low

More information

USB-to-I2C. Ultra Hardware User s Manual.

USB-to-I2C. Ultra Hardware User s Manual. USB-to-I2C Ultra Hardware User s Manual https://www.i2ctools.com/ Information provided in this document is solely for use with the USB-to-I2C Ultra product from SB Solutions, Inc. SB Solutions, Inc. reserves

More information

Lesson I2C. I²C (Inter-Integrated Circuit) Lab Assignment: I2C Slave Driver

Lesson I2C. I²C (Inter-Integrated Circuit) Lab Assignment: I2C Slave Driver Lesson I2C I²C (Inter-Integrated Circuit) Lab Assignment: I2C Slave Driver I²C (Inter-Integrated Circuit) What is I 2 C I2C is pronounced "eye-squared see". It is also known as "TWI" because of the initial

More information

Last Class: Clock Synchronization. Today: More Canonical Problems

Last Class: Clock Synchronization. Today: More Canonical Problems Last Class: Clock Synchronization Logical clocks Vector clocks Global state Lecture 11, page 1 Today: More Canonical Problems Distributed snapshot and termination detection Election algorithms Bully algorithm

More information

ARDUINO INDUSTRIAL 1 01 Code: A000126

ARDUINO INDUSTRIAL 1 01 Code: A000126 ARDUINO INDUSTRIAL 1 01 Code: A000126 The Industrial 101 is a small form-factor YUN designed for product integration. OVERVIEW: Arduino Industrial 101 is an Evaluation board for Arduino 101 LGA module.

More information

User-configurable Resolution. 9 to 12 bits (0.5 C to C)

User-configurable Resolution. 9 to 12 bits (0.5 C to C) AT30TS75A 9- to 12-bit Selectable, ±0.5 C Accurate Digital Temperature Sensor DATASHEET See Errata in Section 12. Features Single 1.7V to 5.5V Supply Measures Temperature -55 C to +125 C Highly Accurate

More information

Elchin Mammadov. Overview of Communication Systems

Elchin Mammadov. Overview of Communication Systems Overview of Communication Systems About Me Studying towards the Masters of Applied Science in Electrical and Computer Engineering. My research area is about implementing a communication framework (software

More information

By: Haron Abdel-Raziq

By: Haron Abdel-Raziq By: Haron Abdel-Raziq We noticed the struggle with Lab 2 Lab 2 is now due on October 5 th Milestone 2 is Due on October 12 th Next week (Monday) there is an FPGA lecture Will be given by Professor Bruce

More information

Win-I2CUSB Hardware User s Manual

Win-I2CUSB Hardware User s Manual Win-I2CUSB Hardware User s Manual http://www.demoboard.com Information provided in this document is solely for use with the Win-I2CUSB product from The Boardshop. The Boardshop and SB Solutions, Inc. reserve

More information

Serial Communication. Spring, 2018 Prof. Jungkeun Park

Serial Communication. Spring, 2018 Prof. Jungkeun Park Serial Communication Spring, 2018 Prof. Jungkeun Park Serial Communication Serial communication Transfer of data over a single wire for each direction (send / receive) Process of sending data one bit at

More information

Light Sensor. Overview. Features

Light Sensor. Overview. Features 1 Light Sensor Overview What is an electronic brick? An electronic brick is an electronic module which can be assembled like Lego bricks simply by plugging in and pulling out. Compared to traditional universal

More information

SECOND EDITION. Arduino Cookbook. Michael Margolis O'REILLY- Tokyo. Farnham Koln Sebastopol. Cambridge. Beijing

SECOND EDITION. Arduino Cookbook. Michael Margolis O'REILLY- Tokyo. Farnham Koln Sebastopol. Cambridge. Beijing SECOND EDITION Arduino Cookbook Michael Margolis Beijing Cambridge Farnham Koln Sebastopol O'REILLY- Tokyo Table of Contents Preface xi 1. Getting Started 1 1.1 Installing the Integrated Development Environment

More information

AN-1025 APPLICATION NOTE

AN-1025 APPLICATION NOTE APPLICATION NOTE One Technology Way PO Box 9106 Norwood, MA 02062-9106, USA Tel: 7813294700 Fax: 7814613113 wwwanalogcom Utilization of the First In, First Out (FIFO) Buffer in Analog Devices, Inc Digital

More information

KNJN I2C bus development boards

KNJN I2C bus development boards KNJN I2C bus development boards 2005, 2006, 2007, 2008 KNJN LLC http://www.knjn.com/ Document last revision on December 5, 2008 R22 KNJN I2C bus development boards Page 1 Table of Contents 1 The I2C bus...4

More information

Lab 4: Interrupts and Realtime

Lab 4: Interrupts and Realtime Lab 4: Interrupts and Realtime Overview At this point, we have learned the basics of how to write kernel driver module, and we wrote a driver kernel module for the LCD+shift register. Writing kernel driver

More information

Lecture 5: Computing Platforms. Asbjørn Djupdal ARM Norway, IDI NTNU 2013 TDT

Lecture 5: Computing Platforms. Asbjørn Djupdal ARM Norway, IDI NTNU 2013 TDT 1 Lecture 5: Computing Platforms Asbjørn Djupdal ARM Norway, IDI NTNU 2013 2 Lecture overview Bus based systems Timing diagrams Bus protocols Various busses Basic I/O devices RAM Custom logic FPGA Debug

More information

Grove Lightning Detector 0219-MOD1016G-01

Grove Lightning Detector 0219-MOD1016G-01 Features and Benefits: The is an Arduino and Raspberry Pi Grove compatible breakout board with a full set of connectors. No external antennas required! It is designed for use in Low Power applications

More information

Microcontrollers and Interfacing week 10 exercises

Microcontrollers and Interfacing week 10 exercises 1 SERIAL PERIPHERAL INTERFACE (SPI) HARDWARE Microcontrollers and Interfacing week 10 exercises 1 Serial Peripheral Interface (SPI) hardware Complex devices (persistent memory and flash memory cards, D/A

More information

Building and using JasperMIDI

Building and using JasperMIDI Building and using JasperMIDI Table of Contents Introduction... Bill Of Materials... 2 Building Choices... 3 Construction... 4 Installing in a Jasper enclosure... 5 Standalone use... 6 Using JasperMIDI...

More information