Home

AN-812 - Analog Devices

image

Contents

1. 4 is an easy to use solution that requires very few external components Moreover the user can disable the outputs from the translator at any time by pulling Pin 8 EN low Figure 5 shows the implementation of the SPI boot circuit with the voltage level translator OBTAINING CODE AND PROGRAMMING TOOLS Source code and installer with programming tools can be found at no cost at www analog com For information about the PicFLASH USB programmer go to www mikroelektronika co yu 5V SPI_VDD C429 0 1yF vecy VCCA Y1 A1 SCLK_DUT Y2 A2 SDIO_DUT Y3 A3 CSB_DUT Y4 9 EN ADC3304BRUZ CLOSED HI Z GPO OPEN NORMAL OP NCLA GP3 CLOSE WHEN PROGRAMMING PIC U402 05686 005 Figure 5 SPI Boot Circuit with Translator Rev 0 Page 6 of 8 COMPONENT DETAILS AND BOM Table 2 Recurring Components QTY DEVICE RES_402 SWITCHO1 PIC12F629_SOIC HEADER10 S 1 Any three position switch May also use a jumper block Table 3 One Time Purchases QTY DEVICE 1 PIC Flash USB Programmer 1 Or any PIC compatible serial programmer Table 4 Optional Components QTY DEVICE 8 Lead SOIC Socket LED_GAAS RES 402 ADG3304 PUSHBUTTON oS i Rev 0 Page 7 of 8 REFERENCES Interfacing to High Speed ADCs via SPI User Manual is available at www analog com The ADG3304 data sheet is available at www analog com The PIC12F629 data shee
2. ANALOG DEVICES AN 812 APPLICATION NOTE One Technology Way P O Box 9106 Norwood MA 02062 9106 U S A Tel 781 329 4700 Fax 781 461 3113 www analog com Microcontroller Based Serial Port Interface SPI Boot Circuit by Alfredo Barriga INTRODUCTION This application note describes the operation of a general purpose microcontroller based Serial Port Interface SPI boot circuit This is a low cost solution for users who need to modify some of their device s parameters at power up This circuit addresses a 3 wire SPI application for programming converters or any device that has a SPI option and sends commands to user defined SPI registers gt ts CSB SCLK DON T CARE SDIO DON T CARE SPI DEFINITIONS The SPI port consists of three pins These are the serial clock pin SCLK the serial data IO pin SDIO and the chip select bar pin CSB SCLK is the serial shift clock in and is used to synchronize serial interface reads and writes SDIO is a dual purpose pin which is used as an input and output depending on the instruction being sent and the relative position in the timing frame CSB is an active low control that gates the read and write cycles Figure 1 shows the SPI timing details Table 1 provides specifications DON T CARE DON T CARE 05686 001 Figure 1 SPI Timing Details Table 1 Specification Name Meaning tos Setup time between data and rising edge o
3. f SCLK toH Hold time between data and rising edge of SCLK tak Period of the clock ts Setup time between CSB and SCLK ty Hold time between CSB and SCLK thi Minimum period that SCLK should be in a logic high state tlo Minimum period that SCLK should be in a logic low state Rev 0 Page 1 of 8 TABLE OF CONTENTS TritrO duction enea n ele E da anche AEE 1 SPUD ef IONS eyna A R 1 REVISION FAIS TORY orere aeaeo eE r eE 2 Circuit Description es ssesssesesesseessessressressessresseosseosrtnseenreesrenseesees 3 Configuration File sss sssssssssssssssssssssssssssrsetteesssssssnsrssrteessssssssrssene 3 Circuit Operation errr a p e R REN tl 4 Programming the Device sincisoin s 5 Off PCB Programing ss cssscsessacssechessasesienssesshuscseosiossssvedesssavebas 5 Voltage Level Translation ssssssssssssssssssssssssssrserstsssssssssssssreessss 6 Obtaining Code and Programming Tools 6 Component Details and BOM eeeessesssesesseesessesseessesseeseeseesees 7 References cs s dsvscssd a AE A AE aa E Risa 8 REVISION HISTORY 12 05 Revision 0 Initial Version Rev 0 Page 2 of 8 CIRCUIT DESCRIPTION The core of this particular SPI boot circuit is the PIC12F629 microcontroller This Flash based device is capable of writing to the SPI port using the SCLK SDIO and CSB control signals It can be programmed many times to fit different application needs and because of its small size can be easily incorporated on any de
4. he market such as the PicFLASH USB programmer by MikroElektronika This programmer can be purchased online at a low cost Programming specifications require that the unit be powered at 5 V during programming If the microcontroller is operated at a voltage smaller than 5 V a switch or a two position jumper must be added to select from system supply and programming supply SW1 A three position switch allows the circuit to be in three different modes programming mode normal SPI mode and power off The off position can be incorporated if the user does not want to write to the SPI port when the system is powered up To eliminate the need of switching between programming supply and system supply the microcontroller can be permanently powered at 5 V This adds simplicity to the design and at the same time complies with the programming voltage requirement 3 3V O R2 ET PIC12F629_SN OFF PCB PROGRAMMING The user may choose to program the microcontroller before soldering it to the board This can be done by using the appropriate socket for the package selected 8 lead PDIP SOIC or DFN S The control lines used by the programmer can be directly connected into the socket for off PCB programming Figure 3 shows a simplified schematic using a preprogrammed microcontroller In this circuit VDD is directly connected to the 3 3 V supply and the RESET button is permanently removed from MCLR Pin 4 The user can choose to enable o
5. r disable the microcontroller by adding a jumper between the supply and the VDD pin Another advantage of programming the microcontroller off PCB is that there is no worry about setting the microcontroller to a voltage that matches the required programming supply voltage The device can be powered at any voltage between 2 V and 5 5 V providing the flexibility of using an existing power supply o5686 004 SPI PORT Figure 4 SPI Boot Circuit Simplified Rev 0 Page 5 of 8 VOLTAGE LEVEL TRANSLATION Logic thresholds are dictated by the process and design implemented on each product On some products SPI inputs are 5 V or 3 3 V tolerant However other products may only accept smaller voltages for example 1 8 V In this case it might be necessary to incorporate a voltage level translator to adapt the levels from the microcontroller to levels acceptable to the inputs of the DUT It is recommended that the customer uses the ADG3304 which is a four channel bidirectional level translator The translator can be customized to perform bidirectional logic level translation without an additional signal to set the direction in which the translation takes place For instance if the microcontroller is operating at 5 V supply and 5V RESET REPROGRAM OPTIONAL ISP PIC PROGRAMMING HEADER V the SPI port is 1 8 V tolerant the ADG3304 can be set so that it translates the SCLK SDI and CSB signals from 5 V to 1 8 V The ADG330
6. sign CONFIGURATION FILE The configuration file to be programmed into the chip is automatically generated by a standalone LabVIEW application which allows the user to specify the number of registers to be accessed and the 8 bit data word to be written on each location LabView generates the assembly code which is then compiled and linked to produce the hex file to be programmed into the microcontroller There are two applications used for this purpose which are called by the main LabVIEW standalone configuration program SPI Code Builder exe MPASM by Microchip is used to compile and link the assembly program and PicFLASH by MikroElektronika serves as a programmer to load the generated hex file into the microcontroller These two Windows based applications have been included in the SPI Code Builder application setup file The user may also employ any other compiler and programming application to assemble the source code provided by the standalone program Figure 2 shows an example of the SPI Code Builder and PicFLASH Programmer windows Bandgap CaL Voltage gt v F OSCCAL and BANDGAP Protect MID Locations 1 SFFF 2 FF 3 3FFF 4 FFF Progam Memory Soe 1K Device Statur Idie 05686 002 Figure 2 SPI Code Builder and PicFLASH Windows Rev 0 Page 3 of 8 CIRCUIT OPERATION The PIC12F629 is a low cost 8 pin 8 bit microcontroller It down mode in which minimal power is dissipa
7. t and MPLAB PM3 ICSP Design Guide can be obtained from Microchip at www microchip com Information on the PicFLASH USB Programmer and open source software can be obtained at www mikroelektronika co yu 2005 Analog Devices Inc All rights reserved Trademarks and ANALOG registered trademarks are the property of their respective owners AN05686 0 12 05 0 DEVICES www analog com Rev 0 Page 8 of 8
8. ted 13 uW features an internal oscillator which can be enabled to eliminate max The device can be restarted at any time by pressing the the need of using an external clock source The device operates RESET button or simply by cycling the power supply An at an internal frequency of 4 MHz and the clock output optional LED may be connected to Pin 3 GP4 to indicate that frequency from the SCLK pin is based on its operating speed the device is busy during the data transfer process Figure 3 and number of instruction cycles shows the SPI boot circuit schematic diagram This circuit can The microcontroller operates immediately after power up by sending write commands to the target device After the be used for any 3 3 V tolerant SPI interface and can be implemented very inexpensively A voltage level translator may also be incorporated for devices requiring lower input voltages microcontroller has finished sending the data it enters a power R2 SPI PORT 4 7KQ Gata O SCLK sw2 O SDI T 7 o CSB RESET OPTIONAL ISP PIC PROGRAMMER OPTIONAL 05686 003 Figure 3 SPI Boot Circuit Rev 0 Page 4 of 8 PROGRAMMING THE DEVICE The microcontroller used in this implementation can be serially programmed while in the end application circuit This is done with two lines for clock and data and three lines for power ground and programming voltage RESET There are a number of low cost serial and USB programmers available in t

Download Pdf Manuals

image

Related Search

Related Contents

    Euroline Bedienungsanleitung  Mode d`emploi    Descargar - Whirlpool  Upgrade to Kaspersky Internet Security 2016 1 User at Fry`s  3.3 PT Programming  Topcom Microwave sterilizer - Travelizer Bag 100  TDP-PX10 DATA PROJECTOR - The Rotary Club of Chippewa Falls  

Copyright © All rights reserved.
Failed to retrieve file