Home

A/D Conversion in Continuous Scan Mode

image

Contents

1. tENESAS APPLICATION NOTE SH7146 SH7149 Group A D Conversion in Continuous Scan Mode 1 Introduction This application note describes the procedure to execute the sample program on the Renesas Technology CPU board with the ELOA USB emulator 1 1 Specifications Use the A D converter to convert analog signals to digital numbers in continuous scan mode for three times on analog input channels 8 to 11 AN8 to AN11 The converted data are stored in RAM 1 2 Modules Used e 10 bit A D converter 1 3 Applicable Conditions MCU SH7149 Operating Frequency Internal clock 80 MHz Bus clock 40 MHz Peripheral clock 40 MHz Integrated Development Renesas Technology Corp Environment High performance Embedded Workshop Ver 4 04 01 C compiler Renesas Technology SuperH RISC engine Family C C compiler package Ver 9 02 Release 00 Compiler options cpu she2 include WORKSPDIR inc object CONFIGDIR FILELEAF obj debug gbr auto chgincpath errorpath global_ volatile 0 opt_range all infinite_loop 0 del_vacant_loop 0 struct_alloc 1 nologo 1 4 Directory Configuration of the Sample Program The sample program consists of the following directories oe Application note directory stores all of sample Application note text This file readme_e txt explains how to use the sample project workspace GJ workspace stores the sample project workspace bie Sample project workspace directory Figure
2. Administration El Figure 3 1 Welcome Dialog Box Note A project workspace is a user s working area to store projects and their configurations A project consists of a configuration necessary to create programs or final binary files and a set of files For more information about the project workspace refer to the SuperH RISC engine High performance Embedded Workshop 4 User s Manual REJ05B1266 0100 Rev 1 00 March 2009 Page 2 of 15 SH7146 SH7149 Group A D Conversion in Continuous Scan Mode CENESAS 6 The Open Workspace dialog box shown below will appear Specify the directory as below in the dialog box This application note describes an example to execute the sh7149_adc_Icycle Directory that stores the sample project workspace C WorkSpace sh7149_adc_Icycle 7 After specifying the directory select the following file and click Select to open Look in E shf 149 ade 1 cycle d ft i be ish 149 adc icycle hws File name sh 1 49 adc Tcycle hws Files of type HEW Workspaces hws Cancel Figure 3 2 Open Workspace Dialog Box Ze Note The dialog box that indicates the directory in the workspace has been moved may appear at the first time Click Yes to continue REJ05B1266 0100 Rev 1 00 March 2009 Page 3 of 15 SH7146 SH7149 Group A D Conversion in Continuous Scan Mode CENESAS 8 The Select Emulator mode dialog box will appear Select the it
3. Debug Setup Tools Test Window Help Ca ig E 4 Debug Sessions 7 gy A a m had Debug SessionSH 146Series_E EF Ea Ei BM Be By TH Debus settings eZ ia te Bi Reset CPU Be shfl49 adc cycle Fel Go Es I Ta sample j l D C source file Reset Go Shift F5 E Free Ga H E common cpg c El Go io Gursor dbsctc I Set Pe To Gursor hwgetup RUM intproa c 4 Display PC Chrl Shift reselpfg L S L E vecttble 1 Step In Fil Download modul PH Step Over Fi o LJ sample abs 492 Step out Shift F11 4 Dependencies ae iodefine h asp stackact h Step Mode a di Halt Program vect Initialize i Connect kan Disconnect Save Memory verify Memory cen Gonhigure Qyverlay Download Modules u Unload Modules j All Download Modules 7 Pe Figure 5 1 Download Operation Window REJ05B1266 0100 Rev 1 00 March 2009 Page 10 of 15 SH7146 SH7149 Group A D Conversion in Continuous Scan Mode CENESAS 2 Download completed When downloading the sample load module is completed the program counter will appear in the resetprg c See Figure 5 2 TE sample High performance Embedded Workshop C WorkSpace sh 149_adc_icycle src common resetprg c lt i File Edit View Project Build Debug Setup Tools Test Window Help HK P ES OM le 08 2 2 eo e oo CPU 2G BESET Ea BHE P aa TE 63 B main c SPORTY COMMENT ENDTE ete ee
4. 1 1 Directory Configuration Note Names of the application note directory application note text this file or sample project workspace directory depends on the application note referred REJ05B1266 0100 Rev 1 00 March 2009 Page 1 of 15 E NI ESAS SH7146 SH7149 Group A D Conversion in Continuous Scan Mode 2 Downloading the Sample Project Workspace Copy the sample project workspace directory into the working directory of the host computer WorkSpace When the sample project workspace directory is created with a read only attribute cancel the read only attribute Do not use double byte characters in the directory path Presence of such characters may cause the wrong operation of the cross tools The explanation below assumes that the sample project workspace directory has been copied to the working directory of C WorkSpace 3 CPU Board and E10A USB Startup Procedure 1 Connect the host computer and the E10A USB emulator 2 Connect the CPU board and the E10A USB emulator Do not turn ON the power for the CPU board yet 3 Select Start menu gt All Programs gt Renesas gt High performance Embedded Workshop folder gt High performance Embedded Workshop 4 The Welcome dialog box shown below will appear 5 Select the Browse to another project workspace radio button and click OK Options p gt of Greate a new project workspace Renee a open a recent project Workspace
5. care in compiling the information included in this document but Renesas assumes no liability whatsoever for any damages incurred as a result of errors or omissions in the information included in this document 6 When using or otherwise relying on the information in this document you should evaluate the information in light of the total system before deciding about the applicability of such information to the intended application Renesas makes no representations warranties or guaranties regarding the suitability of its products for any particular application and specifically disclaims any liability arising out of the application and use of the information in this document or Renesas products 7 With the exception of products specified by Renesas as suitable for automobile applications Renesas products are not designed manufactured or tested for applications or otherwise in systems the failure or malfunction of which may cause a direct threat to human life or create a risk of human injury or which require especially high quality and reliability such as safety systems or equipment or systems for transportation and traffic healthcare combustion control aerospace and aeronautics nuclear power or undersea communication transmission If you are considering the use of our products for such purposes please contact a Renesas sales office beforehand Renesas shall have no liability for damages arising out of the uses set forth above 8 Notwithstanding
6. ee eee eee eee ERE EG Sea common 64 00000800 oid PowerON Reset PC void cpg c 65 dbsctc 66 hwsetup c 67 00000800 gt intprg c 66 resetprg c 69 f Jnitializing ection D i E vecttbl c 70 00000806 _INIT CTi H E Download modules Ti P sample abs OOOOOO00 72 f 222 YER Setting Ey Dependencies 73 oooooso0c set vbr void UBYTE sINT Vectors INT OFFSET iodefine h 74 stackect h TS _CALL_INIT Remove the coment l E typedefine h T vecth 77 _INIT_IOLIB Use SIM I O va TE errno O0 Remove the comment 50 srand UINT 1 Remove the Comment a1 _8iptr NULL Remove the Comment Dz 53 f Status Register setting wr 54 00000814 set cr sR_Init 55 00000814 nop 56 a7 t main Function call 7 58 00000812 mainii 59 50 if CLOSEALL J3 Use SIM I O g1 gz if _CALL END f Remove the comment whe 4 Figure 5 2 Download Completion Window f HardwareSetup Function Note Press the CPU reset button of the High performance Embedded Workshop to show the program counter REJ05B1266 0100 Rev 1 00 March 2009 Page 11 of 15 SH7146 SH7149 Group A D Conversion in Continuous Scan Mode CENESAS 3 Execute the program Select Go from the Debug menu to execute the program See Figure 5 3 ga sample High performance Embedded Workshop C WorkSpaceshr149_adc_icycle src common resetprg c lt i File Edit View Project Build
7. manual REJ05B1266 0100 Rev 1 00 March 2009 Page 12 of 15 E NI ESAS SH7146 SH7149 Group A D Conversion in Continuous Scan Mode 6 More information MCU Evaluation Board User s Manual SH7149 CPU Board M3A HS49 User s Manual REJ10J0917 0100 Rev 1 00 Hardware Manual SH7146 Group Hardware Manual REJO9B0229 0300 Rev 3 00 Reference Application Note SH7145 Group A D Conversion in Continuous Scan Mode REJO6B0390 0100Z Rev 1 00 Note Use the latest version on the Renesas Technology Website when referring to the manual REJ05B1266 0100 Rev 1 00 March 2009 Page 13 of 15 CENESAS SH7146 SH7149 Group A D Conversion in Continuous Scan Mode Website and Support Renesas Technology Website http www renesas com Inquiries http www renesas com inquiry csc renesas com Revision History Description Rev Date Page 1 00 Mar 11 09 Summary First edition issued All trademarks and registered trademarks are the property of their respective owners REJ05B1266 0100 Rev 1 00 March 2009 Page 14 of 15 SH7146 SH7149 Group A D Conversion in Continuous Scan Mode CENESAS Notes regarding these materials 1 This document is provided for reference purposes only so that Renesas customers may select the appropriate Renesas products for their use Renesas neither makes warranties or representations with respect to the accuracy or completeness of the information contained in this documen
8. CENESAS 13 When the message Connected appears in the Output window of High performance Embedded Workshop the E1OA USB emulator startup is now completed 4 ol ot al at 21 2t 7 G Flash memory writing Flash memory write end Connected Debug Find in Files 1 Find in Files 2 Version Control ez Default desktop Figure 3 10 Output Window REJ05B1266 0100 Rev 1 00 March 2009 Page 7 of 15 E NI ESAS SH7146 SH7149 Group A D Conversion in Continuous Scan Mode 4 E10A USB Emulator Connection Error Dialog When the E1OA USB emulator does not start up the following dialog box will appear a When the dialog box appears the CPU board system power may not be supplied Check the power supply of the CPU board Can not Find RESET signal Please check RESET and Yer Retry Ignore Figure 4 1 Cannot find RESET signal Dialog Box b When the following dialog box appears the H UDI pins and the H UDI port connector may not be connected correctly Check the connection between the H UDI pins and the H UDI port connector hexxxx AN Check the connection between the H UDI ping and the H UDI port connector Figure 4 2 Check the connection Dialog Box c When the following dialog box appears the ELOA USB emulator firmware may not be set up correctly Use the setup tool or the license tool to for device group addition to set up the firmware for the device group to use AN The product currentie
9. D code check box and click OK This eight digit ID code is necessary for the securing the flash memory ID Code Please input IO Code f 2345670 W Nen lD code Cancel Figure 3 7 ID Code Dialog Box Note For securing the flash memory enter a desired ID code however H FFFFFFFF cannot be set as the ID code When activating the High performance Embedded Workshop on the E10A USB emulator mode after this setting enter the ID code that is set here and clear the New ID code check box When entering the wrong ID code or New ID code check box is not cleared the content of flash memory will be erased REJ05B1266 0100 Rev 1 00 March 2009 Page 5 of 15 SH7146 SH7149 Group A D Conversion in Continuous Scan Mode CENESAS 12 The Connecting dialog box will appear and the system starts to connect the E1OA USB emulator Connecting Downloading FPGA data Downloading firmware Figure 3 8 Connecting Dialog Box Note If the reset signal cannot be detected the dialog box below will appear Click Retry and press the reset button on the CPU board The window as Figure 3 5 will appear and press the reset button on the CPU board again CS sl Can not Find RESET signal Please check RESET and Yer Retry Ignore Figure 3 9 Cannot find RESET signal Dialog Box REJ05B1266 0100 Rev 1 00 March 2009 Page 6 of 15 SH7146 SH7149 Group A D Conversion in Continuous Scan Mode
10. Debug Setup Tools Test Window Help HNP PD OM ie 0 8 2 zzi Go E0 an 49 ade_leycle Eat e sample button H E C source file JOUICE 63 B main c tnMFUNC COMMENT ENDTE ete ee ee eee eee eee ERE RG Sea common 64 0000000 oid PowerON Reset PC void cpg c 65 t dbsct c 66 f gt HardwareSetup Function hweetup c 67 00000800 Ep intprg c 66 resetprg c 69 f Jnitializing ection D i E vecttbl c 70 00000806 _INITSCT H E Download modules Pi ni sample abs OOOO0000 FZ VBR setting Ey Dependencies 73 00000802 set vbr void _UBYTE sINT Vectors INT_OFFSET iodefine h 74 stackect h 75 _CALL_INIT Remove the comment E typedefine h T vecth 77 _INIT_IOLIB Use SIM I O 75 TS errno O0 Remove the comment 50 asrandi _UINT 1 Remove the cortmernt a1 _8iptr NULL Remove the Comment Oa 53 f Status Register setting wr 54 00000814 set cr sR_Init 55 00000814 nopij 50 a7 f main Function call 7 ooooo0sic maint 59 50 if DOSE ILG is Use SIM I O g1 gz ff CALL END f Remove the comment whe 4 ol feselprg c Figure 5 3 Executing the Program Notes 1 The contents of the resetprg c may depend on the version of the sample program 2 If an error occurs or the sample software does not operate correctly the hardware or software may not have been set up correctly Check the setup procedures described in the installation
11. connected is not the SHeece ELOA US6 Emulator Figure 4 3 The Product Currently Connected Dialog Box REJ05B1266 0100 Rev 1 00 March 2009 Page 8 of 15 SH7146 SH7149 Group A D Conversion in Continuous Scan Mode CENESAS d When the following dialog box appears the version of the firmware set up in the E1OA USB emulator may be old Use the setup tool to set up the appropriate version of the firmware IN The version of the emulator firmware is incorrect Please set up the emulator by using the setup tool Figure 4 4 The version of the emulator firmware is incorrect Dialog Box e If the driver has not been set up correctly the following dialog box will appear f Driver Error No available communication devices found Unable to restore previous configuration for EFE10 Emulator USB Driver Will attempt to set default values instead Figure 4 5 Unable to restore the previous driver setting Dialog Box REJ05B1266 0100 Rev 1 00 March 2009 Page 9 of 15 SH7146 SH7149 Group A D Conversion in Continuous Scan Mode CENESAS 5 Downloading the Sample Program This section describes how to download the load module of the sample program 1 Download the sample load module Select Debug menu gt Download Modules to select the sample load module sample abs Figure 5 1 shows the download operation window To sample High performance Embedded Workshop File Edit View Project Build
12. em for the Device and for the Mode Then click OK Select Emulator mode x Device uens o eneee eoulen Whiting Flash memory Figure 3 3 Select Emulator mode Dialog Box A message Please choose driver will appear at the first time Click OK to show the following window to select the driver Select Renesas E Series USB Driver Driver Details Note Interface use Interace Channel E104 USB Cont Porte Configuration Eontigure Figure 3 4 Driver Details Dialog Box REJ05B1266 0100 Rev 1 00 March 2009 Page 4 of 15 SH7146 SH7149 Group A D Conversion in Continuous Scan Mode CENESAS 9 Following dialog box will appear Leave the dialog box and turn ON the power for the CPU board Then press the reset button on the CPU board and click OK on the dialog box as shown in Figure 3 5 xl A Please reset the user system and press lt Enter gt Key Figure 3 5 Dialog Box to request the Reset signal input 10 The System Clock dialog box will appear Enter the input clock frequency for the target device and click OK 10 00 MHz is entered in this example ST Clock AME MHz Set the frequency of the crystal resonator connected to the MCU Parcel In Use or the external clack being input Figure 3 6 System Clock Dialog Box 11 The ID Code dialog box will appear Enter a desired ID code within eight alphanumeric characters tick the New I
13. f a Renesas product such as safety design for hardware and software including but not limited to redundancy fire control and malfunction prevention appropriate treatment for aging degradation or any other applicable measures Among others since the evaluation of microcomputer software alone is very difficult please evaluate the safety of the final products or system manufactured by you 11 In case Renesas products listed in this document are detached from the products to which the Renesas products are attached or affixed the risk of accident such as swallowing by infants and small children is very high You should implement safety measures so that Renesas products may not be easily detached from your products Renesas shall have no liability for damages arising out of such detachment 12 This document may not be reproduced or duplicated in any form in whole or in part without prior written approval from Renesas 13 Please contact a Renesas sales office if you have any questions regarding the information contained in this document Renesas semiconductor products or if you have any other inquiries 2009 Renesas Technology Corp All rights reserved REJ05B1266 0100 Rev 1 00 March 2009 Page 15 of 15
14. t nor grants any license to any intellectual property rights or any other rights of Renesas or any third party with respect to the information in this document 2 Renesas shall have no liability for damages or infringement of any intellectual property or other rights arising out of the use of any information in this document including but not limited to product data diagrams charts programs algorithms and application circuit examples 3 You should not use the products or the technology described in this document for the purpose of military applications such as the development of weapons of mass destruction or for the purpose of any other military use When exporting the products or technology described herein you should follow the applicable export control laws and regulations and procedures required by such laws and regulations 4 All information included in this document such as product data diagrams charts programs algorithms and application circuit examples is current as of the date this document is issued Such information however is subject to change without any prior notice Before purchasing or using any Renesas products listed in this document please confirm the latest product information with a Renesas sales office Also please pay regular and careful attention to additional and different information to be disclosed by Renesas such as that disclosed through our website http www renesas com 5 Renesas has used reasonable
15. the preceding paragraph you should not use Renesas products for the purposes listed below 1 artificial life support devices or systems 2 surgical implantations 3 healthcare intervention e g excision administration of medication etc 4 any other purposes that pose a direct threat to human life Renesas shall have no liability for damages arising out of the uses set forth in the above and purchasers who elect to use Renesas products in any of the foregoing applications shall indemnify and hold harmless Renesas Technology Corp its affiliated companies and their officers directors and employees against any and all damages arising out of such applications 9 You should use the products described herein within the range specified by Renesas especially with respect to the maximum rating operating supply voltage range movement power voltage range heat radiation characteristics installation and other product characteristics Renesas shall have no liability for malfunctions or damages arising out of the use of Renesas products beyond such specified ranges 10 Although Renesas endeavors to improve the quality and reliability of its products IC products have specific characteristics such as the occurrence of failure at a certain rate and malfunctions under certain use conditions Please be sure to implement safety measures to guard against the possibility of physical injury and injury or damage caused by fire in the event of the failure o

Download Pdf Manuals

image

Related Search

Related Contents

ST300s取扱説明書  DÉGRAISSANTS  Volltext - oops/ - Oldenburger Online-Publikations  12V DUCATI MONSTER    ECBD Gebrauchsanweisung goodsphere  online assessment user guide  

Copyright © All rights reserved.
Failed to retrieve file