86
Interface Products Business Line System Management Product Line Designing with I2C Fm+ January 2014 Peter Stonard – Applications Engineer

Interface Products Business Line System Management Product Line Designing with I2C Fm+

  • Upload
    mary

  • View
    62

  • Download
    0

Embed Size (px)

DESCRIPTION

Interface Products Business Line System Management Product Line Designing with I2C Fm+. January 2014 Peter Stonard – Applications Engineer. Welcome!. This Webinar focuses on the recently released NXP OM13320 Fm+ Development Kit. - PowerPoint PPT Presentation

Citation preview

Page 1: Interface Products Business Line System Management Product Line Designing with I2C Fm+

Interface Products Business LineSystem Management Product Line Designing with I2C Fm+January 2014Peter Stonard – Applications Engineer

Page 2: Interface Products Business Line System Management Product Line Designing with I2C Fm+

2

Welcome!

This Webinar focuses on the recently released NXP OM13320 Fm+ Development Kit.

Detailed instruction will be given to power up the kit, connect it to a computer running Win7, and exercise the supplied NXP GUI support software.

To drive the kit you will need a Computer (running Win7/64)

Page 3: Interface Products Business Line System Management Product Line Designing with I2C Fm+

What we will cover today

Just what is an I2C Bus?

Why the NXP Fm+ Development Board was created

What you can (and can’t) do with it

First time set up (Jumpers and USB Driver)

How to set up a “trade show demo”

How to install firmware on the MCU

How to set up and use the NXP GUI

3

Page 4: Interface Products Business Line System Management Product Line Designing with I2C Fm+

4

I2C Introduction

4

Page 5: Interface Products Business Line System Management Product Line Designing with I2C Fm+

Do you know about I2C Basics?

This is a popular low speed digital serial bus system

(under one megabits/second)

The I2C Bus is used in many applications, from small scale to large

Many semiconductor vendors use the I2C Bus, or one of its derivatives (SMBus being the most widely known)

5

Page 6: Interface Products Business Line System Management Product Line Designing with I2C Fm+

Why I2C?

Devices that can talk to each other, on the I2C bus, have been available for a long time, and new ones are being added regularly

There are two features that make the I2C Bus unique and popular1 – Combination of both Hardware and protocol (open standard)2 – Hardware is very simple (two wires, two resistors!)

6

M SSCL

SDA

GND

VDD

GND

VDD

Pull Up Resistors on each line

Page 7: Interface Products Business Line System Management Product Line Designing with I2C Fm+

I2C Applications

Sensors and Displays

Expanding Input/Output (digital IO)

Data storage and transfer

7

Page 8: Interface Products Business Line System Management Product Line Designing with I2C Fm+

End products with I2C inside

Industrial Controls

Personal Electronics

White Goods/Home Appliances

8

Page 9: Interface Products Business Line System Management Product Line Designing with I2C Fm+

What is the Protocol Layer?

Protocol Layer = Data format, traffic, collision arbitrationAn I2C Bus must have:

Two node types (Master and Slave)Minimum of ONE Slave and ONE Bus Master

9

M SI2C Bus

SLAVEBUS CONTROLLER

Page 10: Interface Products Business Line System Management Product Line Designing with I2C Fm+

What is the Physical Layer?

Physical Layer = electrical connectionsTwo Wires: Data and Clock (plus ground and supply)

Data line (SDA)

Clock line (SCL)

10

VDD

M SSCL

SDA

GND

VDD

GND

VDD

Pull Up Resistors on each line

Page 11: Interface Products Business Line System Management Product Line Designing with I2C Fm+

How Fast can I2C Operate?

Messages on the I2C Bus Data line (SDA) are synchronized

By a clock signal on the Clock line (SCL)

Clock is generated by the Bus Master, not by the Slave

Originally the fastest clock was 100kHz, now called Standard-ModeOver time this was raised. First to 400kHz, called Fast-Mode (Fm)Then to 1MHz (1000kHz) called Fast-Mode Plus (Fm+)There is no lower limit, the bus can ‘rest’ or ‘stall’ at DC

The Fm+ Development kit only has Fm+ rated I2C parts

Any other parts (Standard-Mode, or Fast-Mode) can be mixed together

11

Page 12: Interface Products Business Line System Management Product Line Designing with I2C Fm+

What Voltage Operates I2C?

Because I2C was invented in the days of “five volt logic” it is 5V

However, 5V is rare in new designs, making today’s I2C “any voltage”

The I2C Bus is made backwards compatible using appropriate I2C devices, or clever circuit tricks

NXP has new I2C devices that require as low as 0.8V for power

Most of today’s I2C designs are for 3.3V, and sometimes 2.5V

Near future applications are probably between 1V and 1.8V

12

Page 13: Interface Products Business Line System Management Product Line Designing with I2C Fm+

Why do we need a Development Board?

The NXP I2C products are part of a system – they can’t work alone

Some I2C parts are simple (Bus Buffers are not protocol aware)

Some I2C parts are complex (Many registers must be set up first)

The I2C devices on the board require an I2C Master (MCU & firmware)

The modular design allows add-ons to be created and used later

13

Page 14: Interface Products Business Line System Management Product Line Designing with I2C Fm+

What to do with the Fm+ Development Kit

1. Trade show “eye candy” to get attention

2. Customer demos of specific I2C devices

3. Engineering evaluation of I2C devices

Some Engineering examples:o Learn how a specific I2C device operateso Compare I2C devices across brands and typeso Project PoC (Proof of Concept) before building hardware o Operate a device in a specific set upo Measure performance (using external tools)

14

Page 15: Interface Products Business Line System Management Product Line Designing with I2C Fm+

15

What’s in the box?

15

Page 16: Interface Products Business Line System Management Product Line Designing with I2C Fm+

What’s in the Box?

16

Page 17: Interface Products Business Line System Management Product Line Designing with I2C Fm+

The Main Board

The kit is built around an I2C

specific PCB (OM13260)

Most of the time it is connected to PC (via USB) for Power and Control

It can be used without the PC (DC power adapter)

The board has a variety of I2C devices, and two separate I2C Buses

17

Page 18: Interface Products Business Line System Management Product Line Designing with I2C Fm+

Add-On to the Kit

New I2C Products (not released at this time)

I2C device hardware design (build your circuit on the PCB)

Benchmark (made measurements and side-by-side comparisons)

18

Page 19: Interface Products Business Line System Management Product Line Designing with I2C Fm+

19

Take A Quick Tour

19

Page 20: Interface Products Business Line System Management Product Line Designing with I2C Fm+

I2C Bus Masters

20

Page 21: Interface Products Business Line System Management Product Line Designing with I2C Fm+

I2C Bus Slaves

21

Page 22: Interface Products Business Line System Management Product Line Designing with I2C Fm+

22

Page 23: Interface Products Business Line System Management Product Line Designing with I2C Fm+

Jumpers!

The kit ships with no jumpers installed, there are fifteen positions

Please install twelve jumpers (supplied) Three are ‘open’

23

Page 24: Interface Products Business Line System Management Product Line Designing with I2C Fm+

Fm+ Development Board Floor Plan

24

Bus 1

Bus 2

USB &Power

Bus Pull Ups

GPIOLED

Driver

Proto Area

Utilities

PORT D PORT C

PORT A PORT B

PORT E

TESTER

TESTER

USB

DC POWER

GPIO OUTPUTS

GPIO OUTPUTS

Page 25: Interface Products Business Line System Management Product Line Designing with I2C Fm+

25

How to install USB Driver

25

Page 26: Interface Products Business Line System Management Product Line Designing with I2C Fm+

USB Driver Installation

SummaryWin7/64 will attempt to auto-install a driver when the Fm+ Development

Board is attached by USB for the first time

However, this is not the required driver to operate with the NXP GUI

OverviewUsing the Device Manager, remove the default USB driver

Select the driver supplied in the NXP GUI distribution

Install the correct driver using the Windows installer

26

Page 27: Interface Products Business Line System Management Product Line Designing with I2C Fm+

Connect the FM+ Hardware for the first time

How to navigate to the Device Manager on your PC

1. Click the Windows ‘start’ button

2. Right Click the Computer

3. Select Properties

4. Select Device Manager

Device Manager

27

Page 28: Interface Products Business Line System Management Product Line Designing with I2C Fm+

Remove the Default Driver

28

1. Open “Other devices”

2. Right click on NXP FM+ DEV BOARD

Page 29: Interface Products Business Line System Management Product Line Designing with I2C Fm+

Update Driver Software

Select the first option Update Driver Software..

29

Page 30: Interface Products Business Line System Management Product Line Designing with I2C Fm+

Select the new driver location

Select the second option “Browse my computer for driver software”

30

Page 31: Interface Products Business Line System Management Product Line Designing with I2C Fm+

Select the USB Driver from the Distribution

31

C:\Program Files (x86)\NXP FM+ Development Board Software\

drivers

Page 32: Interface Products Business Line System Management Product Line Designing with I2C Fm+

Bypass the Warning

Select “Install this driver software anyway”

32

Installation may take several minutes

Page 33: Interface Products Business Line System Management Product Line Designing with I2C Fm+

Verify the new driver is installed

33

Page 34: Interface Products Business Line System Management Product Line Designing with I2C Fm+

Find the new driver in Device Manager

The (COMxx) will vary due to order and quantity of other USB devices

34

Page 35: Interface Products Business Line System Management Product Line Designing with I2C Fm+

35

“Trade Show Demo”

35

Page 36: Interface Products Business Line System Management Product Line Designing with I2C Fm+

What is a “Trade Show Demo”?

Blinky lights get attention!

Custom firmware will run a lightshow

There is no need for a computer or other software

The Fm+ Development Board has a 16channel LED driver

Four RGB LED clusters, and four White LEDs

GPIO Target Boards (in the kit) add more LEDs (“cylon eyes”)

Use any USB port, USB power adapter or AC-DC power adapter

36

Page 37: Interface Products Business Line System Management Product Line Designing with I2C Fm+

Install the “Port E” Jumper

The Fm+ Development Board has two I2C buses: Bus1 and Bus2

Use a two wire jumper to make one bus by joining them together

Install a two-wire Jumper (supplied) as shown

Important! Add a twist as shown

37

Page 38: Interface Products Business Line System Management Product Line Designing with I2C Fm+

Attach the GPIO Target Board

From the kit identify two GPIO Target Boards (OM13303)

Also, two 10pin Ribbon Cables

The hardware kit ( borrow a #0 Phillips screwdriver)

38

Page 39: Interface Products Business Line System Management Product Line Designing with I2C Fm+

1. Attach the ribbon cables to the bottom of the GPIO Target Board

Note: Red stripe on cable matches white mark on PCBs

2. Assemble the hardware as shown

3. Attach the GPIO target Boards to the Fm+ Development Board

Connect the GPIO Target Boards

39

Page 40: Interface Products Business Line System Management Product Line Designing with I2C Fm+

40

How to install firmware

40

Page 41: Interface Products Business Line System Management Product Line Designing with I2C Fm+

Firmware Installation

SummaryThe processor on the board requires firmware

This is installed over the USB link, from a computer (Win7/64)

It is unlikely that the board will be ‘bricked’

OverviewThe board is put into ISP (In System Program) mode

Any existing file(s) on the MCU are deleted

A firmware hex file is written into the MCU memory (32kB max)

The board is removed from ISP mode and reset

41

Page 42: Interface Products Business Line System Management Product Line Designing with I2C Fm+

ISP Mode (Jumper and Reset)

Attached the USB Cable

Install a Jumper on JP6 “ISP”

Install a Jumper on JP4 “RST”

Remove the Jumper from JP4

42

Page 43: Interface Products Business Line System Management Product Line Designing with I2C Fm+

Open the Windows Explorer on your computer

Find the newly added drive (E: in this example)

Open the folder

Delete the file “firmware.bin”

Delete existing firmware (in CRP DISABLED)

43

Page 44: Interface Products Business Line System Management Product Line Designing with I2C Fm+

Install the new firmware (on the MCU)

Copy and Paste the desired firmware to CRP DISABLED

The two firmware files in the distribution are (pick one):1. Standalone_trade_show_FM+_DEMO.bin2. FM+DevelopmentBoard V03_00.bin

44

Page 45: Interface Products Business Line System Management Product Line Designing with I2C Fm+

45

Running the Trade Show Demo

Remove Installed Jumper on JP6 “ISP”

Reset the Fm+ Development Board (briefly close JP4)

Each time the board is powered up the demo will start automatically

Use a 6V 2A AC-DC Adapter, USB ‘brick’, or any USB cable

Digikey PN 62-1132-ND (Not Supplied)

Page 46: Interface Products Business Line System Management Product Line Designing with I2C Fm+

46

NXP GUI

46

Page 47: Interface Products Business Line System Management Product Line Designing with I2C Fm+

What is a GUI?

The Graphical User Interface (GUI) is an API (Application Program Interface) that runs on an appliance under Windows7/64 OS

Once installed the GUI will communicate with the NXP hardware over a USB cable. The USB port powers the hardware.

47

Page 48: Interface Products Business Line System Management Product Line Designing with I2C Fm+

What can and can’t the GUI do?

The NXP GUI supports the three I2C devices on the OM13260 board

Future devices will require updates to the GUI

Scripts can be written in the GUI to operate any I2C device attached to the OM13260 board (through daughter cards)

The NXP GUI requires installation of the correct firmware on the MCU

The GUI is written in National Instruments LabView, and distributed as a royalty-free executable (approx 150MB)

Currently there is no support for edits or revision to the NXP GUI

The NXP GUI only supports Win7/64 OS

48

Page 49: Interface Products Business Line System Management Product Line Designing with I2C Fm+

49

Install the NXP GUI Firmware

Repeat the section “How to install GUI firmware”

Install the “FM+DevelopmentBoard V03_00.bin” firmware

Reset the OM13260 Board (briefly close JP4 RST)

Open the NXP GUI API on your computer

Page 50: Interface Products Business Line System Management Product Line Designing with I2C Fm+

NXP GUI Welcome Screen

50

Page 51: Interface Products Business Line System Management Product Line Designing with I2C Fm+

NXP GUI Device Selection Screen

51

Page 52: Interface Products Business Line System Management Product Line Designing with I2C Fm+

NXP GUI GPIO Expanders Screen

52

Page 53: Interface Products Business Line System Management Product Line Designing with I2C Fm+

NXP GUI Temperature Sensors Screen

53

Page 54: Interface Products Business Line System Management Product Line Designing with I2C Fm+

NXP GUI LED Drivers Screen

54

Page 55: Interface Products Business Line System Management Product Line Designing with I2C Fm+

NXP GUI Select Device Screen

55

Page 56: Interface Products Business Line System Management Product Line Designing with I2C Fm+

56

NXP GUI GPIO

56

Page 57: Interface Products Business Line System Management Product Line Designing with I2C Fm+

What is a GPIO?

The General purpose Input Output devices are I2C Slaves

Instructions in I2C messages control several IO Ports

Ports can source or sink current to a load

Ports can also be read by the Bus Master“PCA9672 Remote 8-bit I/O expander for Fm+ I2C-bus with interrupt and reset”

57

Page 58: Interface Products Business Line System Management Product Line Designing with I2C Fm+

GPIO Hardware (PCA9672)

58

Each of the two buses on the OM13260 board has an 8-bit GPIO

Four address options each (JP10 for bus1 and JP20 for bus2)

  HEX 8-bit   NXP 7-bitPCB MSB LSB GUI MSB LSB

GND 0x44 0100 0100   0x22 0010 0010VCC 0x46 0100 0110   0x23 0010 0011SCL 0x54 0101 0100   0x2A 0010 1010

SDA 0x56 0101 0110   0x2B 0010 1011

Page 59: Interface Products Business Line System Management Product Line Designing with I2C Fm+

Using the GPIO Target

59

Outputs can be monitored with the GPIO Target board (OM13303)

GPIO Target Board has eight channels, each with an LED and switch

The NXP GUI can drive the LEDs (GRN = 1, RED = 0)

The NXP GUI can read the switches (Press = 0)

Page 60: Interface Products Business Line System Management Product Line Designing with I2C Fm+

NXP GUI Select Device Screen (GPIO)

60

Page 61: Interface Products Business Line System Management Product Line Designing with I2C Fm+

61

GPIO GUI (PCA9672)

The GPIO GUI is very simple

Page 62: Interface Products Business Line System Management Product Line Designing with I2C Fm+

GUI Slave Address and Test

62

Start by setting the Address and then press Test Slave Address

Page 63: Interface Products Business Line System Management Product Line Designing with I2C Fm+

Driving the LEDs

63

Write to the LEDs (VCC = open, GND = RED LED on)

Page 64: Interface Products Business Line System Management Product Line Designing with I2C Fm+

Reading the switches

64

Read the switches (VCC = open, GND = pressed)

Page 65: Interface Products Business Line System Management Product Line Designing with I2C Fm+

65

NXP GUI LED Driver

65

Page 66: Interface Products Business Line System Management Product Line Designing with I2C Fm+

What is a LED Driver?

The LED Driver devices are I2C Slaves

Instructions in I2C messages control IO Chanels

Intended for driving LEDs, the channels sink constant current

Control of LED current, Pulse Width Modulation (PWM), Group PWM and Blinking, are made by the Bus Master

Health of the LEDs is monitored and reported to the Bus Master

There are 55 8-bit registers in the device, required to operate it“PCA9955 16-channel Fm+ I2C-bus 57 mA constant current LED driver”

66

Page 67: Interface Products Business Line System Management Product Line Designing with I2C Fm+

NXP GUI Select Device Screen (LED driver)

67

Page 68: Interface Products Business Line System Management Product Line Designing with I2C Fm+

LED Driver Hardware (PCA9955)

68

Bus1 on the OM13260 board has a 16 channel LED Driver

Two address options (JP5)

  HEX 8-bit   NXP 7-bitPCB MSB LSB GUI MSB LSB

GND 0xC0 1100 0000   0x60 0110 0000VCC 0xD0 1101 0000   0x68 0110 1000

Page 69: Interface Products Business Line System Management Product Line Designing with I2C Fm+

LED Driver Hardware (PCA9955)

69

Outputs 0 – 11 drive four RGB LEDs clusters

Outputs 12 – 15 drive four White LEDs

LEDs current is set by the Driver (no extra resistors)

Adjust R36 to set max LED current

(leave it set to 50%)

Page 70: Interface Products Business Line System Management Product Line Designing with I2C Fm+

LED GUI (PCA9955)

70

The PCA9955 has 55 internal registers, making the GUI complex

Page 71: Interface Products Business Line System Management Product Line Designing with I2C Fm+

Getting Started with the PCA9955

71

1. Test the Slave Address, and note “Slave Presence” is now green

2. From the drop down menu select “LED0”

3. From the Output State select “ON”

Page 72: Interface Products Business Line System Management Product Line Designing with I2C Fm+

Lighting LED0

72

1. Note the Red LED (LED0 an RGB cluster) is full on

2. Move the slider up and down in the “output gain control” (0 – 255)

3. Note that Red LED fades up and down

4. Reset the “output gain control” to 100

Page 73: Interface Products Business Line System Management Product Line Designing with I2C Fm+

Driving with PWM

73

1. Change the Output State drop down menu to “PWM”

2. Note the large rotary dial is now live (not grayed-out)

3. Use this to change the LED0 brightness

4. Leave the PWM dial at 100

Page 74: Interface Products Business Line System Management Product Line Designing with I2C Fm+

PWM LED0

74

Page 75: Interface Products Business Line System Management Product Line Designing with I2C Fm+

1. Repeat the earlier steps to select several LEDs one at a time

2. Set each one to “PWM and GRPPWM”

3. Note “Output states” status

4. Set each LED output gain to 100

5. Set each LED PWM to 100

6. Try these:

LED0, LED4, LED8 and LED13

Group Control Selection

75

Page 76: Interface Products Business Line System Management Product Line Designing with I2C Fm+

Group Control PWM

76

1. Move to the second Tab “Group LED Control”

2. Set IREFALL = 100

3. Set PWMALL = 100

4. Move the rotary dial

Note that all selected

LEDs dim together

Page 77: Interface Products Business Line System Management Product Line Designing with I2C Fm+

Group Control Blinking

77

1. Select the Group = blinking button

2. Set “Blinking period” = 5 (cycle time is 0.393 seconds or about 3Hz)

3. Move the rotary dial

Note all selected LEDs

Blink together

The rotary dial sets the

Duty-cycle of the blink

Page 78: Interface Products Business Line System Management Product Line Designing with I2C Fm+

Adjusting the Max LED Current (R36 Pot)

Using a Philips #0 screwdriver adjust R36

Note that turning the screwdriver CW increased the LED drive

The Fm+ Kit will be safe, even if LEDs are full on and R36 at max CW

The PCA9955 has thermal shutdown. It will ‘burp’ if driven too hard

To drive all the LEDs at max current will require an external 6V 2A AC/DC Adapter Digikey PN 62-1132-ND (Not Supplied)

Remember to return the Pot (R36) to 50% after this experiment!

78

Page 79: Interface Products Business Line System Management Product Line Designing with I2C Fm+

79

NXP GUI Expert Mode

79

Page 80: Interface Products Business Line System Management Product Line Designing with I2C Fm+

NXP GUI Select Device Screen (expert mode)

80

Page 81: Interface Products Business Line System Management Product Line Designing with I2C Fm+

NXP GUI Expert Mode Screen

81

Page 82: Interface Products Business Line System Management Product Line Designing with I2C Fm+

NXP GUI PCA9672 Sample Screen

82

Page 83: Interface Products Business Line System Management Product Line Designing with I2C Fm+

NXP GUI PCA9672 Sample Running Screen

83

Page 84: Interface Products Business Line System Management Product Line Designing with I2C Fm+

NXP GUI Expert Mode (File Management)

84

The NXP GUI distribution includes one expert mode example

This is installed here:C:\Program Files (x86)\NXP FM+ Development Board Software\User Scripts

This file location may be write protected on your OS

Find a new place to store the files that you create or edit

Page 85: Interface Products Business Line System Management Product Line Designing with I2C Fm+

NXP GUI Expert Mode (File Editing)

85

Page 86: Interface Products Business Line System Management Product Line Designing with I2C Fm+