Get Connected with USB on RX62N RX62N USB

Size: px
Start display at page:

Download "Get Connected with USB on RX62N RX62N USB"

Transcription

1 Get Connected with USB on RX62N RX62N USB LAB PROCEDURE Description: This lab is an introduction to the Renesas USB solution using an RX62N RSK. The RX USB block supports both Host and Function operation and the stack provides support for both. In this lab the user will learn how to use the Host and Function APIs to create a data-logger device, transfer files from a PC to the RX62N over XModem and also read and write data from a Mass Storage device. Lab Objectives 1. Learn to run the USB CDC demo 2. Use XModem to download files over USB 3. Learn to use the RX USB Host stack to read and write data from a Mass Storage Device. Lab Materials Please verify you have the following materials at your lab station. E1 Debugger pod RX62N RSK Flash drive 5V power supply HEW v4 USB Mini A-B (2) USB A-B (2) Skill Level 1. Basic familiarity with HEW 2. Good understanding of C, data structures and pointers. Time to Complete Lab 120 Minutes Lab Sections 1 Using the CDC API Using XModem over CDC Using the Mass Storage Host API...11 Get Connected with USB on RX62N v1.0 Page 1 of 16

2 1 Using the CDC API LAB PROCEDURE Overview: In this session, you will learn how to use the CDC API to display a Menu over a virtual COM port on a terminal session, and send and receive data. Procedural Steps Step 1.1 Step 1.2 Step 1.3 Step 1.4 Step 1.5 Step 1.6 Step 1.7 Step 1.8 Step 1.9 Open the workspace at C:Workspace\ 222L_USB_RX62N \Lab1 by clicking on Lab1.hws Connect the E1 to the RSK using the ribbon cable if it is not already connected. Plug in power to the board and connect the E1 via USB to the PC. Change the session to RX600_E1_E20_SYSTEM from the session pull-down box and click Connect In the E1 connection dialogue box, ensure that the MCU Device Group and Device is set to RX62N and R5F562N8 respectively. Also make sure that the Debugging Mode radio button is checked and then click OK. In the Configuration Properties window, set Mode to On-chip ROM enabled extended mode and the Input Clock (EXTAL) to 12 MHz. Click OK. You should now be connected to the device. Check by making sure that the disconnect button is active The pseudo-code for the next few steps are 1. Initialize the USB_CDC stack 2. Check to see if the device is connected 3. Wait until some data is received from the terminal so that you know that the terminal session has started. 4. Display a Menu 5. If the Echo option is chosen, read the character from the terminal and send it back so that it is echoed onto the terminal Open usb_cdc.h to see all the available CDC API functions. Open usb_cdc_app.c. Step 1.10 In the function USB_CDC_APP_Main(), initialize the CDC stack by using USBCDC_Init(). Step 1.11 Now create a while (1) loop after the initialization function. The rest of the code will be written in this loop. Step 1.12 Wait until the cable has been connected by using the USBCDC_IsConnected() function. while(false == USBCDC_IsConnected()); Get Connected with USB on RX62N v1.0 Page 2 of 16

3 Step 1.13 Create a global unsigned char rx_char. Step 1.14 Wait until a character is received from the terminal session on the PC by using the blocking function USBCDC_GetChar(). USBCDC_GetChar( &rx_char ); Step 1.15 Use the blocking function USBCDC_WriteString() to display the string Press Switch SW1." onto the terminal. USBCDC_WriteString("\r\n Press Switch SW1.\r\n"); Step 1.16 Since the rest of the steps below need to run only while the cable is connected, create a while loop that checks to see if the cable is connected. The steps after this (unless otherwise instructed) will run within this loop while(usbcdc_isconnected()) { //remaining steps } Step 1.17 The global variable gswitchflag will be set by pre-written interrupt routines for pushbutton switches 1, 2 and 3 on the RSK. For definitions on the values that gswitchflag can be set to, refer to switch.h Step 1.18 Check gswitchflag to see if Switch1 was pressed. if(switchpress_1 & gswitchflag) { //steps if SW1 was pressed } Step 1.19 If SW1 was pressed, then display the menu from the predefined strings szwelcomemsg1-5 as defined on lines in usb_cdc_app.c. Use USBCDC_WriteString() to display these strings onto the terminal. USBCDC_WriteString(szWelcomeMsg1); USBCDC_WriteString(szWelcomeMsg2); USBCDC_WriteString(szWelcomeMsg3); USBCDC_WriteString(szWelcomeMsg4); USBCDC_WriteString(szWelcomeMsg5); Step 1.20 Clear the gswitchflag global variable and close the if statement from Step 1.18 Step 1.21 Check gswitchflag to see if Switch2 was pressed. if(switchpress_2 & gswitchflag) { //steps if SW2 was pressed } Step 1.22 If SW2 was pressed, then start the Echo mode. Using USBCDC_WriteString() print the string Echo mode started Get Connected with USB on RX62N v1.0 Page 3 of 16

4 Step 1.23 Use USBCDC_Read_Async() to start a non-blocking read of size BUFFER_SIZE, into the buffer g_buffer and call the call-back function CBDoneRead once the read is completed. BUFFER_SIZE, g_buffer and CBDoneRead are already defined. USBCDC_Read_Async(BUFFER_SIZE, g_buffer, CBDoneRead); The call-back function CBDoneRead will be called either when a BUFFER_SIZE worth of data has been read or when a packet smaller than the BULK IN endpoint buffer size has been received. In USB transactions, if a packet smaller than the FIFO size is received, this is an indication that the data transfer is complete. Step 1.24 Add code to clear the gswitchflag global variable and then close the if statement from Step Step 1.25 The empty call back function CBDoneRead is defined at the end of usb_cdc_app.c, and the arguments passed to it are the error code (_err) and the number of bytes read (_NumBytes). In the following steps, we will use these arguments to complete the call-back function. Step 1.26 The next 2 steps are to be done in the call-back function, CBDoneRead. Step 1.27 Check to see if the error code is USB_ERR_OK and then use USBCDC_Write_Async() to start a non-blocking write of size _NumBytes from the buffer g_buffer and call the call-back function CBDoneWrite once the write is complete. if(usb_err_ok == _err) { USBCDC_Write_Async(_NumBytes, g_buffer, CBDoneWrite); } The call-back function CBDoneWrite will be called once a _NumBytes worth of data has been written. In this lab we are not doing anything once the write is complete and so CBDoneWrite is an empty function. Step 1.28 Now start off the next non-blocking read operation using the USBCDC_Read_Async() function. USBCDC_Read_Async(BUFFER_SIZE, g_buffer, CBDoneRead); Get Connected with USB on RX62N v1.0 Page 4 of 16

5 Step 1.29 Returning to the function USB_CDC_APP_Main(), check gswitchflag to see if Switch3 was pressed. if(switchpress_3 & gswitchflag) { //steps if SW3 was pressed } Step 1.30 If SW3 was pressed, then cancel any pending CDC calls to the stack by calling USBCDC_Cancel(). Step 1.31 Print Echo Stopped to the terminal using USBCDC_WriteString(); Step 1.32 Clear the gswitchflag global variable and close the if statement from Step Step 1.33 Compile by clicking on the Build All an incremental build click on Build button. This only needs to be done the first time. For to build the new image faster. Step 1.34 Run the project by clicking on the Reset-Go icon. Step 1.35 Connect the USB0_D port on the RSK to the PC using the provided USB cable. Step 1.36 Open Terra-Term using the shortcut on the desktop. Step 1.37 Select the Serial radio-button and from the Port pull-down menu choose CDC USB Demonstration Figure 1:TerraTerm Connection Dialogue Get Connected with USB on RX62N v1.0 Page 5 of 16

6 Step 1.38 Press any key on the PC once and then follow the on-screen instructions to run the program. Step 1.39 Once you are done close Terra Term. Step 1.40 Disconnect the USB cable between the PC and the RSK. Step 1.41 Click on Stop to stop the program. Step 1.42 Close HEW. Get Connected with USB on RX62N v1.0 Page 6 of 16

7 2 Using XModem over CDC LAB PROCEDURE In this lab you will learn to use the XModem API and transfer a file from the PC to the RX62N. The XModem protocol has been ported to run on the USB CDC class example so that real life applications that require sending and receiving files over USB can be supported. Note that in its current state there is only support to send files to the MCU from the PC. The workspace in this lab is very similar to what you would have had at the end of the last session except that now there is XModem support and the menu options are a little different. SW2 is now used to enable/disable A/D data logging and SW3 will be used to enable file transfers. Step 2.1 The pseudo-code for this session is as follows: 1. Check to see if SW3 is pressed 2. If SW3 is pressed, then print a message to TerraTerm indicating that we are ready to being download. 3. Use the XModemDowloadOverUSB function to start XMODEM download. 4. Use the call-back function to assemble each 128 byte packet. 5. Check the return value from XModemDowloadOverUSB() to determine is the transfer was a success or not. 6. Print a message indicating success or failure 7. Look at memory to see contents of received file. Step 2.2 Open the workspace at C:Workspace\ 222L_USB_RX62N \Lab2 by clicking on Lab2.hws and navigate to usb_cdc_app.c The user interface to XModem consists of a single function call XmodemDownloadOverUSB() which takes as its argument a callback function that will be called when one block (132 bytes) of data is received. Step 2.3 Step 2.4 Refer to the steps Step 1.2 to Step 1.6 from session 1 to connect to the RX62NRSK. Around line 102 ( before main() ), declare the prototype for a call-back function which takes as its arguments an unsigned char BlockNumber, an unsigned char pointer to the Source and returns an unsigned char. unsigned char CB_XmodemBlock( unsigned char BlockNum, unsigned char *DataPtr); Step 2.5 Step 2.6 Jump to line 195 where the status of the switch variable gswitchflag is checked to see if Switch 3 was pressed. Print the string Select file to transfer over XModem to the terminal using the blocking function USBCDC_WriteString USBCDC_WriteString( Select file to transfer over XModem ); Get Connected with USB on RX62N v1.0 Page 7 of 16

8 Step 2.7 Step 2.8 Create a new local unsigned char ret to store the return value from the main Xmodem function call. Now call the function XmodemDownloadOverUSB() (after USBCDC_WriteString() in Step 2.6 ), with the call back function declared in Step 2.4 as its argument as shown below ret = XmodemDownloadOverUSB((unsigned long) CB_XmodemBlock); Step 2.9 If the return value ret is a non-zero value, then using USBCDC_WriteString(), print XModem File Transfer complete ; if not, then print XModem File Transfer Failed. if( ret == 0 ) USBCDC_WriteString("\n\n XModem File Transfer complete. \r\n"); else USBCDC_WriteString("\n XModem File Transfer Failed. r\n"); Step 2.10 Now, the callback function has to be defined. At the end of the file usb_cdc_app.c, create a definition for the call back function CB_XmodemBlock declared in Step 2.4 unsigned char CB_XmodemBlock( unsigned char BlockNum, unsigned char *DataPtr) { // CallBack function body// } Step 2.11 Since the callback function is called after each whole block of XModem data is received, this function serves as an assembler routine to assemble all the blocks into a destination buffer. Step 2.12 Use the pre-declared global buffer StagingArea[ ] which has a declared size of 128*5 (STAGING_AREA_SIZE) bytes. Step 2.13 Create a for loop and other required variables (as shown below) to copy 128 bytes of data from the source pointer (which is a received argument to this function) to the StagingArea buffer, and return a 0 when done. Loop the buffer around if the StagingArea buffer becomes full. unsigned char i; static unsigned long SAindex=0; // append most recent packet to data in staging area for( i = 0; i < 128; i++ ) { StagingArea[SAindex] = DataPtr[i]; SAindex++; if( SAindex == STAGING_AREA_SIZE ) SAindex = 0; } return 0; Get Connected with USB on RX62N v1.0 Page 8 of 16

9 Step 2.14 Compile by clicking on the Build All an incremental build click on Build button. This only needs to be done the first time. For to build the new image faster. Step 2.15 Make sure the code is downloaded by double-clicking on the.abs file in the navigation panel on the left. Step 2.16 Run the project by clicking on the Reset-Go icon. Step 2.17 Connect the USB0_D port on the RSK to the PC using the provided USB cable. Step 2.18 Open Terra-Term using the shortcut on the desktop. Step 2.19 Select the Serial radio-button and from the Port pull-down menu choose CDC USB Demonstration Step 2.20 Press any key on the PC once to begin executing the user app created in the above steps Step 2.21 Press SW3 to start the File Transfer process on the MCU. Step 2.22 Now on TerraTerm, use the steps shown in the image below to select the file for download. Figure 2: TerraTerm File Transfer Dialogue Get Connected with USB on RX62N v1.0 Page 9 of 16

10 Step 2.23 Navigate to C:\WorkSpace\222L_USB_RX62N \Lab2 and select test.txt to download. Step 2.24 Once the download is complete stop the program by clicking on Stop Step 2.25 Open the memory window by clicking on or using Ctrl+M and enter the values as shown in Figure 3 below and click OK. Note that you can select any other labels by clicking on the icon at the right end of the Display Address pull down menu. Figure 3: Memory Display Address Selection Step 2.26 You should now be able to see the contents of the test.txt file that was transferred over USB using XModem Step 2.27 Press F5 to run the code. Step 2.28 Remember that you have to press SW3 each time before downloading a new file. Occasionally there will be a few seconds delay before a download starts. Step 2.29 Try transferring the larger text file provided in C:\WorkSpace\222L_USB_RX62N \Lab2 Step 2.30 Once you are done, first close TerraTerm and then stop the code by clicking on Stop Step 2.31 Disconnect the USB cable between the PC and the RSK. Step 2.32 Close HEW. Get Connected with USB on RX62N v1.0 Page 10 of 16

11 3 Using the Mass Storage Host API The main objective of this session is to demonstrate the simplicity of using standard file operations to interface to a mass storage device in an embedded system. In this lab session you will use the Renesas USB Mass Storage Host API to enumerate a Mass Storage device, mount it and use STDIO commands to open a file, read and write information to it and then un-mount the drive. The information being written in this case is a 5/10 array that contains 50 simulated A2D values. Step 3.1 Step 3.2 Step 3.3 Step 3.4 Open the workspace at C:Workspace\ 222L_USB_RX62N \Lab3 by clicking on RX62NUSBH.hws. Refer to the steps Step 1.2 to Step 1.6 from session 1 to connect to the RX62NRSK. Open main.c and jump to the main() function. Create a file pointer as shown below FILE *pfile=0; Step 3.5 Mount all available devices using the dskmountalldevices() function which returns the total number of devices mounted. Stay here in a while loop until dskmountalldevices() returns a value greater than 0 indicating that a mass storage device is mounted. while( 0== dskmountalldevices()); If the number of Mass Storage devices mounted is non-zero, this means that a device has been mounted and is available for use. The drive letter assignment to devices starts with A and is incremented for each additional Mass Storage Device enumerated. Step 3.6 Use the built-in LED macro to turn on LED0 to indicate that a Mass Storage Device has been enumerated and mounted. (LED0 is located near the RESET push-button). led_on(id_led0); Step 3.7 Use fopen() with the file pointer created in Step 3.4 to open the file RX62N.wri on the Mass Storage Drive in append mode. pfile = fopen("a:\\rx62n.wri", "a+"); Get Connected with USB on RX62N v1.0 Page 11 of 16

12 Step 3.8 Step 3.9 Check to see if fopen() returned a valid pointer If the pointer is valid, then use fread() to read the first 10 characters in the file into the provided string buffer str[15]. if (pfile) { fread(str,10,1,pfile); //code in the next steps will be within this if until specified According to ANSI standards, when performing fwrite() and fread() operations on a file that is opened in the a+ mode, it is necessary to use an operation like fseek() in between fread() and fwrite() operations. Step 3.10 Using strncmp() verify that the read string in str[ ] is DevCon2010. If the strings are the same strncmp() returns a 0. Note: strncmp() is case sensitive when doing string comparison. if(0 == strncmp(str,"devcon2010",10)) { Get Connected with USB on RX62N v1.0 Page 12 of 16

13 int fseek(file *stream_pointer, long offset, int origin); Argument meaning: 1. stream_pointer is a pointer to the stream FILE structure of which the position indicator should be changed; 2. offset is a long integer which specifies the number of bytes from origin where the position indicator should be placed; 3. origin is an integer which specifies the origin position. It can be: o SEEK_SET: origin is the start of the stream o SEEK_CUR: origin is the current position o SEEK_END: origin is the end of the stream Step 3.11 If strncmp returns a successful compare (return value of 0), then use fseek to position the file pointer. fseek(pfile,0,seek_cur); Step 3.12 Using a simple for loop as shown below, print out all the values from the char buffer g_a2dbuffer[10][5] into the file RX62N.wri. for(i=0;i<=6;i++) { for(j=0;j<=4;j++) { fprintf(pfile,"%d ",g_a2dbuffer[i][j]); } fprintf(pfile," \n \r"); } Step 3.13 Once all the data has been printed and both for loops closed, close the file-stream using fclose(). fclose(pfile); Get Connected with USB on RX62N v1.0 Page 13 of 16

14 Step 3.14 Close the if statement opened on Step Step 3.15 Close the if statement opened on Step 3.9. Step 3.16 Un-mount the drive using dskejectmedia(). Stay here in a loop until the drive is ejected. while ( 0 == dskejectmedia('a')); Step 3.17 Use the built-in LED macro to turn off LED0 to indicate that a Mass Storage Device has been un-mounted. (LED0 is located near the RESET push-button). led_off(id_led0); Step 3.18 Compile by clicking on the Build All an incremental build click on Build button. This only needs to be done the first time. For to build the new image faster. Step 3.19 Make sure the code is downloaded by double-clicking on the.abs file in the navigation panel on the left. Step 3.20 Run the project by clicking on the Reset-Go icon. Step 3.21 Plug in the provided Mass Storage Device to the PC and make sure that the file RX62N.wri is available and the first entry in the file is DevCon2010. Get Connected with USB on RX62N v1.0 Page 14 of 16

15 Step 3.22 Observe LED0. On plugging in the Mass Storage Device to the RX62N RSK, LED0 should turn on and then off indicating that a Mass Storage Device was enumerated and then unmounted. Step 3.23 Once LED0 turns off, plug the drive into the PC and read the contents of RX62N.wri in notepad. The contents of the buffer g_a2dbuffer[ ][ ] should be available as shown below. Figure 4: RX62N.wri after fwrite(). Step 3.24 Click on Stop to stop the program. BONUS Section Step 3.25 Use other STDIO function calls like fgetc(), fputc() and ftell() to read and write information to the Mass Storage device Step 3.26 Done. Get Connected with USB on RX62N v1.0 Page 15 of 16

16 Using the TotalPhase USB Sniffer Step 3.27 Setup the system as shown in the picture below PC USB Mini A-B E1 Ribbon Cable RX62N USB A-B USB A-B Beagle USB Mini A-B Step 3.28 Remember that the lab can be done with this system in place. Step 3.29 Run the data center program by running Data Center.exe from the desktop Step 3.30 From the GUI select Analyzer>>Connect to Analyzer. The Beagle will show up in the dialogue window if it was connected as shown in the picture above. Step 3.31 Click on the Play button to start recording USB data Step 3.32 You can use the different filters to view selected data. For eg: if you just want to see Bulk In and Bulk Out, filter out everything else but the Bulk endpoints. Get Connected with USB on RX62N v1.0 Page 16 of 16

Using Virtual EEPROM and Flash API for Renesas MCUs RX600 Series

Using Virtual EEPROM and Flash API for Renesas MCUs RX600 Series Using Virtual EEPROM and Flash API for Renesas MCUs RX600 Series Description: This lab will take the user through using the Virtual EEPROM (VEE) project for RX. The user will learn to use the Virtual EEPROM

More information

USB Interrupt Transfer Example PSoC 3 / PSoC 5

USB Interrupt Transfer Example PSoC 3 / PSoC 5 USB Interrupt Transfer Example PSoC 3 / PSoC 5 Project Objective This code example demonstrates how to perform USB Interrupt Transfer from a PC using the USB HID driver and PSoC 3 device. Overview USB

More information

LAB #1: The CSM12C32 Module and PBMCUSLK Project Board

LAB #1: The CSM12C32 Module and PBMCUSLK Project Board CS/EE 5780/6780 Handout #1 Spring 2007 Myers LAB #1: The CSM12C32 Module and PBMCUSLK Project Board Lab writeup is due to your TA at the beginning of your next scheduled lab. Don t put this off to the

More information

Standard C Library Functions

Standard C Library Functions Demo lecture slides Although I will not usually give slides for demo lectures, the first two demo lectures involve practice with things which you should really know from G51PRG Since I covered much of

More information

Mode Meaning r Opens the file for reading. If the file doesn't exist, fopen() returns NULL.

Mode Meaning r Opens the file for reading. If the file doesn't exist, fopen() returns NULL. Files Files enable permanent storage of information C performs all input and output, including disk files, by means of streams Stream oriented data files are divided into two categories Formatted data

More information

C mini reference. 5 Binary numbers 12

C mini reference. 5 Binary numbers 12 C mini reference Contents 1 Input/Output: stdio.h 2 1.1 int printf ( const char * format,... );......................... 2 1.2 int scanf ( const char * format,... );.......................... 2 1.3 char

More information

Tools Basics. Getting Started with Renesas Development Tools R8C/3LX Family

Tools Basics. Getting Started with Renesas Development Tools R8C/3LX Family Getting Started with Renesas Development Tools R8C/3LX Family Description: The purpose of this lab is to allow a user new to the Renesas development environment to quickly come up to speed on the basic

More information

Quick-Start Guide. BNS Solutions. QSK62P Plus

Quick-Start Guide. BNS Solutions. QSK62P Plus BNS Solutions Quick-Start Guide QSK62P Plus RS-232 Port Link LED 8-character x 2-line LCD Expansion Port (2) Reset Switch Power LED Thermistor I/O Ring (4) M16C MCU Analog Adjust Pot MCU Crystal Expansion

More information

Accessing Files in C. Professor Hugh C. Lauer CS-2303, System Programming Concepts

Accessing Files in C. Professor Hugh C. Lauer CS-2303, System Programming Concepts Accessing Files in C Professor Hugh C. Lauer CS-2303, System Programming Concepts (Slides include materials from The C Programming Language, 2 nd edition, by Kernighan and Ritchie, Absolute C++, by Walter

More information

ENG120. Misc. Topics

ENG120. Misc. Topics ENG120 Misc. Topics Topics Files in C Using Command-Line Arguments Typecasting Working with Multiple source files Conditional Operator 2 Files and Streams C views each file as a sequence of bytes File

More information

Intermediate Programming, Spring 2017*

Intermediate Programming, Spring 2017* 600.120 Intermediate Programming, Spring 2017* Misha Kazhdan *Much of the code in these examples is not commented because it would otherwise not fit on the slides. This is bad coding practice in general

More information

Systems Programming. 08. Standard I/O Library. Alexander Holupirek

Systems Programming. 08. Standard I/O Library. Alexander Holupirek Systems Programming 08. Standard I/O Library Alexander Holupirek Database and Information Systems Group Department of Computer & Information Science University of Konstanz Summer Term 2008 Last lecture:

More information

CSI 402 Lecture 2 Working with Files (Text and Binary)

CSI 402 Lecture 2 Working with Files (Text and Binary) CSI 402 Lecture 2 Working with Files (Text and Binary) 1 / 30 AQuickReviewofStandardI/O Recall that #include allows use of printf and scanf functions Example: int i; scanf("%d", &i); printf("value

More information

R8C/Tiny. StarterKit Plus SKP8CMINI-15, SKP8CMINI-17. Clock Stop Detect

R8C/Tiny. StarterKit Plus SKP8CMINI-15, SKP8CMINI-17. Clock Stop Detect QuickStart Guide R8C/Tiny StarterKit Plus SKP8CMINI-15, SKP8CMINI-17 Target/Bus Power Mode Selector Clock Stop Detect R8C/Tiny CdS Cell Thermistor Slide Switch S1 Pushbutton Switch S2 RTA-FoUSB-MON In-Circuit

More information

Using Embedded Tools for I2C, SPI, and USB Debugging for the Renesas RX63N RDK

Using Embedded Tools for I2C, SPI, and USB Debugging for the Renesas RX63N RDK Using Embedded Tools for I2C, SPI, and USB Debugging for the Renesas RX63N RDK Renesas Electronics America Inc. Renesas Technology & Solution Portfolio 2 Agenda Introduction to the Renesas RX63N RDK Introduction

More information

ID630L: Becoming Familiar with Sensorless Vector Control of BLDC Motors

ID630L: Becoming Familiar with Sensorless Vector Control of BLDC Motors ID630L: Becoming Familiar with Sensorless Vector Control of BLDC Motors Description: This lab will teach the attendees how to use Renesas MCU to implement sensorless vector control of BLDC motors step

More information

RX Family APPLICATION NOTE. Simple I 2 C Module Using Firmware Integration Technology. Introduction. Target Device.

RX Family APPLICATION NOTE. Simple I 2 C Module Using Firmware Integration Technology. Introduction. Target Device. APPLICATION NOTE RX Family R01AN1691EJ0220 Rev. 2.20 Introduction This application note describes the simple I 2 C module using firmware integration technology (FIT) for communications between devices

More information

C File System File Functions EXPERIMENT 1.2

C File System File Functions EXPERIMENT 1.2 C File System File Functions EXPERIMENT 1.2 Propose of the experiment Continue from previous experiment to be familiar with CCS environment Write a C language file input / output (CIO) program to read

More information

PROGRAMMAZIONE I A.A. 2017/2018

PROGRAMMAZIONE I A.A. 2017/2018 PROGRAMMAZIONE I A.A. 2017/2018 INPUT/OUTPUT INPUT AND OUTPUT Programs must be able to write data to files or to physical output devices such as displays or printers, and to read in data from files or

More information

CSI 402 Systems Programming LECTURE 4 FILES AND FILE OPERATIONS

CSI 402 Systems Programming LECTURE 4 FILES AND FILE OPERATIONS CSI 402 Systems Programming LECTURE 4 FILES AND FILE OPERATIONS A mini Quiz 2 Consider the following struct definition struct name{ int a; float b; }; Then somewhere in main() struct name *ptr,p; ptr=&p;

More information

CS 326 Operating Systems C Programming. Greg Benson Department of Computer Science University of San Francisco

CS 326 Operating Systems C Programming. Greg Benson Department of Computer Science University of San Francisco CS 326 Operating Systems C Programming Greg Benson Department of Computer Science University of San Francisco Why C? Fast (good optimizing compilers) Not too high-level (Java, Python, Lisp) Not too low-level

More information

C PROGRAMMING. Characters and Strings File Processing Exercise

C PROGRAMMING. Characters and Strings File Processing Exercise C PROGRAMMING Characters and Strings File Processing Exercise CHARACTERS AND STRINGS A single character defined using the char variable type Character constant is an int value enclosed by single quotes

More information

CSI 402 Lecture 2 (More on Files) 2 1 / 20

CSI 402 Lecture 2 (More on Files) 2 1 / 20 CSI 402 Lecture 2 (More on Files) 2 1 / 20 Files A Quick Review Type for file variables: FILE * File operations use functions from stdio.h. Functions fopen and fclose for opening and closing files. Functions

More information

BASICS OF THE RENESAS SYNERGY TM

BASICS OF THE RENESAS SYNERGY TM BASICS OF THE RENESAS SYNERGY TM PLATFORM Richard Oed 2018.11 02 CHAPTER 9 INCLUDING A REAL-TIME OPERATING SYSTEM CONTENTS 9 INCLUDING A REAL-TIME OPERATING SYSTEM 03 9.1 Threads, Semaphores and Queues

More information

F28335 ControlCard Lab1

F28335 ControlCard Lab1 F28335 ControlCard Lab1 Toggle LED LD2 (GPIO31) and LD3 (GPIO34) 1. Project Dependencies The project expects the following support files: Support files of controlsuite installed in: C:\TI\controlSUITE\device_support\f2833x\v132

More information

File (1A) Young Won Lim 11/25/16

File (1A) Young Won Lim 11/25/16 File (1A) Copyright (c) 2010-2016 Young W. Lim. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version

More information

CS240: Programming in C

CS240: Programming in C CS240: Programming in C Lecture 13 si 14: Unix interface for working with files. Cristina Nita-Rotaru Lecture 13/Fall 2013 1 Working with Files (I/O) File system: specifies how the information is organized

More information

C How to Program, 6/e by Pearson Education, Inc. All Rights Reserved.

C How to Program, 6/e by Pearson Education, Inc. All Rights Reserved. C How to Program, 6/e Storage of data in variables and arrays is temporary such data is lost when a program terminates. Files are used for permanent retention of data. Computers store files on secondary

More information

M16C/62P QSK QSK62P Plus Tutorial 1. Software Development Process using HEW4

M16C/62P QSK QSK62P Plus Tutorial 1. Software Development Process using HEW4 M16C/62P QSK QSK62P Plus Tutorial 1 Software Development Process using HEW4 Overview The following tutorial is a brief introduction on how to develop and debug programs using HEW4 (Highperformance Embedded

More information

UNIT IV-2. The I/O library functions can be classified into two broad categories:

UNIT IV-2. The I/O library functions can be classified into two broad categories: UNIT IV-2 6.0 INTRODUCTION Reading, processing and writing of data are the three essential functions of a computer program. Most programs take some data as input and display the processed data, often known

More information

Week 9 Lecture 3. Binary Files. Week 9

Week 9 Lecture 3. Binary Files. Week 9 Lecture 3 Binary Files 1 Reading and Writing Binary Files 2 Binary Files It is possible to write the contents of memory directly to a file. The bits need to be interpreted on input Possible to write out

More information

USB BF70x Bulk Library v.1.1 Users Guide Users Guide Revision 1.1. For Use With Analog Devices ADSP-BF70x Series Processors. Closed Loop Design, LLC

USB BF70x Bulk Library v.1.1 Users Guide Users Guide Revision 1.1. For Use With Analog Devices ADSP-BF70x Series Processors. Closed Loop Design, LLC USB BF70x Bulk Library v.1.1 Users Guide Users Guide Revision 1.1 For Use With Analog Devices ADSP-BF70x Series Processors Closed Loop Design, LLC 748 S MEADOWS PKWY STE A-9-202 Reno, NV 89521 support@cld-llc.com

More information

Fundamentals of Programming. Lecture 10 Hamed Rasifard

Fundamentals of Programming. Lecture 10 Hamed Rasifard Fundamentals of Programming Lecture 10 Hamed Rasifard 1 Outline File Input/Output 2 Streams and Files The C I/O system supplies a consistent interface to the programmer independent of the actual device

More information

SKP16C26 Tutorial 1 Software Development Process using HEW. Renesas Technology America Inc.

SKP16C26 Tutorial 1 Software Development Process using HEW. Renesas Technology America Inc. SKP16C26 Tutorial 1 Software Development Process using HEW Renesas Technology America Inc. 1 Overview The following tutorial is a brief introduction on how to develop and debug programs using HEW (Highperformance

More information

Migration from HEW to e 2 studio Development Tools > IDEs

Migration from HEW to e 2 studio Development Tools > IDEs Migration from HEW to e 2 studio Development Tools > IDEs LAB PROCEDURE Description The purpose of this lab is to allow users of the High-performance Embedded Workbench (HEW) to gain familiarity with the

More information

System Software Experiment 1 Lecture 7

System Software Experiment 1 Lecture 7 System Software Experiment 1 Lecture 7 spring 2018 Jinkyu Jeong ( jinkyu@skku.edu) Computer Systems Laboratory Sungyunkwan University http://csl.skku.edu SSE3032: System Software Experiment 1, Spring 2018

More information

6L00IA - Introduction to Synergy Software Package Short Version (SSP v1.2.0) Renesas Synergy Family - S7 Series

6L00IA - Introduction to Synergy Software Package Short Version (SSP v1.2.0) Renesas Synergy Family - S7 Series 6L00IA - Introduction to Synergy Software Package Short Version (SSP v1.2.0) Renesas Synergy Family - S7 Series LAB PROCEDURE Description: The purpose of this lab is to familiarize the user with the Synergy

More information

Files and Streams Opening and Closing a File Reading/Writing Text Reading/Writing Raw Data Random Access Files. C File Processing CS 2060

Files and Streams Opening and Closing a File Reading/Writing Text Reading/Writing Raw Data Random Access Files. C File Processing CS 2060 CS 2060 Files and Streams Files are used for long-term storage of data (on a hard drive rather than in memory). Files and Streams Files are used for long-term storage of data (on a hard drive rather than

More information

Day14 A. Young W. Lim Thr. Young W. Lim Day14 A Thr 1 / 14

Day14 A. Young W. Lim Thr. Young W. Lim Day14 A Thr 1 / 14 Day14 A Young W. Lim 2017-11-02 Thr Young W. Lim Day14 A 2017-11-02 Thr 1 / 14 Outline 1 Based on 2 C Strings (1) Characters and Strings Unformatted IO Young W. Lim Day14 A 2017-11-02 Thr 2 / 14 Based

More information

C-Refresher: Session 10 Disk IO

C-Refresher: Session 10 Disk IO C-Refresher: Session 10 Disk IO Arif Butt Summer 2017 I am Thankful to my student Muhammad Zubair bcsf14m029@pucit.edu.pk for preparation of these slides in accordance with my video lectures at http://www.arifbutt.me/category/c-behind-the-curtain/

More information

Introduction to file management

Introduction to file management 1 Introduction to file management Some application require input to be taken from a file and output is required to be stored in a file. The C language provides the facility of file input-output operations.

More information

Lecture 9: File Processing. Quazi Rahman

Lecture 9: File Processing. Quazi Rahman 60-141 Lecture 9: File Processing Quazi Rahman 1 Outlines Files Data Hierarchy File Operations Types of File Accessing Files 2 FILES Storage of data in variables, arrays or in any other data structures,

More information

XC866 Getting Started on EasyKit & Toolkits

XC866 Getting Started on EasyKit & Toolkits March 2005 XC866 on EasyKit & Toolkits Page 1 N e v e r s t o p t h i n k i n g. Overview DAvE! This will get you started in using the XC866. KEIL HiTOP XC800_ FLOAD! You will be introduced to the following

More information

RX Family APPLICATION NOTE. I 2 C Bus Interface (RIIC) Module Using Firmware Integration Technology. Introduction. Target Device.

RX Family APPLICATION NOTE. I 2 C Bus Interface (RIIC) Module Using Firmware Integration Technology. Introduction. Target Device. I 2 C Bus Interface (RIIC) Module Using Firmware Integration Technology Introduction APPLICATION NOTE R01AN1692EJ0231 Rev. 2.31 This application note describes the I 2 C bus interface (RIIC) module using

More information

CLD SC58x CDC Library v.1.00 Users Guide Users Guide Revision For Use With Analog Devices ADSP-SC58x Series Processors. Closed Loop Design, LLC

CLD SC58x CDC Library v.1.00 Users Guide Users Guide Revision For Use With Analog Devices ADSP-SC58x Series Processors. Closed Loop Design, LLC CLD SC58x CDC Library v.1.00 Users Guide Users Guide Revision 1.00 For Use With Analog Devices ADSP-SC58x Series Processors Closed Loop Design, LLC 748 S MEADOWS PKWY STE A-9-202 Reno, NV 89521 support@cld-llc.com

More information

Computer Programming Unit v

Computer Programming Unit v READING AND WRITING CHARACTERS We can read and write a character on screen using printf() and scanf() function but this is not applicable in all situations. In C programming language some function are

More information

C Syntax Arrays and Loops Math Strings Structures Pointers File I/O. Final Review CS Prof. Jonathan Ventura. Prof. Jonathan Ventura Final Review

C Syntax Arrays and Loops Math Strings Structures Pointers File I/O. Final Review CS Prof. Jonathan Ventura. Prof. Jonathan Ventura Final Review CS 2060 Variables Variables are statically typed. Variables must be defined before they are used. You only specify the type name when you define the variable. int a, b, c; float d, e, f; char letter; //

More information

BASICS OF THE RENESAS SYNERGY PLATFORM

BASICS OF THE RENESAS SYNERGY PLATFORM BASICS OF THE RENESAS SYNERGY PLATFORM TM Richard Oed 2017.12 02 CHAPTER 9 INCLUDING A REAL-TIME OPERATING SYSTEM CONTENTS 9 INCLUDING A REAL-TIME OPERATING SYSTEM 03 9.1 Threads, Semaphores and Queues

More information

USB Debug Adapter. Power USB DEBUG ADAPTER. Silicon Laboratories. Stop. Run. Figure 1. Hardware Setup using a USB Debug Adapter

USB Debug Adapter. Power USB DEBUG ADAPTER. Silicon Laboratories. Stop. Run. Figure 1. Hardware Setup using a USB Debug Adapter C8051F38X DEVELOPMENT KIT USER S GUIDE 1. Kit Contents The C8051F38x Development Kit contains the following items: C8051F380 Target Board C8051Fxxx Development Kit Quick-start Guide Silicon Laboratories

More information

Day14 A. Young W. Lim Tue. Young W. Lim Day14 A Tue 1 / 15

Day14 A. Young W. Lim Tue. Young W. Lim Day14 A Tue 1 / 15 Day14 A Young W. Lim 2017-12-26 Tue Young W. Lim Day14 A 2017-12-26 Tue 1 / 15 Outline 1 Based on 2 C Strings (1) Characters and Strings Unformatted IO Young W. Lim Day14 A 2017-12-26 Tue 2 / 15 Based

More information

fopen() fclose() fgetc() fputc() fread() fwrite()

fopen() fclose() fgetc() fputc() fread() fwrite() The ability to read data from and write data to files is the primary means of storing persistent data, data that does not disappear when your program stops running. The abstraction of files that C provides

More information

Unit 6 Files. putchar(ch); ch = getc (fp); //Reads single character from file and advances position to next character

Unit 6 Files. putchar(ch); ch = getc (fp); //Reads single character from file and advances position to next character 1. What is File management? In real life, we want to store data permanently so that later on we can retrieve it and reuse it. A file is a collection of bytes stored on a secondary storage device like hard

More information

1. Overview Ethernet FIT Module Outline of the API API Information... 5

1. Overview Ethernet FIT Module Outline of the API API Information... 5 Introduction APPLICATION NOTE R01AN2009EJ0115 Rev.1.15 This application note describes an Ethernet module that uses Firmware Integration Technology (FIT). This module performs Ethernet frame transmission

More information

UNIT-V CONSOLE I/O. This section examines in detail the console I/O functions.

UNIT-V CONSOLE I/O. This section examines in detail the console I/O functions. UNIT-V Unit-5 File Streams Formatted I/O Preprocessor Directives Printf Scanf A file represents a sequence of bytes on the disk where a group of related data is stored. File is created for permanent storage

More information

Programming Assignment 1: Pushbutton and Light

Programming Assignment 1: Pushbutton and Light CSE 30 WINTER 2010 Programming Assignment 1: Pushbutton and Light Associated Cypress Board: CY3214 Associated Part Family: CY8C24894 PSoC Designer Version: 5.0 Revised: 10.5.2009 Summary When the push

More information

Today s Menu. >Use the Internal Register(s) >Use the Program Memory Space >Use the Stack >Use global memory

Today s Menu. >Use the Internal Register(s) >Use the Program Memory Space >Use the Stack >Use global memory Today s Menu Methods >Use the Internal Register(s) >Use the Program Memory Space >Use the Stack >Use global memory Look into my See examples on web-site: ParamPassing*asm and see Methods in Software and

More information

Figure 1. Simplicity Studio

Figure 1. Simplicity Studio SIMPLICITY STUDIO USER S GUIDE 1. Introduction Simplicity Studio greatly reduces development time and complexity with Silicon Labs EFM32 and 8051 MCU products by providing a high-powered IDE, tools for

More information

PLX USB Development Kit

PLX USB Development Kit 870 Maude Avenue Sunnyvale, California 94085 Tel (408) 774-9060 Fax (408) 774-2169 E-mail: www.plxtech.com/contacts Internet: www.plxtech.com/netchip PLX USB Development Kit PLX Technology s USB development

More information

1. Document Overview Overview Using USB-BASIC-F/W User-Defined Macros User-Defined Information...

1. Document Overview Overview Using USB-BASIC-F/W User-Defined Macros User-Defined Information... APPLICATION NOTE Renesas USB Device USB Basic Firmware R01AN0512EJ0110 Rev.1.10 Introduction This document is an instruction manual for the Renesas USB Device USB basic firmware, a sample program for USB

More information

Note that FLIP is an Atmel program supplied by Crossware with Atmel s permission.

Note that FLIP is an Atmel program supplied by Crossware with Atmel s permission. INTRODUCTION This manual will guide you through the first steps of getting the SE-8051ICD running with the Crossware 8051 Development Suite and the Atmel Flexible In-System Programming system (FLIP). The

More information

Codewarrior for ColdFire (Eclipse) 10.0 Setup

Codewarrior for ColdFire (Eclipse) 10.0 Setup Codewarrior for ColdFire (Eclipse) 10.0 Setup 1. Goal This document is designed to ensure that your Codewarrior for Coldfire v10.0 environment is correctly setup and to orient you to it basic functionality

More information

AN4869 Application note

AN4869 Application note Application note BlueNRG-1, BlueNRG-2 BLE OTA (over-the-air) firmware upgrade Introduction This application note describes the BlueNRG-1 over-the-air (OTA) firmware upgrade procedures running on top of

More information

ZICM357P2 - Evaluation Kit User s Guide

ZICM357P2 - Evaluation Kit User s Guide User Guide 0008-02-08-00-000 (Rev. A) ZICM357P2 - Evaluation Kit User s Guide ZICM357P2 Evaluation Kit User Guide Introduction The ZICM357P2 Evaluation Kit (ZICM357P2-KIT1-1) provides a simple evaluation

More information

CEL MeshConnect ZICM35x Test Tool User Guide

CEL MeshConnect ZICM35x Test Tool User Guide User Guide 0011-00-17-02-000 CEL MeshConnect ZICM35x Test Tool User Guide CEL MeshConnect ZICM35x Test Tool User Guide Introduction CEL s MeshConnect EM357 Mini Modules combine high performance RF solutions

More information

FAE Summit Interfacing the ADS8361 to the MSP430F449 Low Power Micro Controller

FAE Summit Interfacing the ADS8361 to the MSP430F449 Low Power Micro Controller FAE Summit February 2004 FAE Summit 2004 - Interfacing the ADS8361 to the MSP430F449 Low Power Micro Controller Tom Hendrick High Performance Analog - Data Acquisition Products Group LAB OBJECTIVES This

More information

EE475 Lab #3 Fall Memory Placement and Interrupts

EE475 Lab #3 Fall Memory Placement and Interrupts EE475 Lab #3 Fall 2005 Memory Placement and Interrupts In this lab you will investigate the way in which the CodeWarrior compiler and linker interact to place your compiled code and data in the memory

More information

TWR-KV10Z32 Sample Code Guide for IAR Board configuration, software, and development tools

TWR-KV10Z32 Sample Code Guide for IAR Board configuration, software, and development tools Freescale Semiconductor User s Guide Doc Number: TWRKV10Z32IARUG Rev. 0.1, 01/2014 TWR-KV10Z32 Sample Code Guide for IAR Board configuration, software, and development tools by Freescale Semiconductor,

More information

RX Family APPLICATION NOTE. Flash Module Using Firmware Integration Technology. Introduction. Target Device. Related Documents

RX Family APPLICATION NOTE. Flash Module Using Firmware Integration Technology. Introduction. Target Device. Related Documents Introduction APPLICATION NOTE The (FIT) has been developed to allow users of supported RX devices to easily integrate reprogramming abilities into their applications using self-programming. Self-programming

More information

BASICS OF THE RENESAS SYNERGY PLATFORM

BASICS OF THE RENESAS SYNERGY PLATFORM BASICS OF THE RENESAS SYNERGY PLATFORM TM Richard Oed 2017.12 02 CHAPTER 3 AN INTRODUCTION TO THE APIs OF THE SYNERGY SOFTWARE CONTENTS 3 AN INTRODUCTION TO THE APIs OF THE SYNERGY SOFTWARE 03 3.1 API

More information

Input/Output and the Operating Systems

Input/Output and the Operating Systems Input/Output and the Operating Systems Fall 2015 Jinkyu Jeong (jinkyu@skku.edu) 1 I/O Functions Formatted I/O printf( ) and scanf( ) fprintf( ) and fscanf( ) sprintf( ) and sscanf( ) int printf(const char*

More information

Using an ez80 Flash Memory File System

Using an ez80 Flash Memory File System Application Note Using an ez80 Flash Memory File System AN017303-0908 Abstract This Application Note demonstrates a method for creating a file system that can be stored within the external Flash memory

More information

QUICK START GUIDE TO THE JUMPSTART MICROBOX

QUICK START GUIDE TO THE JUMPSTART MICROBOX QUICK START GUIDE TO THE JUMPSTART MICROBOX JumpStart MicroBox Contents The JumpStart MicroBox has three hardware components: Nucleo board from ST. This board contains the Cortex M0 STM32F030 microcontroller

More information

The BlueNRG-1, BlueNRG-2 BLE OTA (over-the-air) firmware upgrade

The BlueNRG-1, BlueNRG-2 BLE OTA (over-the-air) firmware upgrade Application note The BlueNRG-1, BlueNRG-2 BLE OTA (over-the-air) firmware upgrade Introduction This application note describes the BlueNRG-1, BlueNRG-2 over-the-air (OTA) firmware upgrade procedures running

More information

F28069 ControlCard Lab1

F28069 ControlCard Lab1 F28069 ControlCard Lab1 Toggle LED LD2 (GPIO31) and LD3 (GPIO34) 1. Project Dependencies The project expects the following support files: Support files of controlsuite installed in: C:\TI\controlSUITE\device_support\f28069\v135

More information

Lecture 8: Structs & File I/O

Lecture 8: Structs & File I/O ....... \ \ \ / / / / \ \ \ \ / \ / \ \ \ V /,----' / ^ \ \.--..--. / ^ \ `--- ----` / ^ \. ` > < / /_\ \. ` / /_\ \ / /_\ \ `--' \ /. \ `----. / \ \ '--' '--' / \ / \ \ / \ / / \ \ (_ ) \ (_ ) / / \ \

More information

M16C R8C FoUSB/UART Debugger. User Manual REJ10J

M16C R8C FoUSB/UART Debugger. User Manual REJ10J REJ10J1725-0100 M16C R8C FoUSB/UART Debugger User Manual Renesas Microcomputer Development Environment System R8C Family R8C/2x Series Notes on Connecting R8C/2A, R8C/2B, R8C/2C, R8C/2D Rev.1.00 Issued

More information

Serial Compact Flash Serial CF Card Module User Manual

Serial Compact Flash Serial CF Card Module User Manual CUBLOC Peripheral Serial Compact Flash Serial Card Module User Manual 3. Specifications Model -COM5 -COM3 Voltage 4.5~5.5V 2.7~5.5V - 115200 bps: 20KB/s - 115200 bps: 15KB/s Read Speed - 9600 bps: 6KB/s

More information

Debugging in AVR32 Studio

Debugging in AVR32 Studio Embedded Systems for Mechatronics 1, MF2042 Tutorial Debugging in AVR32 Studio version 2011 10 04 Debugging in AVR32 Studio Debugging is a very powerful tool if you want to have a deeper look into your

More information

XC2287M HOT. Solution CAN_2 Serial Communication using the CAN with external CAN BUS

XC2287M HOT. Solution CAN_2 Serial Communication using the CAN with external CAN BUS XC2287M HOT Solution CAN_2 Serial Communication using the CAN with external CAN BUS Device: XC2287M-104F80 Compiler: Tasking Viper 2.4r1 Code Generator: DAvE 2.1 Page 2 XC2287M HOT Exercise CAN_2 Serial

More information

ECE 3120 Lab 1 Code Entry, Assembly, and Execution

ECE 3120 Lab 1 Code Entry, Assembly, and Execution ASSEMBLY PROGRAMMING WITH CODE WARRIOR The purpose of this lab is to introduce you to the layout and structure of assembly language programs and their format, as well as to the use of the Code Warrior

More information

Before Class Install SDCC Instructions in Installing_SiLabs-SDCC- Drivers document. Solutions to Number Systems Worksheet. Announcements.

Before Class Install SDCC Instructions in Installing_SiLabs-SDCC- Drivers document. Solutions to Number Systems Worksheet. Announcements. August 15, 2016 Before Class Install SDCC Instructions in Installing_SiLabs-SDCC- Drivers document Install SiLabs Instructions in Installing_SiLabs-SDCC- Drivers document Install SecureCRT On LMS, also

More information

CPE 323: Laboratory Assignment #1 Getting Started with the MSP430 IAR Embedded Workbench

CPE 323: Laboratory Assignment #1 Getting Started with the MSP430 IAR Embedded Workbench CPE 323: Laboratory Assignment #1 Getting Started with the MSP430 IAR Embedded Workbench by Alex Milenkovich, milenkovic@computer.org Objectives: This tutorial will help you get started with the MSP30

More information

NOTE: Debug and DebugSingle are the only MPI library configurations that will produce trace output.

NOTE: Debug and DebugSingle are the only MPI library configurations that will produce trace output. Trace Objects Trace Objects Introduction Use the Trace module to selectively produce trace output on a global and/or per-object basis for your application. You can specify the types of trace output when

More information

CLD BF70x CDC Library v.1.3 Users Guide Users Guide Revision 1.3. For Use With Analog Devices ADSP-BF70x Series Processors. Closed Loop Design, LLC

CLD BF70x CDC Library v.1.3 Users Guide Users Guide Revision 1.3. For Use With Analog Devices ADSP-BF70x Series Processors. Closed Loop Design, LLC CLD BF70x CDC Library v.1.3 Users Guide Users Guide Revision 1.3 For Use With Analog Devices ADSP-BF70x Series Processors Closed Loop Design, LLC 748 S MEADOWS PKWY STE A-9-202 Reno, NV 89521 support@cld-llc.com

More information

QUICK START GUIDE FOR FIRMWARE UPGRADE RS232-TO UART INTERFACE BOARD AND SOFTWARE

QUICK START GUIDE FOR FIRMWARE UPGRADE RS232-TO UART INTERFACE BOARD AND SOFTWARE QUICK START GUIDE FOR FIRMWARE UPGRADE RS232-TO UART INTERFACE BOARD AND SOFTWARE DESCRIPTION RS232-TO-UART Interface board is a PC- Serial-Port-to-UART adaptor that uses a customise Toshiba application

More information

Changing the Embedded World TM. Module 3: Getting Started Debugging

Changing the Embedded World TM. Module 3: Getting Started Debugging Changing the Embedded World TM Module 3: Getting Started Debugging Module Objectives: Section 1: Introduce Debugging Techniques Section 2: PSoC In-Circuit Emulator (ICE) Section 3: Hands on Debugging a

More information

CSE2301. Introduction. Streams and Files. File Access Random Numbers Testing and Debugging. In this part, we introduce

CSE2301. Introduction. Streams and Files. File Access Random Numbers Testing and Debugging. In this part, we introduce Warning: These notes are not complete, it is a Skelton that will be modified/add-to in the class. If you want to us them for studying, either attend the class or get the completed notes from someone who

More information

RAM Based File System for HTTP daemon on Renesas M16 board

RAM Based File System for HTTP daemon on Renesas M16 board RAM Based File System for HTTP daemon on Renesas M16 board Cuong Phu Nguyen cpnguyen Kyung Chul Lee kclee CSC 714 Real Time Computer Systems Dr. Mueller November 30, 2005 1. Introduction The Renesas M16

More information

File Handling. Reference:

File Handling. Reference: File Handling Reference: http://www.tutorialspoint.com/c_standard_library/ Array argument return int * getrandom( ) static int r[10]; int i; /* set the seed */ srand( (unsigned)time( NULL ) ); for ( i

More information

CMPE-013/L. File I/O. File Processing. Gabriel Hugh Elkaim Winter File Processing. Files and Streams. Outline.

CMPE-013/L. File I/O. File Processing. Gabriel Hugh Elkaim Winter File Processing. Files and Streams. Outline. CMPE-013/L Outline File Processing File I/O Gabriel Hugh Elkaim Winter 2014 Files and Streams Open and Close Files Read and Write Sequential Files Read and Write Random Access Files Read and Write Random

More information

Getting Started with STK200 Dragon

Getting Started with STK200 Dragon Getting Started with STK200 Dragon Introduction This guide is designed to get you up and running with main software and hardware. As you work through it, there could be lots of details you do not understand,

More information

As CCS starts up, a splash screen similar to one shown below will appear.

As CCS starts up, a splash screen similar to one shown below will appear. APPENDIX A. CODE COMPOSER STUDIO (CCS) v6.1: A BRIEF TUTORIAL FOR THE DSK6713 A.1 Introduction Code Composer Studio (CCS) is Texas Instruments Eclipse-based integrated development environment (IDE) for

More information

M16C/26 APPLICATION NOTE. Measuring Computation Time of a Function Call. 1.0 Abstract. 2.0 Introduction. 3.0 Number of Function Call Returns

M16C/26 APPLICATION NOTE. Measuring Computation Time of a Function Call. 1.0 Abstract. 2.0 Introduction. 3.0 Number of Function Call Returns APPLICATION NOTE M16C/26 1.0 Abstract The following article discusses a technique for measuring computation time spent during a function call, which can be in C or Assembly, from a main C program for the

More information

Darshan Institute of Engineering & Technology for Diploma Studies Unit 6

Darshan Institute of Engineering & Technology for Diploma Studies Unit 6 1. What is File management? In real life, we want to store data permanently so that later on we can retrieve it and reuse it. A file is a collection of bytes stored on a secondary storage device like hard

More information

Input / Output Functions

Input / Output Functions CSE 2421: Systems I Low-Level Programming and Computer Organization Input / Output Functions Presentation G Read/Study: Reek Chapter 15 Gojko Babić 10-03-2018 Input and Output Functions The stdio.h contain

More information

ECGR 4101/5101, Fall 2011: Lab 4 A pseudo physics simulator with remote communication.

ECGR 4101/5101, Fall 2011: Lab 4 A pseudo physics simulator with remote communication. Learning Objectives: ECGR 4101/5101, Fall 2011: Lab 4 A pseudo physics simulator with remote communication. This lab will test your ability to apply the knowledge you have obtained from the last three

More information

USB BF70x Audio 1.0 Library v.1.2 Users Guide Users Guide Revision 1.3. For Use With Analog Devices ADSP-BF70x Series Processors

USB BF70x Audio 1.0 Library v.1.2 Users Guide Users Guide Revision 1.3. For Use With Analog Devices ADSP-BF70x Series Processors USB BF70x Audio 1.0 Library v.1.2 Users Guide Users Guide Revision 1.3 For Use With Analog Devices ADSP-BF70x Series Processors Closed Loop Design, LLC 748 S MEADOWS PKWY STE A-9-202 Reno, NV 89521 support@cld-llc.com

More information

C File Processing: One-Page Summary

C File Processing: One-Page Summary Chapter 11 C File Processing C File Processing: One-Page Summary #include int main() { int a; FILE *fpin, *fpout; if ( ( fpin = fopen( "input.txt", "r" ) ) == NULL ) printf( "File could not be

More information

CS16 Exam #1 7/17/ Minutes 100 Points total

CS16 Exam #1 7/17/ Minutes 100 Points total CS16 Exam #1 7/17/2012 75 Minutes 100 Points total Name: 1. (10 pts) Write the definition of a C function that takes two integers `a` and `b` as input parameters. The function returns an integer holding

More information

CSci 4061 Introduction to Operating Systems. Input/Output: High-level

CSci 4061 Introduction to Operating Systems. Input/Output: High-level CSci 4061 Introduction to Operating Systems Input/Output: High-level I/O Topics First, cover high-level I/O Next, talk about low-level device I/O I/O not part of the C language! High-level I/O Hide device

More information