Presentation is loading. Please wait.

Presentation is loading. Please wait.

Typical Microcontroller Purposes

Similar presentations


Presentation on theme: "Typical Microcontroller Purposes"— Presentation transcript:

1 Programmable System-on-Chip (PSoC) General Overview Embedded Architectures EE446

2 Typical Microcontroller Purposes
The purpose for uC’s is to interface multiple types of hardware. Digital Input/Outputs: Switches Relays LEDs Digital Communications: I2C, SPI Analog Input/Outputs Computer uC Thermal Gyro Acceleration

3 Example of Hardware Interfacing

4 Regular Microcontroller Caveats
What if you need more Analog Inputs? What if you need more Interrupts? Advanced projects: more PWMs needed? Use external circuitry Buy a larger microcontroller

5 What is a Programmable System-on-Chip (PSoC)?
A customizable microcontroller that includes flexible analog and digital logic blocks. Analog blocks: High-resolution inputs (up to 20-bit) 4 Digital-to-Analog Converters Digital logic blocks (UDBs): A wide mix of digital peripherals can be implemented into a single chip. Up to 4 voltage domains Almost all pins can be flexible in terms of being digital or analog.

6 What is a Programmable System-on-Chip (PSoC)?
(Powered by ARM Core) Provides above features plus ARM processor benefits: Up to 67Mhz Flash: Up to 256kb SRAM: Up to 65kb Up to 70 I/O pins

7 General Overview of PSoC Features

8

9 Cypress PSoC IDE API

10 Cypress PSoC IDE (Block Configuration)
Read up some of these options

11 PSoC Pin Routing

12 PSoC Main Program Code ISR Flag Main loop ISR Flag

13 API’s for the PSoC Blocks

14 API’s for the PSoC Blocks

15 Universal Digital Blocks
A UDB is a combination of uncommitted logic (PLDs), structured logic (datapath), and a flexible routing scheme. The largest PSoC contains up to 24 general-purpose digital logic subsystems (UDBs) PLD: Implements state machines and simple combinational logic. Datapath: Dynamically configurable ALU Contains Input/Output FIFOs Connects to the CPU/DMA and other UDB’s

16 Top-level UDB Block Diagram

17 Top-level UDB Routing Diagram

18 Extensive Uses of UDBs Examples of possible hardware configurations on a single (and largest) PSoC chip: 12 UARTs or 28 PWMs For a normal microcontroller, this configuration is impossible without resorting to additional external hardware, such as: Daisy-chain or bus-connected peripherals: Microcontrollers I2C/SPI-connected hardware for UART, PWM, etc.

19 Extensive Uses of UDBs Technology Mapping Summary

20 Extensive Uses of UDBs Technology Mapping Summary

21 PSoC Top-Level Analog Routing Diagram

22 PSoC Analog Routing Analog Local Bus Analog Global Bus Analog Mux Bus
4 on left side, 4 on right side Connects to analog resource blocks only No access to GPIO’s Analog Global Bus Connects I/O to analog resource blocks on same side Connects to GPIO on their respective quadrant 8 routes on left side, 8 routes on right side Analog Mux Bus Connects the buses to the ‘outside’ world Can connect to all GPIO’s and all analog resource blocks

23 PSoC Die Quadrants Analog Routing
Global Bus The analog global bus has eight routes on each side, AGL[7:0] on the left, and AGR[7:0] on the right. Within each side, the bus is divided into two groups, AGR[3:0] and AGR[7:4] for the right side, and AGL[3:0] and AGL[7:4] for the left side. The lower four globals on each side are routed to the GPIO on the lower half of the die and the upper four globals on each side are routed to the GPIO on the upper half of the die. All eight analog globals on each side get routed to ARBs on the same side

24 Detailed Analog Routing

25 Interrupts

26 Why have interrupts? An external event that needs immediate attention.
An ‘emergency’ switch A long-running timer PSoC-5 supports 16 system interrupts and 32 from peripherals. Tail Chaining (Back-to-Back) Late Arrival (Lower  Higher) Reprioritize Interrupts Same Priority? Fixed Function  DMA  UDB

27 Interrupts “Have any of you taken EE445?” Reason why you need interrupts for the hardware Some modules that are used needs immediate attention in real time.

28 Interrupt Usage Sonar UART: Servo Hardware: Motor Encoders:
Send a command every 20msec. Motor Encoders:

29 Interrupt Vector Table

30 How Interrupts Work

31 Interrupt Setup and ISR

32 Tail Chaining Interrupts

33 Late Arrival Interrupts

34 Polling vs Interrupting
Signals can happen too fast for the CPU to read or process!

35 Example PSoC Project Firmware Overview
I/O Communications Inputs From Sensors Outputs To Devices

36 Raw Sensor Data Collection to the Host PC
Digital: I2C used in Gyroscopes, Accelerometers, Magnetometers (IMU), and Temperature Sensor UART from 9600bps (8N1) For this particular usage, very inefficient. Requires interrupts and additional code complexity. Very slow data updates. ADC Settings and Inputs: 70,000 Samples Per Second (currently) Vcc = 5 Volt (Reference) Raw value range: 0v  5v 0 

37 PSoC Data Output Raw ADC Values: 85 updates/sec over Serial bps (8N1) Servo Position Infrared Gyro X-Axis Gyro Y-Axis Gyro Z-Axis Sonar (analog)

38 Host PC Application GUI


Download ppt "Typical Microcontroller Purposes"

Similar presentations


Ads by Google