Upload
hoanganh
View
221
Download
5
Embed Size (px)
Citation preview
PUE-w16 1
Realizacja systemów wbudowanych (embeded systems) w strukturach PSoC (Programmable System on Chip)
Embeded systems
Architektura układów PSoC (Cypress)
Możliwości bloków cyfrowych i analogowych
Narzędzia programistyczno-uruchomieniowe
Wykorzystano materiały firmy Cypress
PUE-w16 2
Ogólna struktura układów PSoC (Cypress)
PUE-w16 3
Ogólna struktura układów PSoC (Cypress)
PUE-w16 4
Obudowy, końcówki
PUE-w16 5
Charakterystyka grup układów PSoC
PUE-w16 6
Zasoby systemowe układów PSoC
PUE-w16 7
Switch-mode Pump (przekształtnik podwyższający)
PUE-w16 8
Schemat systemu cyfrowego
PUE-w16 9
Możliwości konfiguracyjne bloków cyfrowych
PWMs (8 to 32 bit)
PWMs with Dead band (8 to 24 bit)
Counters (8 to 32 bit)
Timers (8 to 32 bit)
UART 8 bit with selectable parity
SPI master and slave
I2C slave, master, multi-master (1 available as a System Resource)
Cyclical Redundancy Checker/Generator (8 to 32 bit)
IrDA (up to 4)
Pseudo Random Sequence Generators (8 to 32 bit)
PUE-w16 10
Blok cyfrowy
PUE-w16 11
Organizacja części analogowej
PUE-w16 12
Organizacja części analogowej
PUE-w16 13
Blok analogowy ciągły
PUE-w16 14
Blok analogowy SC
PUE-w16 15
Wzmacniacz pomiarowy z 2 bloków ciągłych
PUE-w16 16
Wzmacniacz pomiarowy z bloków ciągłych i SC
PUE-w16 17
(regulator wentylatora)
PUE-w16 18
Narzędzia projektowe: PSoC Designer
PUE-w16 19
Narzędzia projektowe: PSoC Express
PUE-w16 20
PSoC Express : podstawowe pojęcia
Key Concepts
Drivers: Input and output drivers ....encapsulate the parameters and behavior
of various input and output devices... . Interface drivers allow your design to
communicate with an external device (currently via I2C) to implement control or
status functionality.
Valuators: Valuator elements provide the means to internally store data values.
Valuators also enable the design to convert a value from one type to another or
perform almost any intermediate processing or conditioning of data within a
PSoC design. A valuator is often used between an input and an output driver
to implement the desired behavioral logic.
Transfer Functions: ... In PSoC Express we use this term to refer to the
behavioral definition of an element that has an output. A transfer function
defines the output value of the associated design element based on the state
of other elements in the design and the type of transfer function selected.
Output drivers and valuators have an associated transfer function that defines
their behavior.
PUE-w16 21
PSoC Express : wysoki poziom abstrakcji
A central advantage of the PSoC Express design philosophy is that of hardware
abstraction; ... The PSoC Express input and output drivers handle the details of the
hardware allowing you to concentrate on the behavioral design of your project. Let’s look
at how this abstraction works with respect to a simple pushbutton...What does “On”
mean in our design, and how we will represent it?
1. Pressed (on) always means logic “0.” (?)
2. Pressed always means logic “1.” (?)
3. It doesn’t matter. (?)
The correct answer is 3, because whenever we use the pushbutton in our design, we
always use the symbolic states “On” and “Off.” The actual electrical state of the hardware
is translated into the symbolic state by the device driver (not by us). In both cases (1 or
2) the same behavioral definition for the LED can apply, specifically:
if (Input1 state is On)
then (set LED state to On)
else (set LED state to Off)
Conclusion: the drivers handle the hardware details and designs become easier to create,
verify, and re-use.
PUE-w16 22
PSoC Express : prosty przykład
First Example: Pushbutton and LED
Objectives
ƒ Select and place one input and one output driver in a design.
ƒ Demonstrate using a transfer function to determine the behavior of an output
based on the state of an input.
ƒ Use the built-in PSoC Express simulation mode to test the design
.
Design Elements
ƒ Input Driver - Pushbutton
ƒ Output Driver - LED (On/Off)
ƒ Transfer Function - Table Lookup
PUE-w16 23
PSoC Express : prosty przykład
Second Example: Potentiometer and Blinkable LED Using PriorityEncoder
Objective
ƒ Control the state of an On/Off/Blinking LED based on the position setting of
a potentiometer.
ƒ ..the creation of the logical expressions to define an output driver Priority Encoder
transfer function
ƒ Build the project – select a device, assign I/O pins and generate the HEX file
ƒ Use PSoC Programmer to program a target device.
Design Elements
ƒ Input Driver - Potentiometer
ƒ Output Driver - LED (On/Off with Blink)
ƒ Transfer Function - Priority Encoder
PUE-w16 24
PSoC Express: wejścia (przycisk,potencjometr)
PUE-w16 25
PSoC Express: wyjścia LED (On,Off; On,Off,Blink)
PUE-w16 26
PSoC Express: (przykład 1)
PUE-w16 27
PSoC Express: selectingTransfer Function
PUE-w16 28
PSoC Express: selectingTransfer Function
PUE-w16 29
PSoC Express: definingTransfer Function
PUE-w16 30
PSoC Express: defining Priority Encoder
PUE-w16 31
PSoC Express: simulation mode
PUE-w16 32
PSoC Express: wybór chipu, przypisanie końcówek
PUE-w16 33
PSoC Express: Project Builder
PUE-w16 34
PSoC Express: Programmer