All About Circuits Forum  

Go Back   All About Circuits Forum > Electronics Forums > General Electronics Chat

Notices

General Electronics Chat Discussion forum for general chat about anything electronics related, including asking questions about material in the All About Circuits E-book, Worksheets, and Videos.

Reply   Post New Thread
 
Thread Tools Display Modes
  #1  
Old 11-10-2012, 10:24 AM
hunterage2000's Avatar
hunterage2000 hunterage2000 is offline
Senior Member
 
Join Date: May 2010
Location: Durham, UK
Posts: 291
Default question about k150 DIY PIC programmer

I have recently bought a k150 DIY PIC programmer and used it with JALEDIT and microbrn.exe by micropro. I have downloaded MPLAB X and xc8 compiler but when setting up a new project, at step 4 hardware tools my k150 isnt there. I have a 6 pin socket (NC, PGC, PGD, GND, VCC and VPP),

do these have to be connected to be recognised by MPLAB? if so where are they connected?
Reply With Quote
  #2  
Old 11-10-2012, 12:12 PM
spinnaker's Avatar
spinnaker spinnaker is offline
Senior Member
 
Join Date: Oct 2009
Location: Pittsburgh, PA U.S.A.
Posts: 3,639
Default

1. Locate your trash can.

2. Take the programmer and place it carefully in the bottom of the can.

3. Take the trash can outside and dump it into your outside trash can to be collected.

4. Go buy a PicKit 2 or PicKit 3 from Microchip.

5. Save yourself huge headaches.

The programmer from microchip is only around $30. Why would you buy anything else?


Your programmer is not supported by MPLAB. You will need to do your programming with the software that comes with the programmer. You will need to produce a hex file with mplab then use that in the software. I doubt you will even be able to debug with it, another HUGE advantage of the Microchip programmers.

The lines you are talking about are the ICSP lines. They are used by the programmer to program the chip but are also used for debug assuming you have a supported programmer.
__________________
Please start sentences with a capital letter and end them with a punctuation mark. It makes your post easier to read.
Reply With Quote
  #3  
Old 11-10-2012, 12:39 PM
t06afre's Avatar
t06afre t06afre is offline
Senior Member
 
Join Date: May 2009
Posts: 5,806
Default

Quote:
Originally Posted by hunterage2000 View Post
I have recently bought a k150 DIY PIC programmer and used it with JALEDIT and microbrn.exe by micropro. I have downloaded MPLAB X and xc8 compiler but when setting up a new project, at step 4 hardware tools my k150 isnt there. I have a 6 pin socket (NC, PGC, PGD, GND, VCC and VPP),

do these have to be connected to be recognised by MPLAB? if so where are they connected?
It is perhaps somewhat harsh to recommend dumping your new programmer. Anyway the k150 can not be used from MPLAB. So you have to compile your program in MPLAB. Then use whatever tool you have to load the hex file and do the programming. If I remember correct you have 16f887 chip.

This is how you will connect for programming. I will recommend that you do the programming in circuit. You will very quickly damage your chip if you take it in and out of circuit for programming. Note your PIC has 2 set of VDD/GND pins. All of those must be connected
Reply With Quote
  #4  
Old 11-10-2012, 12:53 PM
spinnaker's Avatar
spinnaker spinnaker is offline
Senior Member
 
Join Date: Oct 2009
Location: Pittsburgh, PA U.S.A.
Posts: 3,639
Default

Quote:
Originally Posted by t06afre View Post
It is perhaps somewhat harsh to recommend dumping your new programme
I's a lot more cruel to encourage the OP to go forward with a headache creator. The OP is not even sure if the device was assembled correctly nor how reliable it is going to be.

I searched for Dave's blog on EEV where he mentions these things but can't find it. His words were pretty much the same on the programmers. A waste of time and money.

I like to get the truth right between the eyes. Initially it is painful but it is over quick.
__________________
Please start sentences with a capital letter and end them with a punctuation mark. It makes your post easier to read.
Reply With Quote
  #5  
Old 11-10-2012, 01:23 PM
hunterage2000's Avatar
hunterage2000 hunterage2000 is offline
Senior Member
 
Join Date: May 2010
Location: Durham, UK
Posts: 291
Default

Yeah my chip is the PIC16F887A and the programmer is a DIY k150. I have tried debugging a program but a screen with Hardware tools comes up and at the top it says "Real ICE not found" so I cant check for errors. Is there a way around this? if not can someone recommend more compiler options that uses C. I tried Bloodshed Dev C++ but I couldnt save as a .hex file

I do have JALEDIT working with the PIC but I would rather work with C.
Reply With Quote
  #6  
Old 11-10-2012, 02:02 PM
t06afre's Avatar
t06afre t06afre is offline
Senior Member
 
Join Date: May 2009
Posts: 5,806
Default

Quote:
Originally Posted by hunterage2000 View Post
Yeah my chip is the PIC16F887A and the programmer is a DIY k150. I have tried debugging a program but a screen with Hardware tools comes up and at the top it says "Real ICE not found" so I cant check for errors. Is there a way around this? if not can someone recommend more compiler options that uses C. I tried Bloodshed Dev C++ but I couldnt save as a .hex file

I do have JALEDIT working with the PIC but I would rather work with C.
Debugging is something you do then your program is free from C syntax errors. The compiler will not create a hex file before this. You do not save as a hex file. You compile and if no errors your hex file will be created. Have you written any C code so far for testing, and does this code compile correctly without any errors. That should be your first goal
Reply With Quote
  #7  
Old 11-10-2012, 04:11 PM
hunterage2000's Avatar
hunterage2000 hunterage2000 is offline
Senior Member
 
Join Date: May 2010
Location: Durham, UK
Posts: 291
Default

I got a bit sick of trying to get MPLAB to work so I downloaded PICbasic Pro using BASIC langauge. So with the k150, does it need to be powered with the 6 pin socket? if so what is VPP, PGC and PGD and where are they connected to? I've searched the net for answers which are there but I just cant make out what its saying.

With Jaledit when you compile the .jal file it scanned the file for syntax errrors then created a .hex file along with it. I used Micropro to upload the .hex file and I didnt need to use the 6 pin socket, just the usb connection.

The K150 is attached as an image.
Attached Images
File Type: jpg K150.jpg (28.4 KB, 14 views)
Reply With Quote
  #8  
Old 11-10-2012, 04:36 PM
takao21203's Avatar
takao21203 takao21203 is offline
Senior Member
 
Join Date: Apr 2012
Location: Ireland
Posts: 2,251
Blog Entries: 14
Send a message via Skype™ to takao21203
Default

When I built this PIC programmer, I also had various questions covering the gist and hest about ICSP, the power supply, and the RS232 connection.

I used a schematic but that was extraordinary bad, so I added components.

It was clear before I built it that there is no debugging, and it only can program a few PICs.

Unfortunately there are not really any good websites "How to build a really useful PIC programmer", including information how to actually use it.

Most people don't build PIC programmers.
Most people use a programmer that's supported by MPLAB, that's the only way to use modern PICs.
Attached Images
File Type: jpg 4503061944_7cb5d62f66_z.jpg (214.6 KB, 20 views)
Reply With Quote
  #9  
Old 11-10-2012, 06:28 PM
hunterage2000's Avatar
hunterage2000 hunterage2000 is offline
Senior Member
 
Join Date: May 2010
Location: Durham, UK
Posts: 291
Default

The k150 works with jaledit and micropro programmer but I wanted to program in C but MPLAB doesnt work, device manager doesnt show Microchip tools and when creating a project the k150 isnt shown.

Now I am trying BASIC programming with PICBASIC PRO which I have created the .bas file and the .hex for a blinking light but it isnt working and I dont get why this code sets port B0 as the output.

Code:
mainloop:
   High 0
   low 1              ' Turn on LED connected to PORTB.0
   Pause 500       ' Delay for .5 seconds

   Low 0
   high 1             ' Turn off LED connected to PORTB.0
   Pause 500
                        ' Delay for .5 seconds

   Goto mainloop   ' Go back to loop and blink LED forever
   
   End
Select All
Reply With Quote
  #10  
Old 11-10-2012, 08:29 PM
nigelwright7557 nigelwright7557 is offline
Senior Member
 
Join Date: May 2008
Posts: 375
Default

I still use an old Microchip PICSTART !
No messing about with ICSP just plug the chip in and MPLAB programs it.
You can remove and insert a chip in circuit many times before the socket dies if you are careful.
Reply With Quote
Reply   Post New Thread

Tags
, , , ,


Similar Threads
Thread Thread Starter Forum Replies Last Post
PIC Programmer victorment General Electronics Chat 13 02-26-2011 09:41 AM
how to build an USB PIC programmer? simpsonss Embedded Systems and Microcontrollers 2 11-18-2008 10:16 AM
AT89S51 DIY programmer? iRRVi Embedded Systems and Microcontrollers 6 08-19-2008 05:42 AM
Question: PIC 16F877A Bootloader? amzar Embedded Systems and Microcontrollers 1 07-23-2008 04:21 PM
Question about using a PIC microcontroller RFBeginner Embedded Systems and Microcontrollers 4 05-07-2007 07:47 PM

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:50 PM.


User-posted content, unless source quoted, is licensed under a Creative Commons Public Domain License.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.