Copyright © 2009. Avnet, Inc. All rights reserved.
11
Attention
The material contained in this presentation is the property of Avnet Electronics Marketing. Use of this material in it’s whole or in part is restricted to Avnet’s X-Fest program and Avnet employees. Any use by non-Avnet employees outside of the X-Fest program is prohibited.
For additional information, please contact Jim Beneke at Avnet ([email protected]).
Designing Your Product for the Human Experience
Copyright © 2009. Avnet, Inc. All rights reserved.
3What is “The Human Experience”
How do your customers interact with your product?
How do they feel while they are using your product?
..
Copyright © 2009. Avnet, Inc. All rights reserved.
4Objectives
See how the human-machine interface affects a product’s– Differentiation– Ease of use– Reliability– Cost
Learn how to start designing three popular human-machine interfaces
Show how to use a single device connected to the FPGA to enhance the human-machine interface
Copyright © 2009. Avnet, Inc. All rights reserved.
5Agenda
Trends in Human-Machine Interfaces
Human-Machine Interfaces on the Avnet Spartan-6 LX16 Evaluation Board– Touch-sensing buttons– Custom segment LCD– USB to PC
FPGA Design with Human-Machine Interfaces
Getting Started
Copyright © 2009. Avnet, Inc. All rights reserved.
6Agenda
Trends in Human-Machine Interfaces
Human-Machine Interfaces on the Avnet Spartan-6 LX16 Evaluation Board– Touch-sensing buttons– Custom segment LCD– USB to PC
FPGA Design with Human-Machine Interfaces
Getting Started
Copyright © 2009. Avnet, Inc. All rights reserved.
7Human Machine Interfaces Trends
Fueled recently by extremely innovative products
Customers prefer products with– Elegant, durable industrial design– Intuitive operator panels and controls– Instant USB connectivity
....
Copyright © 2009. Avnet, Inc. All rights reserved.
8Touch-sensing is Elegant and Durable
Touch interfaces are– Elegant, modern, thin – Inexpensive copper
pad on PCB– Hermetically sealed– Easy to design in
Lasts longer– If mechanical switch,
dial, or keypad fails, then product fails
– High durability mechanical buttons are expensive
– No extra cost for touch interface durability
Air Cleaner
Laptop
Copyright © 2009. Avnet, Inc. All rights reserved.
9Custom Displays and Controls are Intuitive
Custom segment LCDs– Highly customizable– Anything you can draw, you
can build (fuel gauge, logo)– Surprisingly inexpensive
Integrate touch interfaces with a custom LCD for added intuitiveness
.
Copyright © 2009. Avnet, Inc. All rights reserved.
10The PC Provides a Window to the Machine
PCs are commonly used as the user interface to a machine
USB links the machine to the PC
USB
Copyright © 2009. Avnet, Inc. All rights reserved.
11Interfacing an FPGA to Humans
Touch, custom display, and USB interfaces are not native to the FPGA– How could they be implemented?
Implement each interface with an interface chip– Multiple interfaces require multiple chips
What about a single chip that adds touch, custom display, and USB interfaces? (And much more!)
..
Copyright © 2009. Avnet, Inc. All rights reserved.
12
• Mixers• PGAs• OpAmps
– Drop-in programmable digital• PWMs• Cyclic Redundancy Check• Quadrature decoders• USB 2.0 Full-speed
Introducing Cypress® PSoC®3?
PSoC = Programmable System-on-Chip Cypress’ 2nd generation platform Built around 8051 microprocessorUser-programmable– Drop-in programmable analog
peripherals• ADCs• DACs• TIAs
– Drop-in programmable digital peripherals• 8 to 32-bit timers• Counters• SPI• UART
Ultra low power with 0.5V to 5.5V voltage rangeFull-featured PSoC Creator™ Integrated Development Environment
Copyright © 2009. Avnet, Inc. All rights reserved.
13Avnet Spartan-6 LX16 Evaluation Kit
Xilinx Spartan-6 FPGA
Cypress PSoC 3
Touch-Sensing
Custom Segment LCD
Full-Speed USB
.....
Copyright © 2009. Avnet, Inc. All rights reserved.
14Questions
Who has previously designed with an FPGA?– Any with MicroBlaze™?
Who has previously designed with Cypress PSoC?– Who is familiar with PSoC 3?
...
Copyright © 2009. Avnet, Inc. All rights reserved.
15Agenda
Trends in Human-Machine Interfaces
Human-Machine Interfaces on the Avnet Spartan-6 LX16 Evaluation Board– Touch-sensing buttons– Custom segment LCD– USB to PC
FPGA Design with Human-Machine Interfaces
Getting Started
Copyright © 2009. Avnet, Inc. All rights reserved.
16What is CapSense Touch-Sensing?
Projected capacitive technology– Better reliability than surface capacitive or resistive
Buttons Sliders Proximity Sensing
Touch pads
Detects presence/absence of a conductive object (specifically, a fingertip)
Copyright © 2009. Avnet, Inc. All rights reserved.
17Where Can You Use CapSense?
CapSense touch sensing works everywhere
PSoC Chip
CapSensePads
PCB
Copyright © 2009. Avnet, Inc. All rights reserved.
18Where Can You Use CapSense?
CapSense touch sensing works everywhere
Overlay
Any surface such as glass or plastic
Any environment such as rain or with gloves
PSoC
CapSense
Gloves
.
Copyright © 2009. Avnet, Inc. All rights reserved.
19How CapSense Works
Sensor Total Capacitance = CX
CX = CP + CF
Overlay
Copper Ground Copper GroundSensor
* Diagram not to scale
Dielectric
CP CP
CF
....
Copyright © 2009. Avnet, Inc. All rights reserved.
20Agenda
Trends in Human-Machine Interfaces
Human-Machine Interfaces on the Avnet Spartan-6 LX16 Evaluation Board– Touch-sensing buttons– Custom segment LCD– USB to PC
FPGA Design with Human-Machine Interfaces
Getting Started
Copyright © 2009. Avnet, Inc. All rights reserved.
21LCD Requires an Analog Drive Chip
FPGA cannot drive analog waveforms required by LCDs– Driver chip required– FPGAs commonly interface to off-the-shelf LCD modules– Drive chips integrated onto module
PSoC integrates analog capability to directly drive LCDCapSense can be placed underneath LCD glass
FPGA PSoC 3 LCD Driver
Custom LCD Glass
Analog Drive Waveforms
FPGA
LCD Module
LCD Driver Standard LCD Glass
Analog Drive Waveforms
...
Copyright © 2009. Avnet, Inc. All rights reserved.
22Questions
Has anyone designed a custom segment LCD?– What was it for?
For those who haven’t, what would you expect:– Pay for non-recurring engineering (NRE) cost?– Minimum order quantity?– Per unit cost for a small display?
..
Copyright © 2009. Avnet, Inc. All rights reserved.
23Creating a Custom Segment LCD
Create a drawing– Visio, Paint, PPT
Specify module parameters– Commons, segments– Operating voltage– Connection type
• Pin or ribbon$2000 NRE – Design drawings – Five prototypes– 1000-piece pricing is
$2.13
..
Copyright © 2009. Avnet, Inc. All rights reserved.
24How LCDs Work
No Voltage Applied
Voltage Applied
.
Copyright © 2009. Avnet, Inc. All rights reserved.
25LCD- Working Principle
Side View Top View
Com
mon
Segment
Mirror
Liquid Crystal
..
Copyright © 2009. Avnet, Inc. All rights reserved.
26LCD- Working Principle
Side View Top View
Com
mon
Segment
Mirror
Liquid Crystal
Com
mon Liquid Crystal
Segment
.....
Copyright © 2009. Avnet, Inc. All rights reserved.
27LCD Driving
Commons/segments driven with analog waveforms– Waveforms must maintain 0V DC average – Prolonged DC voltage damages the display
PSoC 3 LCD drive– Designed to maintain 0V DC average – Delivers short bursts of potential to turn elements on
Two Types of Drive methods– Static– Multiplexed
Copyright © 2009. Avnet, Inc. All rights reserved.
28Multiplexed LCDs
Multiplexed LCDs are driven with more than one common– Static LCDs have only one common
Each segment and common drive multiple pixelsEach pixel tied to a unique common/segment pairReduces pin count, but driving is more complicatedExample: 4 elements using 4 pins instead of 5
Common
Seg 1 Seg 2
Seg 3 Seg 4
Static DriveSeg 1 Seg 2
Common 2
Common 1
Multiplexed Drive
Copyright © 2009. Avnet, Inc. All rights reserved.
29PSoC 3 Segment LCD Drive
Supports either static or multiplexed drive with built-in analog features– Up to 16 Commons– Maximum of 736 elements
Drive complex displays without an external driver Drive displays with fewer pins– More pins for peripheral
integration– Option for low pin count packages
Configurable LCD Pin Location– Shorter traces– Fewer PCB layers: no crossovers– Pin selection does not limit
functionality
36seg x 4com = 144 elements = 12seg x 12com
Save 16 pins!
PSoC 3Driver
36 4
FPGA FPGA
...
12 12
Copyright © 2009. Avnet, Inc. All rights reserved.
30LCD Direct Drive
PSoC Creator LCD Direct Drive Software Demo
Copyright © 2009. Avnet, Inc. All rights reserved.
31PSoC Creator Segment LCD Customizer
Copyright © 2009. Avnet, Inc. All rights reserved.
32PSoC Creator 14 Segment Helper
Copyright © 2009. Avnet, Inc. All rights reserved.
33PSoC Creator Bar Graph Helper
Copyright © 2009. Avnet, Inc. All rights reserved.
34Helper Function APIs
7 Segment– SegLCD_Write7SegDigit(uint8 Digit, uint8 Position);– SegLCD_Write7SegNumber(uint16 Value, uint8 Position, uint8 Mode);
14 Segment – SegLCD_PutChar14Seg_3(uint8 Character, uint8 Position);– SegLCD_WriteString14Seg_3(uint8* Character, uint8 Position);
Bar Graph– SegLCD_WriteBargraph(uint16 Location, uint8 Mode);
Copyright © 2009. Avnet, Inc. All rights reserved.
35Agenda
Trends in Human-Machine Interfaces
Human-Machine Interfaces on the Avnet Spartan-6 LX16 Evaluation Board– Touch-sensing buttons– Custom segment LCD– USB to PC
FPGA Design with Human-Machine Interfaces
Getting Started
Copyright © 2009. Avnet, Inc. All rights reserved.
36Instant USB Connectivity
RS232 was standard, but– Electrically slow– Mechanically large– Not supported on many modern PCs
USB benefits– Plug & play– Driver native in Windows, Linux, Mac
• Communications Device Class enables COM port– Bus-power option– Small form-factor connectors– Data rate of 480 Mbps high-speed
• SuperSpeed USB 3.0 at 5Gbps coming• PSoC supports 12Mbps full-speed
Options available for simplifying USB design– Discrete USB-UART bridge chip– USB-equipped PSoC or MCU
..
Copyright © 2009. Avnet, Inc. All rights reserved.
37
Spartan-6BridgeChip
FPGA USB-UART Implementations
USB UART
Bridge chips are simple…
USB
Power
PSoC 3 Spartan-6UART
PC
SPI
Config
PSoC is a bridge, plus much more!
.
Copyright © 2009. Avnet, Inc. All rights reserved.
38PSoC Creator Makes USB Bridging Easy
Built-in USBUART Macro– Includes USBFS and UART
Example C code provided
Copyright © 2009. Avnet, Inc. All rights reserved.
39USB-UART on the PC
Simple driver installation– Install file automatically
generated by PSoC Creator– Uses built-in Windows driver
Looks like a COM port
Copyright © 2009. Avnet, Inc. All rights reserved.
40Virtual COM Port
Set any terminal emulator to the virtual COM portWrite application software the same as if using RS232
Windows PCSpartan LX16
Board
Windows Virtual COM Port USB Driver
Windows Application Serial Port
PSoCUSB-UART
Xilinx FPGA MicroBlaze
UART
USB Cable
Simple Serial Port Applications
Copyright © 2009. Avnet, Inc. All rights reserved.
41Application Development Example: AvProg
Simple Visual Basic programControls USB communication through built-in serial port callsUSB data used for– FPGA
configuration– Flash
programming and readback
– UART bridge terminal
Copyright © 2009. Avnet, Inc. All rights reserved.
42Agenda
Trends in Human-Machine Interfaces
Human-Machine Interfaces on the Avnet Spartan-6 LX16 Evaluation Board– Touch-sensing buttons– Custom segment LCD– USB to PC
FPGA Design with Human-Machine Interfaces
Getting Started
Copyright © 2009. Avnet, Inc. All rights reserved.
43The Programmable Advantage
Spartan and PSoC are both programmableChoose the interconnecting interface that– Meets performance– Provides greatest ease of implementation– Has the fewest pins
Avnet Spartan-6 LX16 Evaluation board provides– CapSense via GPIO– LCD via SPI– USB via UART
Copyright © 2009. Avnet, Inc. All rights reserved.
44Easy Interfacing in Spartan-6
Use MicroBlaze™ to connect PSoC– Xilinx ISE™ Design Suite Embedded Edition
Built-in interface IP– UART, I2C, SPI, GPIO
Copyright © 2009. Avnet, Inc. All rights reserved.
45CapSense Touch-Sensing
PSoC 3 senses “touch” of PCB copper pad
PSoC drives the GPIO button logic
MicroBlaze reads the GPIO peripheral to register button pushes
Xilinx FPGA Cypress PSoC
GPIOuP
GP
IO
Cap
Sen
se
MicroBlaze
GP
IO
Copyright © 2009. Avnet, Inc. All rights reserved.
46Custom-segment LCDs
FPGA sends LCD display commands via SPI (or UART or I2C or GPIO or…)
PSoC receives commands over digital bus
PSoC drives analog waveforms to LCD
Xilinx FPGA Cypress PSoC
SPIuPSPISPI LCD
DriveMicroBlaze
Copyright © 2009. Avnet, Inc. All rights reserved.
47USB-UART Bridge
MicroBlaze communicates over UART
PSoC translates UART data to USB
PC communicates over USB via a Virtual COM Port
UA
RT
US
B-F
S
UA
RT
Copyright © 2009. Avnet, Inc. All rights reserved.
48Tools for MicroBlaze Design - BSB
Base System Builder– Wizard for
generating MicroBlaze designs
BSB can provide a system customized for the Spartan-6 LX16 Evaluation board
Copyright © 2009. Avnet, Inc. All rights reserved.
49Tools for MicroBlaze Design - TDP
Targeted Design PlatformsDevelopment boards with proven design examplesTargeted reference designs– Fully verified and supported reference designs – Infrastructure building blocks connected together– Immediately start designing
Start with a TDP, then customizeLook for the Avnet Spartan-6 LX16 Evaluation kit TDP
Copyright © 2009. Avnet, Inc. All rights reserved.
50Agenda
Trends in Human-Machine Interfaces
Human-Machine Interfaces on the Avnet Spartan-6 LX16 Evaluation Board– Touch-sensing buttons– Custom segment LCD– USB to PC
FPGA Design with Human-Machine Interfaces
Getting Started
Copyright © 2009. Avnet, Inc. All rights reserved.
51Getting Started – See the Demos
Avnet– S6-LX16 board with CapSense, LCD, and USB
Cypress– PSoC 3 Development Kits
• Touch-sensing• Analog sensors• LCD
Xilinx– SP605 Targeted Design Platform
• Extendable MicroBlaze embedded processor plus processor sub-system implemented in Spartan-6
Copyright © 2009. Avnet, Inc. All rights reserved.
52Getting Started – Get Hardware
Avnet Spartan-6 LX16 Kit (www.em.avnet.com/spartan6lx-evl)
Cypress MiniProg3 (CY8CKIT-002 www.cypress.com/go/PSoC3)
Xilinx JTAG Cable for advanced debug– www.xilinx.com/products/devkits/HW-USB-II-G.htm
Copyright © 2009. Avnet, Inc. All rights reserved.
53Getting Started – Install the Tools
Avnet– AvProg utility for Spartan-6 LX16 Evaluation Kit– www.em.avnet.com/spartan6lx-evl
Xilinx – ISE Design Suite, WebPack Edition– EDK Evaluation– www.xilinx.com/ise
Cypress – PSoC Creator– PSoC Programmer– www.cypress.com/go/psoc3
Copyright © 2009. Avnet, Inc. All rights reserved.
54Getting Started – Create Your Own Design
Download Tutorials from the Avnet Design Resource Center– www.em.avnet.com/drc
Look for trainings from Avnet
Get one-on-one help from your local Avnet FAE
Copyright © 2009. Avnet, Inc. All rights reserved.
55Interfaces from the 20th Century
Transceiver
FPGA
Copyright © 2009. Avnet, Inc. All rights reserved.
56Interfaces of Yesterday – Multi-chip
FPGA
USB-UART Bridge
Touch-Sensing
Controller
Copyright © 2009. Avnet, Inc. All rights reserved.
57The Modern, Single Chip, Custom Solution
FPGA
UARTSPII2CGPIO
PSoC
USB
Copyright © 2009. Avnet, Inc. All rights reserved.
58Feedback
Are you interested in attending a workshop to learn more?
Which topics?
Thanks for coming!
Please Visit the Demo Area!
X-fest Attendee Site: http://em.avnet.com/xfsupport2010
Copyright © 2009. Avnet, Inc. All rights reserved.
60LCD Construction
Copyright © 2009. Avnet, Inc. All rights reserved.
61LCD Types- Based on Light Source
Transmissive Reflective Transflective
Copyright © 2009. Avnet, Inc. All rights reserved.
62PSoC 3 Drives Multiple LCDs at Once
Multiple LCDs, One PSoC– Plenty of commons, segments
and I/Os to drive multiple displays– Add more product functionality,
reduce even more BOM10 8
10 8
PSoC 3
PSoC Creator – Glucose Meter with (1) Segment and (1) Character LCD Display
FPGA
Copyright © 2009. Avnet, Inc. All rights reserved.
63PSoC 3/5 LCD PLUS Functionality
Pedometer
Light Meter
Glucose Meter
Blood Pressure Monitor
Instrumentation
Segment LCD
PrecisionAnalog
Capsense Capsense
Segment LCD
High Performance Digital
Segment LCD
PrecisionAnalog
Motor Control
Segment LCD
PrecisionAnalog
Capsense
Segment LCD
PrecisionAnalog
Capsense
Copyright © 2009. Avnet, Inc. All rights reserved.
64Custom LCDs Differentiate Products
Air Quality Monitor
Light Meter
Glucose Meter Blood Pressure Monitor MultiMeter
pH Meter
Coffee Maker Flow Transmitter Exercise Machines
Standardsegment
Customsegment
Copyright © 2009. Avnet, Inc. All rights reserved.
65PSoC UART to USB Block Diagram
Tx
Rx→
PSoC’s flexible GPIOs allow user to assign dedicatedRTS/CTS (Request to send/clear to send) pins for the purpose
of hardware handshaking and data flow control
RTS
CTS