Using the Z8051 MCU s USI Peripheral as an SPI Interface

Size: px
Start display at page:

Download "Using the Z8051 MCU s USI Peripheral as an SPI Interface"

Transcription

1 Using the Z8051 MCU s USI Peripheral as an SPI Interface AN Abstract This document describes how to configure Zilog s Z8051 Universal Serial Interface (USI) peripheral to operate as Serial Peripheral Interface (SPI). This application will demonstrate the SPI protocol by using two of Zilog s Z51F3220 MCUs configured as master and slave, respectively. Note: The source code file associated with this application note, AN0359-SC01.zip, is available free for download from the Zilog website. This source code was compiled using the Keil µvision4 and Small Device C Compiler (SDCC) v tools. The Keil µvision4 development tool is available from Keil; the SDCC v3.1.0 tool is included in the Z8F3220 Development Kit. For this source code to work properly with other Z8051 MCUs, minor modifications to the source code may be required. An Overview of USI and SPI The Universal Serial Interface (USI) peripheral unit in Zilog s Z8051 family of MCUs provides the necessary hardware resources required for synchronous, asynchronous, and two-wire serial communication. Compared to other software-based serial communication solutions, Zilog s USI uses less code space and expedites higher transfer rates. In this application, this USI will be configured to work as a Serial Peripheral Interface (SPI). A Serial Peripheral Interface (SPI) is a hardware/firmware communications protocol originally developed by Motorola and later adopted by other industry companies. An SPI is also called a four wire serial bus. In effect, an SPI is a serial bus that operates in full duplex mode. Devices communicate using a master/slave relationship in which the master initiates a data frame. When the master generates a clock and selects a slave device, data may be transferred in either or both directions simultaneously, and can support transfer rates of 1 to 10 Mbps. Discussion The Z8051 USI peripheral, when correctly configured, can operate efficiently in Serial Peripheral Interface Mode. This section discusses the SPI signals, data transfer, and other details that are related to the SPI. Signals The SPI consists of the following four signals: AN Page 1 of 17

2 Master Out Slave In (MOSI). The MOSI signal is generated by the master, and the recipient is the slave. Master In Slave Out (MISO). Slaves generate MISO signals; the master is the recipient. Serial Clock (SCK). The SCK signal is generated by the master to synchronize data transfers between the master and the slave. Slave Select (SS). An SS signal is generated by the master to select individual slave/ peripheral devices. The SS or CS is an active Low signal. Data Transmission Communication is initiated by the master in all instances. The master first configures the clock, using a frequency that is less than or equal to the maximum frequency that the slave device supports. Such frequencies are commonly in the range of MHz. The master then selects the appropriate slave for communication by pulling the chip select (SS) line of that particular slave-peripheral to a Low state. The master will next issue clock cycles. The slaves on the bus that has not been activated by the master using its slave select signal will disregard the input clock and MOSI signals from the master, and must not drive MISO. In essence, the master selects only one slave at a time. During each SPI clock cycle, a full duplex data transmission occurs; i.e., communication in both directions occurs simultaneously. Data are usually shifted out with the MSB first while shifting a new LSB into the same register. After this register has been shifted out, the master and slave will complete an exchange of their register values. If there are more data to be exchanged, the shift registers are loaded with new data and the process is repeated. When there are no more data to be transmitted, the master stops its clock and rejects any slave data. Baud Rate The USI s clock generation logic generates a clock for the Serial Peripheral Interface. Writing to the USIxBD Register sets this SPI clock. The following formula can be used to obtain a correct value for the baud rate register: USIxBD = (System Clock / ((Baud Rate * 2)) 1 Clock Polarity and Phase In addition to setting the clock frequency, the master must also configure the clock polarity (CPOL) and clock phase (CPHA) with respect to the data. Because the clock serves to synchronize data communication, there are four possible modes that can be used in an SPI protocol based on CPOL and CPHA. Table 1 lists these four CPOL and CPHA combinations for an SPI. AN Page 2 of 17

3 Table 1. Combinations of CPOL and CPHA SPI Mode CPOL CPHA Leading Edge Trailing Edge Sample (Rising) Setup (Falling) Setup (Rising) Sample (Falling) Sample (Falling) Setup (Rising) Setup (Falling) Sample (Rising) From Table 1, it can be determined that when CPOL = 0, the base value of the clock is zero. When CPHA = 0, data is sampled at the rising edge of the clock and propagated on a falling edge. For CPHA = 1, data is sampled on the clock s falling edge and propagated on the rising edge. When CPOL = 1, the base value of the clock is one. When CPHA = 0, data is sampled at the falling edge of the clock and propagated on a rising edge. When CPHA = 1, data is sampled on the clock s rising edge and propagated on a falling edge. This scenario is depicted in the SPI timing diagram shown in Figure 1. Figure 1. Timing Diagram Showing CPOL and CPHA AN Page 3 of 17

4 USI Registers USI Register USIxBD USIxDR Six registers are important for allowing the USI block to operate as a serial peripheral interface; these registers are briefly described in Table 2. Table 2. USI Registers Related to the SPI Block Description USI Baud Rate Generation Register The value of this register is used to generate the clock for the SPI. USI Data Register SPI data are written to this register. USIxCR1 USI Control Register 1 Controls or changes the behavior of USI. USIxCR2 USI Control Register 2 Configuring this register will enable or disable the TX, RX and USI. USIxCR3 USI Control Register 3 Configuring this register will set the SPI as master or slave. USIxSTI USI Status Register 1 Operation status of the SPI can be determined by reading this register. Hardware Implementation In this application, two Z51F3220 microcontrollers are configured; one as a master, and one as a slave. Figure 2 illustrates the connection interface between the master and the slave. Figure 2. Master and Slave SPI Interface Software Implementation The software for this application can be compiled using either Keil µvision v or SDCC v The source code file that is important in this application is the spi.c file, which contains the routines required to allow the SPI peripheral of the Z8051 MCU to operate. AN Page 4 of 17

5 SPI Macros The source code for this application is written with macros which act as switches that enable the application software to control either an SPI master or an SPI slave. These macros also determine which USI (0 or 1) will be used as the SPI during compilation. These switches can be found in the spi.h file along with the function prototypes of the routines. Examples of the SPI switches are: #define MASTER #define SPI0 // #define SPI1 The above macro examples indicate that USI0 will be used to operate as an SPI master. SPI Routines The SPI routines are contained in the spi.c file, and are used both for SPI master and SPI slave configuration. Table 3 lists all of the routines included in this file. Table 3. SPI Routines Function Name VOID Spi_Initialize( UINT32 ulfrequency, UINT32 ulbaudrate, UINT8 ucdataorder, UINT8 ucmode) VOID Spi_Putchar(INT8 cdata) INT8 Spi_GetChar(VOID) Description This routine initializes the USI function to operate in SPI Mode. It calculates the operating baud rate, sets the data order, and also sets CPOL and CPHA. Puts a character to the SPI Data Register. Gets the data from the SPI Data Register. SPI Initialization To set the USI block to function as an SPI, it must first be properly initialized. The SPI_Initialize routine is used in this application to set the USI to operate in SPI Mode. Additionally, this routine can be used by either the master or slave MCU configuration. Setting SPI Mode The SPI_Initialize routine starts by setting the USI to SPI Mode. The following code statement shows how to set the USI to work in SPI Mode. SPICR1 = SPI_MODE; // Set Control Register 1 to make the USI // work as an SPI. This code shows that SPICR1 is set equal to the value represented by SPI_MODE. SPICR1 is an identifier for the USI Control Register 1 (USIxCR1). Please refer to spi.h file to view additional identifiers. AN Page 5 of 17

6 Master/Slave Configuration After setting the USI to work as an SPI, the routine will configure the SPI to either a master or a slave by setting the MASTER1 bit of the USI Control Register 3 (USIxCR3). Table 4 lists the configuration of the SPI depending on this MASTER1 bit value. Table 4. USI Control Register 3 Bit 7 Setting USIxCR3 Bit 7 (MASTER1) Configuration SPI 0 Slave 1 Master Table 4 shows that setting the MASTER1 bit to 0 sets the MCU to function as an SPI slave; setting this bit to 1 sets the MCU to function as an SPI master. The routine next configures the Slave Select (SS) pin of the MCU to either input or output. If the MCU is set to work as a master, the SS pin is configured as an output. However, if the MCU is set to work as a slave, SS is configured as an input. The following code segment shows how the MCU is configured to either master or slave, and how the SS pin is configured. #ifdef MASTER // Configure MCU as master SPICR3 = MASTER; #ifdef SPI0 P4IO = (1<<3); #ifdef SPI1 P2IO = (1<<2); SS_HIGH; #else // Configure MCU as slave #ifdef SPI0 P4IO &= ~(1<<3); #ifdef SPI1 P2IO &= ~(1<<2); SPICR3 &= ~ (MASTER); SPICR3 = USISSEN; // Set SPI as master // If USI0/SPI0 is used // Set SS0 pin as Output // If USI1/SPI1 is used // Set SS1 pin as Output // Set SS to High // If USI0/SPI0 is used // Set SS0 pin as Input // If USI1/SPI1 is used // Set SS1 pin as Input // Set SPI as slave // Enable SS pin AN Page 6 of 17

7 Setting the GPIO Alternate Function The routine next enables the alternate functions of the GPIO pins used for SPI. The following code segment sets these alternate functions. // Set GPIO Alternate function for SPI. #ifdef SPI0 P4FSR = ((1<<5) (1<<3) (1<<1)); #ifdef SPI1 P1FSRL = ((1<<1) (1<<0)); P2FSRL = ((1<<3) (1<<2) (1<<1) (1<<0)); For this application, the user can choose between USI0 and USI1 as the SPI. For SPI0, bits 5, 3, and 1 of the Port 4 Function Select Register are set to 1 to enable SCK0, MOSI0, and MISO0 of the SPI0. For SPI1, bits 0 and 1 of the Port 1 Function Select Low Register are set to 1, and bits 0, 1, 2, and 3 of the Port 2 Function Select Low Register are also set to 1; these bit configurations enable SCK1, MOSI1 and MISO1 of the SPI1. Setting the Baud Rate The routine then sets the serial clock for this application, as indicated in the following line of code. SPIBD = ((ulfrequency / (ulbaudrate * 2)) - 1 The ulfrequency and ulbaudrate parameters are used to calculate the baud rate value for the USI Baud Rate Register (USIxBD). Setting the Data Transmission Sequence After setting the clock, the routine selects the data transmission sequence to either MSB first or LSB first. As shown in the following code segment, configuring bit 2 of the USI Control Register 1 (USIxCR1) determines which data transmission sequence will be used. if (ucdataorder == MSB_FIRST) // Data Transfer { SPICR1 = ORD; // MSB First data transfer else SPICR1 &= ~ (ORD); // LSB First data transfer Setting USIxCR1 Bit 2 to 0 will set the transmission sequence of the SPI to LSB first. Conversely, setting this bit to 1 sets the transmission sequence to MSB first. AN Page 7 of 17

8 Setting SPI Clock Polarity and Phase The routine continues by setting the Clock Polarity (CPOL) and Clock Phase (CPHA), configuring bits 0 and 1, respectively, of USI Control Register 1. The following code segment sets the CPOL and CPHA. // Set SPI Operation Mode Leading Edge, Trailing Edge if (ucmode == MODE0) { SPICR1 &= ~(CPHA CPOL); // Sample Rising, Setup Falling else if (ucmode == MODE1) { SPICR1 = CPHA; // Setup Rising, Sample Falling else if (ucmode == MODE2) { SPICR1 = CPOL; // Sample Falling, Setup Rising else if (ucmode == MODE3) { SPICR1 = (CPHA CPOL); // Setup Falling, Sample Rising else { // else Do nothing CPOL determines the serial clock s value during Idle Mode, while CPHA determines if data are sampled on the leading or trailing edge of the serial clock. Enabling the USI, MISO and MOSI The final part of the routine enables the MOSI and MISO lines as well as the USI, as shown in the following line of code. SPICR2 = (TXE RXE USIEN); // Enable TX (MOSI) RX (MISO) and USI SPI Data Transmission In SPI, data is being transmitted by the master thru the MOSI line, while for the slave; the MISO line is used for data transmission. The brief routine that follows shows the transmission of data on SPI. VOID Spi_PutChar (INT8 cdata) { ucdelay = 35; #ifdef MASTER SS_LOW; #else while (SS_IN_HIGH); // Pull Slave Select pin Low // Wait for the master to pull the AN Page 8 of 17

9 while (! (SPIST1 & DRE)); SPIDR = cdata; while (! (SPIST1 & TXC)); #ifdef MASTER while (--ucdelay); SS_HIGH; // putchar // SS pin Low // Check status reg if TX data reg // is empty // Send Byte // Check TX data reg is empty and // all data are // already shifted out // Allow all data to be shifted // Pull Slave Select pin High If the MCU is the master, the routine starts by pulling the SS line Low. However, if the MCU is the slave, the routine will start by waiting for the SS line to be pulled Low. Then, the routine will check if the transmit register of the USI is empty, and if it is empty, the routine will put 8 bits of data to the transmit register before pulling the SS line back to High. SPI Data Reception In SPI, data is being received by the master thru the MISO line, while for the slave, the MOSI line is used for data reception. The routine that follows shows the sequence for receiving data on SPI. INT8 Spi_GetChar(VOID) { INT8 cdata; // First Clean the RX Buffers while (((SPIST1 & DOR) == DOR) ((SPIST1 & RXC)==RXC)) { cdata = SPIDR; #ifdef MASTER Spi_PutChar(DUMMY); #else while(ss_in_high); // Send FFh as dummy byte // Wait for Slave Select Pin while ((SPIST1 & RXC)!= RXC); // Check if Data Register has data cdata = SPIDR; // Read Data Register return (cdata); AN Page 9 of 17

10 Equipment Used The routine starts by clearing the receive buffer of the USI to ensure that no irrelevant data will be processed. If the MCU is the master, the routine will send a dummy byte (0xFF) to the MOSI line to provide a clock pulse to the slave. However, if the MCU is the slave, the routine will wait for the SS line to be pulled Low. The routine will then continuously check to determine if the USI Data Register is not empty. If this register contains data, the routine will read the USI Data Register. This read data will be the return data. This section lists all hardware and software requirements for this application. Hardware Table 5 lists the hardware tools used in this application. Table 5. Required Hardware Description Quantity Z51F3220 Development Kit 2 PC with two available USB ports 1 Connecting wires 6 Software The software tools used to develop this application are: Keil µvision 4 SDCC v AN0359-SC01.zip source code file containing the project and source code files for this application HyperTerminal or equivalent communications/terminal emulation program Testing Setup and Procedure This section discusses the steps for setting up this application and testing the software. Hardware Setup Observe the following procedure to prepare the hardware for this application. See Figure 3 for reference. AN Page 10 of 17

11 Figure 3. Master MCU and Slave MCU Connections 1. Identify which Development Board will be the master and which one will be the slave. 2. Using connecting wires, connect the data and control lines of the master to the slave. There should be five wires running between the master and the slave, as indicated in Figure Connect the master MISO0 (J3 pin 2) to the slave MISO0 (J3 pin 2). 4. Connect the master MOSI0 (J3 pin 3) to the slave MOSI0 (J3 pin 3). 5. Connect the master SCK0 (J3 pin 4) to the slave SCK0 (J3 pin 4). 6. Connect the master SS0 (J3 pin 5) to the slave SS0 (J3 pin 5). 7. Connect the GND (J13) of the master to the GND (J13) of the slave. 8. Check to determine that the jumpers for J16 pins 5 6 and 7 8 on both the master and slave are in place. 9. Connect the Z8051 On-Chip Debugger (OCD) to the host PC s USB port. AN Page 11 of 17

12 10. Connect one end of the 10-circuit cable to the Z8051 OCD. 11. Connect the other end of the 10-circuit cable connector to the Z51F3220 Board s J1 connector. Pin 1 of the cable connector is indicated by the a red stripe. 12. Using the USB-to-USB Mini cable, connect the standard USB end to the host PC's USB port. 13. Connect the other end of this USB-to-USB Mini cable to the Z51F3220 Board's P1 connector to apply power to the board. Note that the LED D5 is ON. Software Configuration To install, configure and test the software for this application, observe the following procedure. 1. Download and install the Z8051 Software and Documentation files if you haven t already done so. These files are available free for download from the Downloadable Software category of the Zilog Store. 2. After the Z8051 software is installed, download the AN0359-SC01.zip file from the Zilog website and unzip it into the following path, which was created during the installation process in Step 1: <Z8051 software installation folder>\samples Note: In the above paths, <Z8051 software installation folder>\samples represents the location of the unzipped AN0359-SC01 file. 3. Open the spi.h file, which is located in the <inc> folder. If the MCU will be the master, ensure that the MASTER macro switch is defined. However, if the MCU will be the slave, comment out the MASTER macro, then save the file. Zilog recommends configuring the master first. 4. The software created for this application is designed in a manner such that the source code must be compiled using either the Keil µvision4 tool or the Small Device C Compiler (SDCC) tool. Select one of these two tools as your compiler, and compile the application software. 5. If the preferred compiler is SDCC, run the build_sdcc.bat file which is contained in the <sdcc> folder. Ensure that the INSTALL_FOLDER variable in the build_sdcc.bat file identifies Z8051_2.1 as the installation path; see the following two examples. 32-bit INSTALL_FOLDER= "C:\Program Files\Zilog\Z8051_ bit INSTALL_FOLDER= "C:\Program Files (x86)\zilog\z8051_2.1 AN Page 12 of 17

13 6. A hex file will be created at the conclusion of the build. Load this hex file to the Z8051 MCU using Zilog s Z8051 OCD software tool. To learn more about the compiling and loading of hex files to the MCU, please refer to the Z8051 Tools Product User Guide (PUG0033). 7. Repeat steps 3 6 to load the application software to the slave MCU. Demonstration 1. After loading the software to the MCU, disconnect each 10-pin OCD connector and each USB-to-USB Mini cable from their respective development boards. Note: One 10-pin OCD connector and one USB-to-USB Mini cable are included in each Z51F3220 Development Kit. 2. Power up the development boards by reconnecting each board to the USB-to-USB mini-usb cable it was connected to earlier. 3. Open two terminal emulation programs such as HyperTerminal (or equivalent program). Configure one terminal as the display/user interface for the master, and configure the other one for the slave. Configure each program to reflect the following settings: 9600 baud 8 bits data frame No parity bit 1 stop bit 4. Reset both MCUs by pressing the reset switches on each Development Board. 5. Immediately after reset, the messages shown in Figure 4 should appear, one each for both master and slave. AN Page 13 of 17

14 Figure 4. HyperTerminal Display After Reset 6. Test whether the master MCU and slave MCU can communicate via the SPI function. Using your keyboard, enter any lower-case alphabetical (i.e., non-numeric) character in the terminal for the master. This character will be sent to the slave through the MOSI line of the SPI. If the transmission is successful, the slave terminal will display this character. The SPI slave will next convert the received character to its upper-case equivalent and transmit it to the SPI master. If this transmission is successful, the character displayed in the master terminal should be the upper-case equivalent of the character you entered earlier. See Figure 5. AN Page 14 of 17

15 Figure 5. HyperTerminal Display for Master and Slave Results In this application, the user is required to enter an alphabetic character in the terminal emulation console for a master. This character is used as a one-byte piece of data that the master will send to a slave. The slave displays the received data in its own terminal console and returns the uppercase equivalent of the received data. The master then displays this received data from the slave to its terminal. This demonstration shows that the Z51F3220 MCU s USI module can be configured to function as a Serial Peripheral Interface, or SPI. The demonstration also shows that the Z51F3220 MCU s SPI function can successfully send and received data as either a master or a slave. Summary References This document describes the implementation of Zilog s Z8051 USI peripherals as SPI master and slave. In this application, two Z51F3220 development boards are used one as an SPI master and the other one as an SPI slave. Two terminal emulation programs are used as both displays and a user interfaces in which the user must enter a keyboard character as input. The software projects included with this application demonstrate that the USI peripheral block can function effectively as an SPI peripheral. The following documents are each associated to the Z8051 MCU and are available free for download from the Zilog website. AN Page 15 of 17

16 Z51F3220 Product Specification (PS0299) Z51F3220 Development Kit User Manual (UM0243) Z8051 Tools Product User Guide (PUG0033) AN Page 16 of 17

17 Customer Support To share comments, get your technical questions answered, or report issues you may be experiencing with our products, please visit Zilog s Technical Support page at To learn more about this product, find additional documentation, or to discover other facets about Zilog product offerings, please visit the Zilog Knowledge Base at zilog.com/kb or consider participating in the Zilog Forum at This publication is subject to replacement by a later edition. To determine whether a later edition exists, please visit the Zilog website at Warning: DO NOT USE THIS PRODUCT IN LIFE SUPPORT SYSTEMS. LIFE SUPPORT POLICY ZILOG S PRODUCTS ARE NOT AUTHORIZED FOR USE AS CRITICAL COMPONENTS IN LIFE SUPPORT DEVICES OR SYSTEMS WITHOUT THE EXPRESS PRIOR WRITTEN APPROVAL OF THE PRESIDENT AND GENERAL COUNSEL OF ZILOG CORPORATION. As used herein Life support devices or systems are devices which (a) are intended for surgical implant into the body, or (b) support or sustain life and whose failure to perform when properly used in accordance with instructions for use provided in the labeling can be reasonably expected to result in a significant injury to the user. A critical component is any component in a life support device or system whose failure to perform can be reasonably expected to cause the failure of the life support device or system or to affect its safety or effectiveness. Document Disclaimer 2013 Zilog, Inc. All rights reserved. Information in this publication concerning the devices, applications, or technology described is intended to suggest possible uses and may be superseded. ZILOG, INC. DOES NOT ASSUME LIABILITY FOR OR PROVIDE A REPRESENTATION OF ACCURACY OF THE INFORMATION, DEVICES, OR TECHNOLOGY DESCRIBED IN THIS DOCUMENT. ZILOG ALSO DOES NOT ASSUME LIABILITY FOR INTELLECTUAL PROPERTY INFRINGEMENT RELATED IN ANY MANNER TO USE OF INFORMATION, DEVICES, OR TECHNOLOGY DESCRIBED HEREIN OR OTHERWISE. The information contained within this document has been verified according to the general principles of electrical and mechanical engineering. Z8, Z8 Encore! and Z8 Encore! XP are trademarks or registered trademarks of Zilog, Inc. All other product or service names are the property of their respective owners. AN Page 17 of 17

Boot Loader for the Z51F6412 MCU

Boot Loader for the Z51F6412 MCU Boot Loader for the Z51F6412 MCU AN037701-0215 Abstract This application note discusses how to create a boot loader program for the Z51F6412 microcontroller, a member of Zilog s Z8051 Family of Microcontrollers.

More information

Getting Started with ESPI Interface Using the Z8 Encore! XP F1680

Getting Started with ESPI Interface Using the Z8 Encore! XP F1680 Application Note Getting Started with ESPI Interface Using the Z8 Encore! XP F1680 AN027301-0308 Abstract This application note demonstrates how to use the Enhanced Serial Peripheral Interface (ESPI) in

More information

An SPI Temperature Sensor Interface with the Z8 Encore! SPI Bus

An SPI Temperature Sensor Interface with the Z8 Encore! SPI Bus Application Note An SPI Temperature Sensor Interface with the Z8 Encore! SPI Bus AN012703-0608 Abstract This Application Note provides an overview of Zilog s Z8 Encore! Serial Peripheral Interface (SPI)

More information

A Simple Console Application for Z8 Encore! XP MCUs

A Simple Console Application for Z8 Encore! XP MCUs A Simple Console Application for Z8 Encore! XP MCUs AN034201-1112 Abstract Console applications are widely used by engineers for ease of project development. For this reason, Zilog has developed a simple

More information

Flash Loader Utility for the Z8 Encore! XP MCU

Flash Loader Utility for the Z8 Encore! XP MCU Application Note Flash Loader Utility for the Z8 Encore! XP MCU AN011806-0408 Abstract This application note describes Flash Loader utility for the Zilog s Z8 Encore! XP MCU that can be operated through

More information

EEPROM Emulation with the ez80f91 MCU. Discussion

EEPROM Emulation with the ez80f91 MCU. Discussion Application Note EEPROM Emulation with the ez80f91 MCU AN015803-0608 Abstract This Application Note describes a method to utilize a portion of Zilog s ez80acclaimplus! MCU s Flash memory to emulate the

More information

Challenge. Hardware Circuit Details. Solution. Result. Features and Functions. Z8 Encore! MC

Challenge. Hardware Circuit Details. Solution. Result. Features and Functions. Z8 Encore! MC Implementation of SMBus Master/Slave Protocol Application Brief Challenge The System Management Bus (SMBus) interface is used by Smart Batteries to pass Smart Battery Data (SBD) to external devices and

More information

Interfacing Z8 Encore! XP MCUs with an I 2 C-Based Character LCD

Interfacing Z8 Encore! XP MCUs with an I 2 C-Based Character LCD Application Note Interfacing Z8 Encore! XP MCUs with an I 2 C-Based Character LCD AN014902-1207 Abstract This Application Note describes APIs for interfacing one or more I 2 C-based character LCDs with

More information

Microcontrollers and Interfacing

Microcontrollers and Interfacing Microcontrollers and Interfacing Week 10 Serial communication with devices: Serial Peripheral Interconnect (SPI) and Inter-Integrated Circuit (I 2 C) protocols College of Information Science and Engineering

More information

High Resolution Digital Weigh-Scale Design Using Z8 Encore! Microcontrollers

High Resolution Digital Weigh-Scale Design Using Z8 Encore! Microcontrollers Application te High Resolution Digital Weigh-Scale Design Using Z8 Encore! Microcontrollers AN025404-0608 Abstract This application note describes the development and use of a Digital Weigh-Scale (DWS)

More information

EE 456 Fall, Table 1 SPI bus signals. Figure 1 SPI Bus exchange of information between a master and a slave.

EE 456 Fall, Table 1 SPI bus signals. Figure 1 SPI Bus exchange of information between a master and a slave. EE 456 Fall, 2009 Notes on SPI Bus Blandford/Mitchell The Serial Peripheral Interface (SPI) bus was created by Motorola and has become a defacto standard on many microcontrollers. This is a four wire bus

More information

The 9S12 Serial Peripheral Inteface (SPI) Huang Section 10.2 through 10.6 SPI Block User Guide

The 9S12 Serial Peripheral Inteface (SPI) Huang Section 10.2 through 10.6 SPI Block User Guide The 9S12 Serial Peripheral Inteface (SPI) Huang Section 102 through 106 SPI Block User Guide The 9S12 Serial Peripheral Interface (SPI) The 9S12 has a Synchronous Serial Interface On the 9S12 it is called

More information

S3 Flash In-System Programmer

S3 Flash In-System Programmer S3 Family of Microcontrollers S3 Flash In-System Programmer UM026604-0816 PRELIMINARY Copyright 2016 Zilog, Inc. All rights reserved. www.zilog.com ii Warning: DO NOT USE THIS PRODUCT IN LIFE SUPPORT SYSTEMS.

More information

Implementing a Secure Digital Card with a ZNEO Microcontroller

Implementing a Secure Digital Card with a ZNEO Microcontroller Implementing a Secure Digital Card with a ZNEO Microcontroller AN032001-1211 Abstract The ability of embedded devices to store data or a volume of data is widespread across multiple industries. The need

More information

SPI Block User Guide V02.07

SPI Block User Guide V02.07 DOCUMENT NUMBER S12SPIV2/D SPI Block User Guide V02.07 Original Release Date: 21 JAN 2000 Revised: 11 Dec 2002 Motorola, Inc. Motorola reserves the right to make changes without further notice to any products

More information

More on the 9S12 SPI Using the Dallas Semiconductor DS1302 Real Time Clock with the 9S12 SPI

More on the 9S12 SPI Using the Dallas Semiconductor DS1302 Real Time Clock with the 9S12 SPI More on the 9S12 SPI Using the Dallas Semiconductor DS1302 Real Time Clock with the 9S12 SPI Using the 9S12 SPI The SPI has a data register (SPIDR) and a shift register. To write data to the SPI, you write

More information

spi 1 Fri Oct 13 13:04:

spi 1 Fri Oct 13 13:04: spi 1 Fri Oct 1 1:: 1.1 Introduction SECTION SERIAL PERIPHERAL INTERFACE (SPI) The SPI module allows full-duplex, synchronous, serial communication with peripheral devices.. Features Features of the SPI

More information

ZMOTION Detection Module Development Kit

ZMOTION Detection Module Development Kit ZEPIR000102ZCOG ZMOTION Detection Module Development Kit UM022306-1210 Copyright 2010 Zilog. All rights reserved. www.zilog.com ii Warning: DO NOT USE IN LIFE SUPPORT LIFE SUPPORT POLICY ZILOG'S PRODUCTS

More information

Understanding SPI with Precision Data Converters

Understanding SPI with Precision Data Converters Understanding SPI with Precision Data Converters By: Tony Calabria Presented by: 1 Communication Comparison SPI - Serial Peripheral Interface Bus I2C - Inter- Integrated Circuit Parallel Bus Advantages

More information

Amarjeet Singh. January 30, 2012

Amarjeet Singh. January 30, 2012 Amarjeet Singh January 30, 2012 Website updated - https://sites.google.com/a/iiitd.ac.in/emsys2012/ Lecture slides, audio from last class Assignment-2 How many of you have already finished it? Final deadline

More information

Module 3.C. Serial Peripheral Interface (SPI) Tim Rogers 2017

Module 3.C. Serial Peripheral Interface (SPI) Tim Rogers 2017 Module 3.C Serial Peripheral Interface (SPI) Tim Rogers 2017 Learning Outcome #3 An ability to effectively utilize the wide variety of peripherals integrated into a contemporary microcontroller How? A:

More information

< W3150A+ / W5100 Application Note for SPI >

< W3150A+ / W5100 Application Note for SPI > < W3150A+ / W5100 Application Note for SPI > Introduction This application note describes how to set up the SPI in W3150A+ or W5100. Both the W3150A+ and W5100 have same architecture. W5100 is operated

More information

Application Note, V1.0, Jul AP XC16x. Interfacing the XC16x Microcontroller to a Serial SPI EEPROM. Microcontrollers

Application Note, V1.0, Jul AP XC16x. Interfacing the XC16x Microcontroller to a Serial SPI EEPROM. Microcontrollers Application Note, V1.0, Jul. 2006 AP16095 XC16x Interfacing the XC16x Microcontroller to a Serial SPI EEPROM Microcontrollers Edition 2006-07-10 Published by Infineon Technologies AG 81726 München, Germany

More information

Serial Peripheral Interface (SPI)

Serial Peripheral Interface (SPI) Serial Peripheral Interface (SPI) MSP432 SPI eusci = enhanced Universal Serial Communications Interface 2 tj MSP432 SPI ARM (AMBA Compliant) 7/8 bit transmission Master/Slave LSB/MSB first Separate RX/TX

More information

Emulating Dual SPI Using FlexIO

Emulating Dual SPI Using FlexIO Freescale Semiconductor, Inc. Document Number: AN5242 Application Note Rev. 0, 01/2016 Emulating Dual SPI Using FlexIO 1. Introduction This application note discusses one example of how to use FlexIO module

More information

EE 308 Spring Using the 9S12 SPI

EE 308 Spring Using the 9S12 SPI Using the 9S12 SPI The SPI has a data register (SPIDR) and a shift register. To write data to the SPI, you write to the SPIDR data register. The 9S12 automatically transfers the data to the shift register

More information

Character LCD Interface for ez80acclaim! MCUs

Character LCD Interface for ez80acclaim! MCUs Application Note Character LCD Interface for ez80acclaim! MCUs AN015902-0708 Abstract This Application Note provides Character LCD driver routines, coded in ANSI C, for Zilog s ez80acclaim! Flash microcontroller-based

More information

Z8 Encore! XP F0822 Series

Z8 Encore! XP F0822 Series High Performance 8-Bit Microcontrollers Z8 Encore! XP F0822 Series Product Brief PB011112-0308 Overview Zilog s Z8 Encore! XP F0822 Series devices are microcontrollers based on Zilog s ez8 CPU. Z8 Encore!

More information

UART TO SPI SPECIFICATION

UART TO SPI SPECIFICATION UART TO SPI SPECIFICATION Author: Dinesh Annayya dinesha@opencores.org Table of Contents Preface... 3 Scope... 3 Revision History... 3 Abbreviations... 3 Introduction... 3 Architecture... 4 Baud-rate generator

More information

Serial Peripheral Interface (SPI) Last updated 8/7/18

Serial Peripheral Interface (SPI) Last updated 8/7/18 Serial Peripheral Interface (SPI) Last updated 8/7/18 MSP432 SPI eusci = enhanced Universal Serial Communications Interface 2 tj MSP432 SPI ARM (AMBA Compliant) 7/8 bit transmission Master/Slave LSB/MSB

More information

OUTLINE. SPI Theory SPI Implementation STM32F0 SPI Resources System Overview Registers SPI Application Initialization Interface Examples

OUTLINE. SPI Theory SPI Implementation STM32F0 SPI Resources System Overview Registers SPI Application Initialization Interface Examples SERIAL PERIPHERAL INTERFACE (SPI) George E Hadley, Timothy Rogers, and David G Meyer 2018, Images Property of their Respective Owners OUTLINE SPI Theory SPI Implementation STM32F0 SPI Resources System

More information

Design and development of embedded systems for the Internet of Things (IoT) Fabio Angeletti Fabrizio Gattuso

Design and development of embedded systems for the Internet of Things (IoT) Fabio Angeletti Fabrizio Gattuso Design and development of embedded systems for the Internet of Things (IoT) Fabio Angeletti Fabrizio Gattuso Microcontroller It is essentially a small computer on a chip Like any computer, it has memory,

More information

Z8 Encore! XP/Z8 Encore! Development Kits

Z8 Encore! XP/Z8 Encore! Development Kits Z8 Encore! XP/Z8 Encore! Development Kits QS004311-0111 Introduction This describes how to set up Zilog s Z8 Encore! XP/Z8 Encore! Development Kits and start using them to build designs and applications

More information

SPI Protocol of the TLE941xy family

SPI Protocol of the TLE941xy family Protocol of the TLE941xy family Application Note Rev 1.0, 2016-04-25 Automotive Power Table of Contents 1 Abstract........................................................................ 3 2 Introduction.....................................................................

More information

Real Time Embedded Systems. Lecture 1 January 17, 2012

Real Time Embedded Systems.  Lecture 1 January 17, 2012 SPI 4-Wire 3-Wire Real Time Embedded Systems www.atomicrhubarb.com/embedded Lecture 1 January 17, 2012 Topic Section Topic Where in the books Catsoulis chapter/page Simon chapter/page Zilog UM197 (ZNEO

More information

ZCRMZNICE01ZEMG Crimzon In-Circuit Emulator

ZCRMZNICE01ZEMG Crimzon In-Circuit Emulator Quick Start Guide QS006602-0408 Introduction Zilog s ZCRMZNICE01ZEMG Crimzon (ICE), shown in Figure 1, provides Crimzon chip family emulation with a Trace and Event system for program debugging using Zilog

More information

Serial Peripheral Interface (SPI) Host Controller Data Sheet

Serial Peripheral Interface (SPI) Host Controller Data Sheet Serial Peripheral Interface (SPI) Host Controller Data Sheet Proven System Block (PSB) for QuickLogic Customer Specific Standard Products (CSSPs) Features Supports Master configuration (Multi-Master configuration

More information

ez80f91 Modular Development Kit

ez80f91 Modular Development Kit ez80f91 Modular Development Kit An Company Quick Start Guide QS004611-0810 Introduction This quick qtart guide provides instructions and configuration information for Zilog s ez80f91 Mini Ethernet module,

More information

Zilog TCP/IP Software Suite

Zilog TCP/IP Software Suite QS004914-1211 Introduction This quick start guide helps you to get started with the Zilog TCP/IP Software Suite for Zilog s ez80acclaim! family, which includes the ez80f91, ez80f92 and ez80f93 microcontrollers

More information

Serial Communication. Spring, 2018 Prof. Jungkeun Park

Serial Communication. Spring, 2018 Prof. Jungkeun Park Serial Communication Spring, 2018 Prof. Jungkeun Park Serial Communication Serial communication Transfer of data over a single wire for each direction (send / receive) Process of sending data one bit at

More information

Section 5 SERCOM. Tasks SPI. In this section you will learn:

Section 5 SERCOM. Tasks SPI. In this section you will learn: Section 5 SERCOM SPI Tasks In this section you will learn: SPI protocol SERCOM Engine on SAMD20 How to use SERRCOM in SPI mode Implementation of SPI communication 04/12/2013 Table of Contents 1. The SPI

More information

AN HI-3200 Avionics Data Management Engine Evaluation Board Software Guide

AN HI-3200 Avionics Data Management Engine Evaluation Board Software Guide August 12, 2011 AN - 166 HI-3200 Avionics Data Management Engine Evaluation Board Software Guide Introduction This application note provides more detail on the HI-3200 demo software provided in the Holt

More information

Lecture 14 Serial Peripheral Interface

Lecture 14 Serial Peripheral Interface www.atomicrhubarb.com/systems Lecture 14 Serial Peripheral Interface Section Topic Where in the books Zilog PS220 "Enhanced Serial Peripheral Interface" Assorted datasheets Synchronous Serial Buses 1-wire

More information

i_csn i_wr i_rd i_cpol i_cpha i_lsb_first i_data [15:0] o_data [15:0] o_tx_ready o_rx_ready o_rx_error o_tx_error o_tx_ack o_tx_no_ack

i_csn i_wr i_rd i_cpol i_cpha i_lsb_first i_data [15:0] o_data [15:0] o_tx_ready o_rx_ready o_rx_error o_tx_error o_tx_ack o_tx_no_ack October 2012 Introduction Reference Design RD1142 The Serial Peripheral Interface (SPI) is used primarily for synchronous serial communication between a host processor and its peripherals. The SPI bus

More information

An Automatic Temperature Control System Using RZK

An Automatic Temperature Control System Using RZK Application Note An Automatic Temperature Control System Using RZK AN019902-0908 Abstract This application note demonstrates how an application running on Zilog s Real-Time Kernel (RZK) can be used to

More information

ZLF645 Crimzon Flash Microcontroller with ZBase Database Industry Leading Universal Infrared Remote Control (UIR) Solution

ZLF645 Crimzon Flash Microcontroller with ZBase Database Industry Leading Universal Infrared Remote Control (UIR) Solution digital infrared Solutions CRIMZON ZLF645 Flash MCU uir solution with zbase database CRIMZON ZLF645 advantage 32/64 kb flash 512 b/1 kb ram crimzon z8 lxmc core ir transmission ir learning tuned ir amplifier

More information

Menu. What is SPI? EEL 3744 EEL 3744 SPI

Menu. What is SPI? EEL 3744 EEL 3744 SPI Menu Concepts >Problems in serial communications Timing Synchronization: How do you line up the bit boundaries? Message Synchronization: How do you line up messages? Look into my... >Synchronous data solves

More information

Please refer to "4. Evaluation Board" on page 2 for more information about these steps. Figure 1. System Connections

Please refer to 4. Evaluation Board on page 2 for more information about these steps. Figure 1. System Connections CP2120 EVALUATION KIT USER S GUIDE 1. Kit Contents The CP2120 Evaluation Kit contains a CP2120 evaluation board and a power supply. The following supporting documents can be downloaded from www.silabs.com:

More information

Interfacing Techniques in Embedded Systems

Interfacing Techniques in Embedded Systems Interfacing Techniques in Embedded Systems Hassan M. Bayram Training & Development Department training@uruktech.com www.uruktech.com Introduction Serial and Parallel Communication Serial Vs. Parallel Asynchronous

More information

An SPI interface for the 65(C)02 family of microprocessors

An SPI interface for the 65(C)02 family of microprocessors Rev 4/B Dec 30, 2011 65SPI/B An SPI interface for the 65(C)02 family of microprocessors This device was created to provide a basic SPI interface for the 65xx family of microprocessors. Currently, the only

More information

Serial Peripheral Interface. What is it? Basic SPI. Capabilities. Protocol. Pros and Cons. Uses

Serial Peripheral Interface. What is it? Basic SPI. Capabilities. Protocol. Pros and Cons. Uses Serial Peripheral Interface What is it? Basic SPI Capabilities Protocol Serial Peripheral Interface http://upload.wikimedia.org/wikipedia/commons/thumb/e/ed/ SPI_single_slave.svg/350px-SPI_single_slave.svg.png

More information

Raspberry Pi - I/O Interfaces

Raspberry Pi - I/O Interfaces ECE 1160/2160 Embedded Systems Design Raspberry Pi - I/O Interfaces Wei Gao ECE 1160/2160 Embedded Systems Design 1 I/O Interfaces Parallel I/O and Serial I/O Parallel I/O: multiple input/output simultaneously

More information

Ethernet Smart Cable

Ethernet Smart Cable User Manual UM020704-0508 Introduction Zilog s Ethernet Smart Cable (ESC), ZENETSC0100ZACG, allows you to connect the Z8 Encore!, Z8 Encore! XP, ZNEO, or ez80acclaim! development board to a Zilog Developer

More information

S3F8S5A Development Kit

S3F8S5A Development Kit S3 Family of Microcontrollers S3F8S5A Development Kit Copyright 06 Zilog, Inc. All rights reserved. www.zilog.com ii Warning: DO NOT USE THIS PRODUCT IN LIFE SUPPORT SYSTEMS. LIFE SUPPORT POLICY ZILOG

More information

Using FlexIO to emulate communications and timing peripherals

Using FlexIO to emulate communications and timing peripherals NXP Semiconductors Document Number: AN12174 Application Note Rev. 0, 06/2018 Using FlexIO to emulate communications and timing peripherals 1. Introduction The FlexIO is a new on-chip peripheral available

More information

Synchronous = SPI (3 options)

Synchronous = SPI (3 options) CS/ECE 6780/5780 Al Davis Today s topics: Last lecture general serial I/O concepts more specifics on asynchronous SCI protocol Today specifics of synchronous SPI details of the SCI programming ritual 1

More information

EDBG. Description. Programmers and Debuggers USER GUIDE

EDBG. Description. Programmers and Debuggers USER GUIDE Programmers and Debuggers EDBG USER GUIDE Description The Atmel Embedded Debugger (EDBG) is an onboard debugger for integration into development kits with Atmel MCUs. In addition to programming and debugging

More information

APPLICATION NOTE. Atmel AT02260: Driving AT42QT1085. Atmel QTouch. Features. Description

APPLICATION NOTE. Atmel AT02260: Driving AT42QT1085. Atmel QTouch. Features. Description APPLICATION NOTE Atmel AT02260: Driving AT42QT1085 Atmel QTouch Features Overview of Atmel AT42QT1085 Circuit configuration with Host MCU SPI communication Demonstration program Description This application

More information

AN10428 UART-SPI Gateway for Philips SPI slave bridges

AN10428 UART-SPI Gateway for Philips SPI slave bridges UART-SPI Gateway for Philips SPI slave bridges Rev. 01 7 March 2006 Application note Document information Info Keywords Abstract Content UART-SPI Gateway, UART to SPI, RS-232 to SPI The UART-SPI Gateway

More information

Asynchronous & Synchronous Serial Communications Interface. Student's name & ID (1): Partner's name & ID (2): Your Section number & TA's name

Asynchronous & Synchronous Serial Communications Interface. Student's name & ID (1): Partner's name & ID (2): Your Section number & TA's name MPS Serial Communication Lab Exercise Asynchronous & Synchronous Serial Communications Interface Student's name & ID (1): Partner's name & ID (2): Your Section number & TA's name Notes: You must work on

More information

Z8 Encore! XP F1680 Series 8-Bit Flash Solution with Extended Peripherals

Z8 Encore! XP F1680 Series 8-Bit Flash Solution with Extended Peripherals Embedded Flash Solutions Z8 Encore! XP F1680 Series High-performance 8-bit Flash MCU F1680 advantage low power - 1.8 V highly integrated peripherals flexible memory options optimized cost/performance target

More information

SPI 3-Wire Master (VHDL)

SPI 3-Wire Master (VHDL) SPI 3-Wire Master (VHDL) Code Download Features Introduction Background Port Descriptions Clocking Polarity and Phase Command and Data Widths Transactions Reset Conclusion Contact Code Download spi_3_wire_master.vhd

More information

AN10955 Full-duplex software UART for LPC111x and LPC13xx

AN10955 Full-duplex software UART for LPC111x and LPC13xx Rev. 1 13 July 2010 Application note Document information Info Content Keywords LPC111X, LPC13XX, UART, software Abstract This application note illustrates how software running on an LPC111X or LPC13XX

More information

SPI Overview and Operation

SPI Overview and Operation White Paper Abstract Communications between semiconductor devices is very common. Many different protocols are already defined in addition to the infinite ways to communicate with a proprietary protocol.

More information

For reference only Refer to the latest documents for details

For reference only Refer to the latest documents for details STM32F3 Technical Training For reference only Refer to the latest documents for details Serial peripheral interface SPI 3 SPI Features (1/2) 3 Full duplex synchronous transfers (3 lines) Half duplex/simplex

More information

Embedded Systems and Software. Serial Interconnect Buses I 2 C (SMB) and SPI

Embedded Systems and Software. Serial Interconnect Buses I 2 C (SMB) and SPI Embedded Systems and Software Serial Interconnect Buses I 2 C (SMB) and SPI I2C, SPI, etc. Slide 1 Provide low-cost i.e., low wire/pin count connection between IC devices There are many of serial bus standards

More information

USER GUIDE EDBG. Description

USER GUIDE EDBG. Description USER GUIDE EDBG Description The Atmel Embedded Debugger (EDBG) is an onboard debugger for integration into development kits with Atmel MCUs. In addition to programming and debugging support through Atmel

More information

Design with Microprocessors

Design with Microprocessors Design with Microprocessors Lecture 6 Interfaces for serial communication Year 3 CS Academic year 2017/2018 1 st Semester Lecturer: Radu Dănescu Serial communication modules on AVR MCUs Serial Peripheral

More information

Serial Communication Controllers (SCC) MULTIPROTOCOL DATA COMMUNICATION SOLUTIONS

Serial Communication Controllers (SCC) MULTIPROTOCOL DATA COMMUNICATION SOLUTIONS Serial Communication Controllers (SCC) MULTIPROTOCOL DATA COMMUNICATION SOLUTIONS SCC ADVANTAGES SUMMARY MULTIPLE CLOCK SPEEDS MULTIPLE PACKAGES MULTIPLE PROTOCOLS TARGET APPLICATIONS COMPUTER PERIPHERALS

More information

Serial Peripheral Interface (SPI)

Serial Peripheral Interface (SPI) SPI = Simple, 3 wire, full duplex, synchronous serial data transfer Interfaces to many devices, even many non-spi peripherals Can be a master or slave interface 4 interface pins: -MOSI master out slave

More information

Application Note, V 1.1, Apr AP08006 C868. Interfacing SPI/I2C Serial EEPROM with C868 Microcontroller. Microcontrollers. Never stop thinking.

Application Note, V 1.1, Apr AP08006 C868. Interfacing SPI/I2C Serial EEPROM with C868 Microcontroller. Microcontrollers. Never stop thinking. Application Note, V 1.1, Apr. 2005 AP08006 C868 Interfacing SPI/I2C Serial EEPROM with C868 Microcontroller Microcontrollers Never stop thinking. Edition 2005-04-01 Published by Infineon Technologies AG

More information

Zilog Real-Time Kernel

Zilog Real-Time Kernel An Company Configurable Compilation RZK allows you to specify system parameters at compile time. For example, the number of objects, such as threads and semaphores required, are specez80acclaim! Family

More information

DISCONTINUED. SPI Communication with AMT bit Absolute Encoder

DISCONTINUED. SPI Communication with AMT bit Absolute Encoder ApplicAtion note An-1001 SPI Communication with AMT203 12-bit Absolute Encoder introduction This application note is designed to provide guidelines on how to properly interface with the AMT 203 Absolute

More information

SPI Universal Serial Communication Interface SPI Mode

SPI Universal Serial Communication Interface SPI Mode SPI Universal Serial Communication Interface SPI Mode Serial Peripheral Interface (SPI) is not really a protocol, but more of a general idea. It s the bare-minimum way to transfer a lot of data between

More information

Serial Communications

Serial Communications 1 Serial Interfaces 2 Embedded systems often use a serial interface to communicate with other devices. Serial Communications Serial implies that it sends or receives one bit at a time. Serial Interfaces

More information

Serial Communication. Simplex Half-Duplex Duplex

Serial Communication. Simplex Half-Duplex Duplex 1.5. I/O 135 Serial Communication Simplex Half-Duplex Duplex 136 Serial Communication Master-Slave Master Master-Multi-Slave Master Slave Slave Slave (Multi-)Master Multi-Slave Master Slave Slave Slave

More information

Universität Dortmund. IO and Peripheral Interfaces

Universität Dortmund. IO and Peripheral Interfaces IO and Peripheral Interfaces Microcontroller System Architecture Each MCU (micro-controller unit) is characterized by: Microprocessor 8,16,32 bit architecture Usually simple in-order microarchitecture,

More information

UM2092 User manual. Basic metrology firmware for the STM32F103RD and the STPM32 devices. Introduction

UM2092 User manual. Basic metrology firmware for the STM32F103RD and the STPM32 devices. Introduction User manual Basic metrology firmware for the STM32F103RD and the STPM32 devices Introduction The following document describes a firmware for the STM32F103RD microcontroller to manage the STPM32 metrology

More information

AP16050 SAB C161V/K/O. Emulating an asynchronous serial interface (ASC) via software routines. Microcontrollers. Application Note, V 1.0, Feb.

AP16050 SAB C161V/K/O. Emulating an asynchronous serial interface (ASC) via software routines. Microcontrollers. Application Note, V 1.0, Feb. Application Note, V 1.0, Feb. 2004 SAB C161V/K/O Emulating an asynchronous serial interface (ASC) via software routines. AP16050 Microcontrollers Never stop thinking. TriCore Revision History: 2004-02

More information

Hello, and welcome to this presentation of the STM32 Universal Synchronous/Asynchronous Receiver/Transmitter Interface. It covers the main features

Hello, and welcome to this presentation of the STM32 Universal Synchronous/Asynchronous Receiver/Transmitter Interface. It covers the main features Hello, and welcome to this presentation of the STM32 Universal Synchronous/Asynchronous Receiver/Transmitter Interface. It covers the main features of this USART interface, which is widely used for serial

More information

McMaster University Embedded Systems. Computer Engineering 4DS4 Lecture 6 Serial Peripherals Amin Vali Feb. 2016

McMaster University Embedded Systems. Computer Engineering 4DS4 Lecture 6 Serial Peripherals Amin Vali Feb. 2016 McMaster University Embedded Systems Computer Engineering 4DS4 Lecture 6 Serial Peripherals Amin Vali Feb. 2016 Serial Peripherals I2C Inter-IC Bus X/Y Coord. RGB data LCD config controller LCD data controller

More information

AN2737 Application note Basic in-application programming example using the STM8 I 2 C and SPI peripherals Introduction

AN2737 Application note Basic in-application programming example using the STM8 I 2 C and SPI peripherals Introduction Application note Basic in-application programming example using the STM8 I 2 C and SPI peripherals Introduction This application note is one of a set of application notes giving examples of how to use

More information

Objective: Additional project details: Code: PSEMBP 100 Category:STEM Level: High School/Community C.

Objective: Additional project details: Code: PSEMBP 100 Category:STEM Level: High School/Community C. Objective: At the end of this session, you will have a fair understanding of - Z8 Encore! language tools including C compiler, assembler, linker/locator, and librarian - Instruction set simulator and disassembler

More information

Digital UART Product Specification

Digital UART Product Specification Copyright 2016 Zilog, Inc. All rights reserved. www.zilog.com DIgital UART ii Warning: DO NOT USE THIS PRODUCT IN LIFE SUPPORT SYSTEMS. LIFE SUPPORT POLICY ZILOG'S PRODUCTS ARE NOT AUTHORIZED FOR USE AS

More information

or between microcontrollers)

or between microcontrollers) : Communication Interfaces in Embedded Systems (e.g., to interface with sensors and actuators or between microcontrollers) Spring 2016 : Communication Interfaces in Embedded Systems Spring (e.g., 2016

More information

App Note Application Note: Addressing Multiple FPAAs Using a SPI Interface

App Note Application Note: Addressing Multiple FPAAs Using a SPI Interface Rev: 1.0.0 Date: 23 rd Jan 2015 App Note - 310 Application Note: Addressing Multiple FPAAs Using a SPI Interface TABLE OF CONTENTS 1 PURPOSE... 2 2 THE SPI INTERFACE... 3 2.1 OVERVIEW... 3 2.2 DETAILED

More information

Communication. Chirag Sangani

Communication. Chirag Sangani Communication Scope of Communication Telephones and cell phones. Satellite networks. Radio and DTH services. Campus LAN and wireless. Internet. Intra-galactic communication. Essentials of Communication

More information

SBAT90USB162 Atmel. SBAT90USB162 Development Board User s Manual

SBAT90USB162 Atmel. SBAT90USB162 Development Board User s Manual SBAT90USB162 Atmel AT90USB162 Development Board User s manual 1 1. INTRODUCTION Thank you for choosing the SBAT90USB162 Atmel AT90USB162 development board. This board is designed to give a quick and cost-effective

More information

Read section 8 of this document for detailed instructions on how to use this interface spec with LibUSB For OSX

Read section 8 of this document for detailed instructions on how to use this interface spec with LibUSB For OSX CP2130 INTERFACE SPECIFICATION 1. Introduction The Silicon Labs CP2130 USB-to-SPI bridge is a device that communicates over the Universal Serial Bus (USB) using vendor-specific control and bulk transfers

More information

Addressing scheme to address a specific devices on a multi device bus Enable unaddressed devices to automatically ignore all frames

Addressing scheme to address a specific devices on a multi device bus Enable unaddressed devices to automatically ignore all frames 23. USART 23.1 Features Full-duplex operation Asynchronous or synchronous operation Synchronous clock rates up to 1/2 of the device clock frequency Asynchronous clock rates up to 1/8 of the device clock

More information

Introduction the Serial Communications Huang Sections 9.2, 10.2 SCI Block User Guide SPI Block User Guide

Introduction the Serial Communications Huang Sections 9.2, 10.2 SCI Block User Guide SPI Block User Guide Introduction the Serial Communications Huang Sections 9.2,.2 SCI Block User Guide SPI Block User Guide Parallel Data Transfer Suppose you need to transfer data from one HCS2 to another. How can you do

More information

M68HC08 Microcontroller The MC68HC908GP32. General Description. MCU Block Diagram CPU08 1

M68HC08 Microcontroller The MC68HC908GP32. General Description. MCU Block Diagram CPU08 1 M68HC08 Microcontroller The MC68HC908GP32 Babak Kia Adjunct Professor Boston University College of Engineering Email: bkia -at- bu.edu ENG SC757 - Advanced Microprocessor Design General Description The

More information

Maxim > Design Support > Technical Documents > Application Notes > Microcontrollers > APP 4465

Maxim > Design Support > Technical Documents > Application Notes > Microcontrollers > APP 4465 Maxim > Design Support > Technical Documents > Application Notes > Microcontrollers > APP 4465 Keywords: MAXQ, MAXQ610, UART, USART, serial, serial port APPLICATION NOTE 4465 Using the Serial Port on the

More information

Section 16. Basic Sychronous Serial Port (BSSP)

Section 16. Basic Sychronous Serial Port (BSSP) M 16 Section 16. Basic Sychronous Serial Port (BSSP) BSSP HIGHLIGHTS This section of the manual contains the following major topics: 16.1 Introduction...16-2 16.2 Control Registers...16-3 16.3 SPI Mode...16-6

More information

USB-to-I2C. Professional Hardware User s Manual.

USB-to-I2C. Professional Hardware User s Manual. USB-to-I2C Professional Hardware User s Manual https://www.i2ctools.com/ Information provided in this document is solely for use with the USB-to-I2C Professional product from SB Solutions, Inc. SB Solutions,

More information

Using the MagAlpha Serial Interface Advanced Features. Application Note

Using the MagAlpha Serial Interface Advanced Features. Application Note AN137 Using the MagAlpha Serial Interface Advanced Features Using the MagAlpha Serial Interface Advanced Features Application Note Prepared by M. Kaelin June 2018 TABLE OF CONTENTS INTRODUCTION... 3 PARITY

More information

output current sink/source 2 ma PIC 16F690 (see datasheet) SPI resolution 12 bit position accuracy 0.2 deg

output current sink/source 2 ma PIC 16F690 (see datasheet) SPI resolution 12 bit position accuracy 0.2 deg date 02/12/2013 page 1 of 7 SERIES: AMT203 DESCRIPTION: MODULAR ENCODER FEATURES 12 bit (4,096 positions) SPI communication small size 37mm incremental line count up to 1,024 single pulse index capacitive

More information

Set Up a PLL Loop Filter on the ez80f91 MCU

Set Up a PLL Loop Filter on the ez80f91 MCU Application Note Set Up a PLL Loop Filter on the ez80f91 MCU AN017504-0108 Abstract This document provides information that will help an application developer effectively use the ez80f91 MCU s on-chip

More information

Emulating I2C Bus Master by using FlexIO

Emulating I2C Bus Master by using FlexIO Freescale Semiconductor, Inc. Document Number: AN5133 Application Notes Rev. 0, 06/2015 Emulating I2C Bus Master by using FlexIO 1. Introduction This application note lists the steps to use the FlexIO

More information

Serial communications with SPI

Serial communications with SPI Serial communications with SPI DRAFT VERSION - This is part of a course slide set, currently under development at: http://mbed.org/cookbook/course-notes We welcome your feedback in the comments section

More information