K8048 PIC PROGRAMMER BOARD K8048 © 2003 Velleman Components
Velleman Kits Welcome to the exciting world of Velleman Kits. Velleman Kit is known all over the world for our High Quality electronic kits. Our range goes from easy to build Mini Kits to more advanced Kits such as High-End audio circuits, domotic systems and computer interface kits. Because of the huge success of our sophisticated measuring instruments like the PC- and hand-held oscilloscopes, we've founded the Velleman Instruments division.
Contents I Table of Contents general 2 FCC information 2 Specifications 3 Connection 3 Hardware installation 4 Programming Procedure 5 Writing/changing a program ................................................................................................................................... 5 Compiling................................................................................................................................... 5 Actual programming of the microcontroller .................
2 1 PIC programmer board general The K8048 is a multifunctional programmer for Microchip ® PIC™ FLASH microcontrollers*. These controllers can be reprogrammed a large number of times, making it easy to upgrade the software of a device in which they are implemented or allowing the user to experiment to his heart's content. Different IC types can be programmed and various LEDs and push buttons allow the testing of small circuits on the programmer print.
FCC information 3 Specifications · · · · · · · · · · Suitable for programming Microchip® FLASH PIC(tm) microcontrollers. Supports 4 different 300 mil. PICs: 8p, 14p, 18p and 28p. Test buttons and LED indicators to carry out educational experiments e.g. the enclosed programming examples. Easily to connect to a PC via the serial port. Enclosed is a Flash Microcontroller (PIC16F627) that can be reprogrammed up to 1000 times. Software is included to compile and program your source code.
PIC programmer board 4 5 Hardware installation · Connect your PC with the K8048 via a 9-pin serial cable. Use a free serial port and ensure that the installed software cannot cause an interrupt conflict on this port when working with the K8048 e.g. executive programs for other programmers, measuring devices, PDA's, etc... · · Place selector (SW5) in the central position (standby). Connect a non-regulated 12 to 15V DC adapter of min.
Hardware installation 6 5 Programming Procedure Programming the microcontrollers: preparations · · · · 6.1 Writing or modifying the source code: the source code is usually written in PIC assembler. Look at the examples in the Velleman\K8048\Examples\ folder. Compiling: the code you have written in comprehensible language is converted into machine language. In this instance the Microchip PIC assembler software, MPASMWIN.EXE, is used.
6 PIC programmer board 1 This is the name and location of your source code file e.g. C:\TEST\DEMOF267.ASM 2. Select the format of the machine code you wish to create. Always select 'HEXADEMICAL' for the K8048. 3. The variables are checked for spelling mistakes if this option is checked off (capitals or small letters) 4. Determines to what extent error messages and warnings are generated in the error file. Preferably you should tick off ALL MESSAGES of ERRORS ONLY. 5.
Programming Procedure 7 The assembler will now generate the following files: · xxx.ERR => Error file, contains all errors and/or all warnings MPASM assembler has located in your source code · xxx.Hex => This is the actual machine code file to be used by the programming software for the programming of the controller). · xxx.LST => Listing file, contains your source code and the additional remarks generated by the assembler. · xxx.
PIC programmer board 8 · Check the settings of the software 1. 2. 3. 4. 5. 6. 7. 8. Set the number of the serial port the K8048 is connected to. Writing the CODE: (standard = ON). Writing the EEPROM data (standard = ON). Writing the configuration settings (standard = ON). ERASE before WRITE: (standard = ON). This indicates that the controller is erased prior to programming. LOW VOLTAGE Programming: does not apply to the K8048.
Programming Procedure 6.3.1 9 Programming · Make sure that SW5 is placed in the central position (standby) · Put the controller in the appropriate IC socket: o insert the 8-pin PIC in socket IC1 o insert the 14-pin PIC in socket IC2 o insert the 18-pin PIC in socket IC3 o insert the 28-pin PIC in socket IC4 · Now put SW5 in the 'PROG' position. The warning LED LD9 starts to flash. This means that no controller can be connected with or disconnected from a socket with SW5 in this position.
PIC programmer board 10 * Attention: Place SW5 in the 'PROG'-position in order to use this function ! 4. Enables the user to view and modify data stored in a controller's EEPROM. * Attention: Place SW5 in the 'PROG'-position in order to use this function ! 5. Leave this adjustment in the standard setting : 'NORMAL'. When you're having trouble programming you can set the speed on 'HIGH' if you have a slow PC or you can select 'LOW' if your PC is extremely fast.
Programming Procedure 7 11 Experiments Use of the experiment push buttons and LEDs: The K8048 is equipped with a max. of 4 test inputs that can be operated manually with SW1,SW2,SW3 and SW4. The device also has 6 diagnostics LEDs that enable the user to simulate outputs. Click on the link "cross-reference table" to determine for every IC socket which I/O line is linked to which push button or LED.
12 PIC programmer board Step-by-step execution of a sample program. For our example we will use the program demo1.asm, a simple running light: · Verify whether the adapter and the serial connection of your K8048/VM111 are connected and make sure the programmer software has been installed on your PC. · Compile the file 'demo1.asm' with MPASM.EXE (see Compiling) · Start the programmer software, PICPROG2.
Experiments 8 13 ICSP IICSP allows you to program controllers "in-circuit". This process is also known as code downloading. This means quite simply that the chip in question is connected with a socket consisting of four or five wires, viz. the ICSP bus. Several members of the PIC family can be programmed or reprogrammed without having to remove them from the print or deactivating the power supply.