l28
TRANSCRIPT
ECT 358ECT 358
Lecture 34Lecture 34
Other PlatformsOther Platforms
Z8F640x Product Z8F640x Product FeaturesFeatures
• Enhanced 20MHz Z8 Encore!TM Processor Core
• The CPU core runs at the crystal frequency
• 64KB FLASH Program Memory
• 4KB of Register Ram
• Four 16-bit Timers with Capture and PWM’s
• Two Full-Duplex, 9-Bit UARTs w/IrDA Support
• SPI and I2C Ports
• Up to 12-Channel, 10-Bit, A/D Conversion
• Up to 60 Available I/O Pins
• Built-in Debugger
• In-Circuit FLASH Programming (ICFP)
• Watch Dog Timer
• Up to 24-Vectored, Priority Based Interrupts
• Available in 40, 44, 64, 68 and 80-pin packages
WatchdogTimer
OscillatorCrystal, RC
ResetControl
Z8 Encore!TM
20MHzCPU
Register File4K x 8
DMA
Controller
FLASHProgramMemory
64K x 8
On ChipDebugger
UART 1
UART 0
SPI
12-Channel10-bitA/D
Converter
I2C2
Port A Port B Port C Port D Port E Port F Port G Port H
16-bit Counter/Timer/ Cap/ PWM
16-bit Counter/Timer/ Cap/ PWM
16-bit Counter/Timer/ Cap/ PWM
16-bit Counter/Timer/ Cap/ PWM
Interrupt
Controller
New Z8 Encore!New Z8 Encore!TMTM Soft CoreSoft Core
Soft Core Features
• 76 instructions (runs existing Z8TM instructions)
• Linear Address Instructions to operate on the 4K Register Space
• Adds LDX for data movement between register pages
• Adds on-chip debug instructions: BRK, TRAP
• Adds instructions for improved performance and code efficiency
• Improved performance over the Z8TM
– 20MHz operating speed
– 2-9 cycles per instruction
– Instruction fetch unit
– up to 10-MIPS Operation
WatchdogTimer
OscillatorCrystal, RC
ResetControl
eZ820MHz
CPU
Register File4K x 8
DMA
Controller
FLASHProgramMemory
64K x 8
On ChipDebugger
UART 1
UART 0
SPI
12-Channel10-bitA/D
Converter
I2C2
Port A Port B Port C Port D Port E Port F Port G Port H
16-bit Counter/Timer/ Cap/ PWM
16-bit Counter/Timer/ Cap/ PWM
16-bit Counter/Timer/ Cap/ PWM
16-bit Counter/Timer/ Cap/ PWM
Interrupt
Controller
FLASH Program FLASH Program Memory Memory
Flash Features
• Up to 64KB of Flash
• Page erase capability: 512 bytes/page
• Endurance: 20,000 Cycles (min)
• Up to 100 years of Data Retention
• Byte Program Time: 20uS (min)
• Page Erase Time: 10-12ms (min)
• Mass Erase Time: 200-220ms (min)
• Write Protective mechanism to prevent accidental programming or erasure
WatchdogTimer
OscillatorCrystal, RC
ResetControl
Z8 Encore!TM
20MHzCPU
Register File4K x 8
DMA
Controller
FLASHProgramMemory
64K x 8
On ChipDebugger
UART 1
UART 0
SPI
12-Channel10-bitA/D
Converter
I2C2
Port A Port B Port C Port D Port E Port F Port G Port H
16-bit Counter/Timer/ Cap/ PWM
16-bit Counter/Timer/ Cap/ PWM
16-bit Counter/Timer/ Cap/ PWM
16-bit Counter/Timer/ Cap/ PWM
Interrupt
Controller
Interrupt Interrupt ControllerController
Interrupt Controller Features
• 24 Interrupt Vectors
• 12 external GPIO interrupt sources
- 4 dual-edge interrupts
- 8 selectable rising or falling edge interrupts
• 12 Internal sources
• Three levels of priority
• Interrupt latency is max 16 system clock
- 2 cycles for Interrupt priority
- max of 9 cycles to complete current instruction and acknowledge the pending interrupt request
- 3 cycles for stacking (PC and Flags)
- 2 cycles for Vector fetching
WatchdogTimer
OscillatorCrystal, RC
ResetControl
Z8 Encore!TM
20MHzCPU
Register File4K x 8
DMA
Controller
FLASHProgramMemory
64K x 8
On ChipDebugger
UART 1
UART 0
SPI
12-Channel10-bitA/D
Converter
I2C2
Port A Port B Port C Port D Port E Port F Port G Port H
16-bit Counter/Timer/ Cap/ PWM
16-bit Counter/Timer/ Cap/ PWM
16-bit Counter/Timer/ Cap/ PWM
16-bit Counter/Timer/ Cap/ PWM
Interrupt
Controller
General-Purpose General-Purpose I/O (GPIO)I/O (GPIO)
• Up to 60 available GPIO pins:
- seven 8-bit ports
- one 4-bit port
• Bit programmable
- Open-Drain
- High Drive Enable
- Stop Mode Recovery Source Enable
- Data Direction
- Alternate function
• Each pin can sink or source either 2mA or 20mA.
WatchdogTimer
OscillatorCrystal, RC
ResetControl
Z8 Encore!TM
20MHzCPU
Register File4K x 8
DMA
Controller
FLASHProgramMemory
64K x 8
On ChipDebugger
UART 1
UART 0
SPI
12-Channel10-bitA/D
Converter
I2C2
Port A Port B Port C Port D Port E Port F Port G Port H
16-bit Counter/Timer/ Cap/ PWM
16-bit Counter/Timer/ Cap/ PWM
16-bit Counter/Timer/ Cap/ PWM
16-bit Counter/Timer/ Cap/ PWM
Interrupt
Controller
UARTSUARTSUART Features
• Full Duplex
• 8 and 9-bit Asynchronous Data transfers
• Even/Odd parity Generation and detection
• 1–2 STOP bit selection
• Separate Transmit and Receive Interrupts
• Framing, Parity, Overrun, and Break Detect
• 16-bit Reload Baud Rate Generator
• Separate transmit and receive enables
• Receive & transmit data buffer
• Selectable Multi-processor Mode (9-bit UART)
• Built-in IrDA Encoder-Decoder
• Max data rate SysClk/8
WatchdogTimer
OscillatorCrystal, RC
ResetControl
Z8 Encore!TM
20MHzCPU
Register File4K x 8
DMA
Controller
FLASHProgramMemory
64K x 8
On ChipDebugger
UART 1
UART 0
SPI
12-Channel10-bitA/D
Converter
I2C2
Port A Port B Port C Port D Port E Port F Port G Port H
16-bit Counter/Timer/ Cap/ PWM
16-bit Counter/Timer/ Cap/ PWM
16-bit Counter/Timer/ Cap/ PWM
16-bit Counter/Timer/ Cap/ PWM
Interrupt
Controller
Serial Peripheral Serial Peripheral Interface (SPI)Interface (SPI)
SPI Features
• Full-Duplex, Synchronous, Channel
• Data Transfer in Master and Slave modes
• Maximum data rate of SysClk/4
• Error Detection Logic
• Write and Mode Collision Detection
• Four Wire Interface:
- Clock,
- Transmit,
- Receive,
- Slave Select
• Dedicated BRG
WatchdogTimer
OscillatorCrystal, RC
ResetControl
Z8 Encore!TM
20MHzCPU
Register File4K x 8
DMA
Controller
FLASHProgramMemory
64K x 8
On ChipDebugger
UART 1
UART 0
SPI
12-Channel10-bitA/D
Converter
I2C2
Port A Port B Port C Port D Port E Port F Port G Port H
16-bit Counter/Timer/ Cap/ PWM
16-bit Counter/Timer/ Cap/ PWM
16-bit Counter/Timer/ Cap/ PWM
16-bit Counter/Timer/ Cap/ PWM
Interrupt
Controller
Inter-IC (IInter-IC (I22C)C)I2C Features
• Up 100Kbps in Standard Mode and 400Kbpps in Fast Mode
• 7 or 10-bit addressing for slaves
• Unrestricted amount of data transfer
• Only Master Mode is supported
• Automatic configuration for open drain
• Support for slave clock stretching
• Dedicated BRG
• Two bi-directional bus lines:
- serial data (SDA) line
- serial clock (SCL) line
WatchdogTimer
OscillatorCrystal, RC
ResetControl
Z8 Encore!TM
20MHzCPU
Register File4K x 8
DMA
Controller
FLASHProgramMemory
64K x 8
On ChipDebugger
UART 1
UART 0
SPI
12-Channel10-bitA/D
Converter
I2C2
Port A Port B Port C Port D Port E Port F Port G Port H
16-bit Counter/Timer/ Cap/ PWM
16-bit Counter/Timer/ Cap/ PWM
16-bit Counter/Timer/ Cap/ PWM
16-bit Counter/Timer/ Cap/ PWM
Interrupt
Controller
TimersTimersTimer Features
• Four 16-bit Reload/Up-counting Timers
• Vectored Timer Interrupt
• 7-bit Pre-Scale
• Timer Output Pin
• Timer input for Gated and Capture Modes
• Timer Operating Modes:
- One-Shot
- Continuous
- Counter
- PWM
- Capture
- Compare
- Gated
- Capture/Compare
WatchdogTimer
OscillatorCrystal, RC
ResetControl
Z8 Encore!TM
20MHzCPU
Register File4K x 8
DMA
Controller
FLASHProgramMemory
64K x 8
On ChipDebugger
UART 1
UART 0
SPI
12-Channel10-bitA/D
Converter
I2C2
Port A Port B Port C Port D Port E Port F Port G Port H
16-bit Counter/Timer/ Cap/ PWM
16-bit Counter/Timer/ Cap/ PWM
16-bit Counter/Timer/ Cap/ PWM
16-bit Counter/Timer/ Cap/ PWM
Interrupt
Controller
Direct Memory Direct Memory Access (DMA)Access (DMA)
DMA Features
• There are three DMA Channels
- Two DMA channels are used for transfer between register RAM and peripherals.
- The third DMA is used for continuous ADC updates.
• Vectored DMA Interrupts
• DMAx Transfers either a single byte or two-byte word
WatchdogTimer
OscillatorCrystal, RC
ResetControl
Z8 Encore!TM
20MHzCPU
Register File4K x 8
DMA
Controller
FLASHProgramMemory
64K x 8
On ChipDebugger
UART 1
UART 0
SPI
12-Channel10-bitA/D
Converter
I2C2
Port A Port B Port C Port D Port E Port F Port G Port H
16-bit Counter/Timer/ Cap/ PWM
16-bit Counter/Timer/ Cap/ PWM
16-bit Counter/Timer/ Cap/ PWM
16-bit Counter/Timer/ Cap/ PWM
Interrupt
Controller
Analog-to-Digital Analog-to-Digital Converter (ADC)Converter (ADC)
ADC Features
• 10-bit resolution
• 12 Channels of Single-Ended ADC
• Sigma-Delta converter for better accuracy
• Input Signals Multiplexed with Standard I/O pads to reduce pin count
• Capable of sampling up to 40KHz in continuous mode and 4KHz in single-step mode
• Vectored ADC Interrupts on conversion completion
• 2.1V Internal Reference Voltage
• 0-VDD External Reference Voltage
• Analog input range: 0 - Vref
WatchdogTimer
OscillatorCrystal, RC
ResetControl
Z8 Encore!TM
20MHzCPU
Register File4K x 8
DMA
Controller
FLASHProgramMemory
64K x 8
On ChipDebugger
UART 1
UART 0
SPI
12-Channel10-bitA/D
Converter
I2C2
Port A Port B Port C Port D Port E Port F Port G Port H
16-bit Counter/Timer/ Cap/ PWM
16-bit Counter/Timer/ Cap/ PWM
16-bit Counter/Timer/ Cap/ PWM
16-bit Counter/Timer/ Cap/ PWM
Interrupt
Controller
On-Chip On-Chip Debugger (OCD)Debugger (OCD)
OCD Features
• Single-pin Bi-Directional Open-drain Interface
•Data sent on single-pin using asynchronous data standard as defined in RS-232
• Max speed of transfer SysClk/8
OCD Advantages
• Keeps pin count low with single pin interface
• OCD helps read/write to registers, programming Flash, setting breakpoints and executing code
WatchdogTimer
OscillatorCrystal, RC
ResetControl
Z8 Encore!TM
20MHzCPU
Register File4K x 8
DMA
Controller
FLASHProgramMemory
64K x 8
On ChipDebugger
UART 1
UART 0
SPI
12-Channel10-bitA/D
Converter
I2C2
Port A Port B Port C Port D Port E Port F Port G Port H
16-bit Counter/Timer/ Cap/ PWM
16-bit Counter/Timer/ Cap/ PWM
16-bit Counter/Timer/ Cap/ PWM
16-bit Counter/Timer/ Cap/ PWM
Interrupt
Controller
Reset ControlReset ControlReset Features
• The Z8 Encore!TM can be reset with any of the following events:
• Reset Pin Assertion
• Power-on Reset
• Watchdog Timer Time-out (When configured to initiate a reset)
• Voltage Brown-out
• Stop Mode Recovery (SMR)
Watchdog Timer Time-out
GPIO port Input Pin Transition
WatchdogTimer
OscillatorCrystal, RC
ResetControl
Z8 Encore!TM
20MHzCPU
Register File4K x 8
DMA
Controller
FLASHProgramMemory
64K x 8
On ChipDebugger
UART 1
UART 0
SPI
12-Channel10-bitA/D
Converter
I2C2
Port A Port B Port C Port D Port E Port F Port G Port H
16-bit Counter/Timer/ Cap/ PWM
16-bit Counter/Timer/ Cap/ PWM
16-bit Counter/Timer/ Cap/ PWM
16-bit Counter/Timer/ Cap/ PWM
Interrupt
Controller
The Eval Board consists of The Eval Board consists of fivefive
major blocks:major blocks:
1. MCU (Z8 Encore!1. MCU (Z8 Encore!TMTM))
2. Serial communication 2. Serial communication devices (SPI and Idevices (SPI and I22C)C)
3. Power and 3. Power and communication interfacescommunication interfaces
4. LED Array4. LED Array
5. Expansion Module 5. Expansion Module HeadersHeaders
6. IrDA Port6. IrDA Port
7. Target Module Interface7. Target Module Interface
Major Z8F64 Eval Major Z8F64 Eval Board BlocksBoard Blocks
1. Connect Serial port 1. Connect Serial port of the PC to the Z8 of the PC to the Z8 Encore!™ Evaluation Encore!™ Evaluation Board (P1).Board (P1).
2. Connect the Z8 2. Connect the Z8 Encore!™ Target Encore!™ Target Module Interface Module Interface Board to the Z8Board to the Z8TMTM (P4).(P4).
3. Apply power to the 3. Apply power to the Z8 Encore!™ Z8 Encore!™ Evaluation Board Evaluation Board (P3).(P3).
Setting Up The Setting Up The Evaluation BoardEvaluation Board