PIC Programmer K150: Difference between revisions

From EnigmaGuy Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 2: Line 2:
[[File:K150.jpg|200px|thumb|PIC K150 Programmer]]
[[File:K150.jpg|200px|thumb|PIC K150 Programmer]]
This device is obsolete and not compatible with MPLab X (new PIC development tool), so you will have to export files in HEX format from MPLab X and import to DIY application which has released last version in 2007. For small projects I believe this device for 9 USD from E-Bay (Chinese resellers) is fine but for more advanced development is recommended usage of PICKit 3. Before you will buy this device I strongly recommend you to visit [http://www.kitsrus.com/pic.html DIY Site] and download latest [http://www.kitsrus.com/zip/DIYpack25ep.zip DIYpack25ep.zip] file. Also you will need USB driver for K150 devices (which is different from recommended on DIY site) for [http://www.prolific.com.tw/US/ShowProduct.aspx?p_id=225&pcid=41 Profilic USB to Serial converter]. Please also be informed that Profilic USB to Serial converter mounted on K150 boards supports only Windows up to version 7. Windows 8 or Windows 8.1 won't work!
This device is obsolete and not compatible with MPLab X (new PIC development tool), so you will have to export files in HEX format from MPLab X and import to DIY application which has released last version in 2007. For small projects I believe this device for 9 USD from E-Bay (Chinese resellers) is fine but for more advanced development is recommended usage of PICKit 3. Before you will buy this device I strongly recommend you to visit [http://www.kitsrus.com/pic.html DIY Site] and download latest [http://www.kitsrus.com/zip/DIYpack25ep.zip DIYpack25ep.zip] file. Also you will need USB driver for K150 devices (which is different from recommended on DIY site) for [http://www.prolific.com.tw/US/ShowProduct.aspx?p_id=225&pcid=41 Profilic USB to Serial converter]. Please also be informed that Profilic USB to Serial converter mounted on K150 boards supports only Windows up to version 7. Windows 8 or Windows 8.1 won't work!
== DIY Software ==
[[File:Diy-k150.png|200px|thumb|DIY Software for K150]]


== MPLabX ==
== MPLabX ==
Line 53: Line 50:
}
}
</syntaxhighlight>
</syntaxhighlight>
* Run -> Clean and build main project
== DIY Software ==
[[File:Diy-k150.png|200px|thumb|DIY Software for K150]]
* Run MicroBrn
* Select right COM port (you can find it using device manager)
[[File:K150-1.png|Windows 7 - Device manager]]

Revision as of 07:50, 4 October 2014

About PIC Programmer K150

PIC K150 Programmer

This device is obsolete and not compatible with MPLab X (new PIC development tool), so you will have to export files in HEX format from MPLab X and import to DIY application which has released last version in 2007. For small projects I believe this device for 9 USD from E-Bay (Chinese resellers) is fine but for more advanced development is recommended usage of PICKit 3. Before you will buy this device I strongly recommend you to visit DIY Site and download latest DIYpack25ep.zip file. Also you will need USB driver for K150 devices (which is different from recommended on DIY site) for Profilic USB to Serial converter. Please also be informed that Profilic USB to Serial converter mounted on K150 boards supports only Windows up to version 7. Windows 8 or Windows 8.1 won't work!

MPLabX

  • Select File->New Project->Standalone project

MPLabX - screen 1

  • Select Device->PIC16F630
  • Select Supported Debug Header: AC162052
  • Select Tool: Simulator
  • Select Compiler: XC8
  • Select project name: LED test
  • Click Finish
  • Right click on Source files -> New C Main file

MPLabX - screen 2

  • Paste the following code into new file
/*
 * File:   newmain.c
 * Author: mkonicek
 *
 * Created on September 7, 2014, 10:19 AM
 */

#include <xc.h>
#include <stdio.h>
#include <stdlib.h>
#include <pic16f630.h>
#define _XTAL_FREQ 4000000

// Send bit to RA0
void changeled(int value){
    if(value==0){
        PORTA = 0x00;
    } else {
        PORTA = 0x01;
    }
    __delay_ms(1000);
}

int main(int argc, char** argv) {
    TRISA = 0x00; // Set PORTA as OUTPUT
    for(;;){
        changeled(0);
        changeled(1);
    }
}
  • Run -> Clean and build main project


DIY Software

DIY Software for K150
  • Run MicroBrn
  • Select right COM port (you can find it using device manager)

Windows 7 - Device manager