Sei sulla pagina 1di 1

PO Box 65043, Erasmusrand, 0165 082 821 6313 eduprep@myconnection.co.

za

EDUcational PREParation Centre


SOFTWARE FOR THE XC866 DEVELOPMENT PCB

C.C. Reg. No: 2005 / 002390 / 23

The Small Device C Compiler (SDCC) is a DOS based freeware C compiler for a number of microcontrollers including MCS51 derivatives. Program code can be generated from any software package which outputs only ASCII characters (e.g. Notepad, TextPad, etc). The program Memtool is used to download the executable HEX file to the microcontroller over the RS232 communications port between the PC and the Development Board. The following is an example of how to install and utilise the software to compile, download and execute C code for the XC866 microcontroller. XC866 Compiler Software Installation and Operation 1. Run the SDCC setup file sdcc-2.5.0-setup in the SDCC folder. Remember to select the option to place SDCC in the DOS path when requested. 2. Use Windows Explorer to copy the file XC866.H from CD to the folder c:\Program Files\SDCC\include\mcs51. 3. Run the Texpad setup file txpeng471.exe in the TexPad folder. 4. In Windows Explorer go to the directory c:\temp and generate a new folder (File, New Folder) and name it XC866, which will be the working directory. 5. Use Windows Explorer to copy the files in Example LED from CD to the folder c:\temp\xc866. 6. Open the MAIN.C file in this working directory by right click and selecting open with TextPad from the directory c:\temp\xc866. 7. In TextPad select Tool, RUN, Browse. Select theComplile.Bat file and Open. Select the Capture Output tab and select OK. Ensure that no errors are reported in the Command Results window. (If nothing is reported between the C:\temp\xc866\sdcc main.c and c:\temp\xc866\del main.hex prompts, there are no errors). 8. A number of files are generated in the current directory (c:\temp\xc866 in this case) and the file main.hex is the executable HEX file that needs to be downloaded to the XC866 processor. Downloading Software to the XC866 1. Install Infineon Mem Tool program if not already installed. 2. Connect the serial communications cable between the XC866 Development PCB and the PC (female DB9 connector on the PC side and DB9 male (J3) on the Development board). 3. Run the file Memtool from Start, Programs, Infineon Mem Tool 4.2 and click on file. 4. In Memtool, select Open File and select the file c:\temp\xc866\main.hex. (This file was generated in step 7 & 8 in the paragraph above). 5. Ensure that the XC866 is in BootStrap Loader (BSL) mode by placing the jumper B.S.L. in its position on the XC866 Development Board and pressing the reset button. 6. In the Memtool program, select Connect and ensure that Tool status changes to Disconnect. Press Select All, Add Selection and Program. 7. After successful downloading reported by the message Result: Success in the middle of the screen, select Exit and Disconnect. 8. Remove B.S.L. jumper on the XC866 Development Board. 9. Press the reset button and the XC866 executes the program previously downloaded.

XC866_SW_01 WITH EXPERIENCE IN ENGINEERING AS OUR FOUNDATION WE SHALL IMPROVE TECHNOLOGY FOR OUR NATION

Potrebbero piacerti anche