Coilgun Power

Microcontroller/Coilgun Ideas and Support
 
Main HomeMain Home  HomeHome  FAQFAQ  SearchSearch  MemberlistMemberlist  UsergroupsUsergroups  RegisterRegister  Log in  

Share | 
 

 does PICkit2 work with PICflash from MikroE?

Go down 
AuthorMessage
DaveyPocket



Posts : 74
Join date : 2008-04-01

PostSubject: does PICkit2 work with PICflash from MikroE?   Sat Apr 26, 2008 8:15 pm

You stated in one of your replies, that the PICkit2 programmer is able to write the code from Mikro BASIC, C, or PASCAL. My question is what software is compatible with this device. I was wondering if PICflash was compatible, since that's most likely the only program that can dump MikroE's ASM code. I ordered my PICkit2 earlier today. I'm very curious. scratch
Back to top Go down
View user profile
Admin
Admin
avatar

Posts : 115
Join date : 2008-03-26
Location : USA, California

PostSubject: Re: does PICkit2 work with PICflash from MikroE?   Sun Apr 27, 2008 4:51 pm

You need to generate a .hex file with MikroE then use the program that came with the PICkit2 to write the code to the PIC. When you assemble your code MikroE should output a hex file to the same place as the project file.

PICflash is probably not compatible.

Justin
Back to top Go down
View user profile http://coilgunpower.com
DaveyPocket



Posts : 74
Join date : 2008-04-01

PostSubject: Ok.   Sun Apr 27, 2008 5:03 pm

Ok, I'll try that when I receive it in the mail.

I bought my PICkit2 from Microchip, just the PICkit2, nothing else. Does this package include the free C compiler?
Back to top Go down
View user profile
Admin
Admin
avatar

Posts : 115
Join date : 2008-03-26
Location : USA, California

PostSubject: Re: does PICkit2 work with PICflash from MikroE?   Sun Apr 27, 2008 7:51 pm

I don't remember. It may. If it does not just download it from Microchip. You need C18 compiler and MPLAB.

Justin
Back to top Go down
View user profile http://coilgunpower.com
DaveyPocket



Posts : 74
Join date : 2008-04-01

PostSubject: Arrival.   Thu May 01, 2008 12:26 am

My PICkit2 has just arrived in the mail, smaller than I thought! Comes with MPLAB IDE and the programmer tool. Now, when I let the PICkit2 detect my PIC16f627, it detected a short in the VPP, the voltage level was not correct, so that means I can't reprogram it. Mad

But, some good news is that I ordered some samples off Microchip's website Very Happy
Back to top Go down
View user profile
Admin
Admin
avatar

Posts : 115
Join date : 2008-03-26
Location : USA, California

PostSubject: Re: does PICkit2 work with PICflash from MikroE?   Thu May 01, 2008 1:58 am

That could be caused by your circuit or a fried chip. Try putting the PIC in a bread board alone and hook up the wires. See how it does. Also if you program it in circuit you should probably have a separate supply for the PIC. Just connect the ground wire from the programmer and not the VPP pin. That is what I usually do.

Justin
Back to top Go down
View user profile http://coilgunpower.com
DaveyPocket



Posts : 74
Join date : 2008-04-01

PostSubject: Breadboard failure.   Thu May 01, 2008 3:38 pm

When I tried the PICkit2 wired to the PIC on a breadboard, the PIC started getting hot and smelled bad. The PICkit2 started to overheat and smell bad also. The PIC16f627 is dead. Sad
Back to top Go down
View user profile
Admin
Admin
avatar

Posts : 115
Join date : 2008-03-26
Location : USA, California

PostSubject: Re: does PICkit2 work with PICflash from MikroE?   Thu May 01, 2008 10:03 pm

Yes that would mean it is dead. Very Happy Don't worry I have made may PIC smoke due to wrong voltages or wrong connections. Hopefully you did not kill your PICkit2. How long did you leave it like that with power?
Justin
Back to top Go down
View user profile http://coilgunpower.com
DaveyPocket



Posts : 74
Join date : 2008-04-01

PostSubject: Not long.   Fri May 02, 2008 8:24 pm

I left it in their for about 10 sec.

Basically, once I smelt it, I pulled the PICkit2 immediately.
But don't worry, the PICkit2 is working just fine. Tested it on a PIC from an old soldering kit I have.
I don't know what the smell was coming from inside the PICkit2, most likely voltage regulator or something. But I have had devices smoke, got hot, and smell bad, but they still work.
Back to top Go down
View user profile
Admin
Admin
avatar

Posts : 115
Join date : 2008-03-26
Location : USA, California

PostSubject: Re: does PICkit2 work with PICflash from MikroE?   Fri May 02, 2008 10:19 pm

You may of ruined the regulator (but I don't think there is a regulator because it powers the PIC with +5V and the USB supply is +5V, could be wrong). It may not give the full current rating now (that is what usually happens). Just power the PIC with external power and connect the grounds.

Justin
Back to top Go down
View user profile http://coilgunpower.com
DaveyPocket



Posts : 74
Join date : 2008-04-01

PostSubject: May be right   Fri May 02, 2008 10:32 pm

Though, i checked the voltage coming in from the PIC with the trouble shoot tool, it detects VDD and VPP. Might have just got hot.

Like my Apple IIe PSU, a capacitor in that thing exploded(I mean exploded, the side ripped open and some of its internals were expanding. It got hot, and started smoking.) But it still worked when I turned it back on after I panicked.
Back to top Go down
View user profile
Admin
Admin
avatar

Posts : 115
Join date : 2008-03-26
Location : USA, California

PostSubject: Re: does PICkit2 work with PICflash from MikroE?   Sat May 03, 2008 5:03 am

Yes, most regulators have some form of thermal shut down. It is probably fine.
Justin
Back to top Go down
View user profile http://coilgunpower.com
DaveyPocket



Posts : 74
Join date : 2008-04-01

PostSubject: Got samples.   Mon May 05, 2008 9:11 pm

Well, the samples just came in, I plugged up my PICkit2, and it seems to be working 100% fine. I tested the chip programming with the source code from your 3x3x3 RGB cube(since I hadn't programmed anything yet) connect 1 single RGB LED, and it works.

Very Happy
Back to top Go down
View user profile
Admin
Admin
avatar

Posts : 115
Join date : 2008-03-26
Location : USA, California

PostSubject: Re: does PICkit2 work with PICflash from MikroE?   Mon May 05, 2008 10:53 pm

Great! Smile Glad to hear you did not ruin it. I have the driver part of the new 3x3x3 code done if you want it. It is like the 4x4x4 where it uses an interrupt to keep the cube going. So your program does not have to. You can use something like
red[0]=50;
green[0]=0;
blue[0]=0;
to set the first LED to full red. Or
unsigned char ct=0;
for (ct=0;ct<27;++ct){
red[ct]=0;
green[ct]=0;
blue[ct]=0;
}
to clear the cube. Very useful.

Justin
Back to top Go down
View user profile http://coilgunpower.com
DaveyPocket



Posts : 74
Join date : 2008-04-01

PostSubject: No worky.   Wed May 07, 2008 9:36 pm

I wrote a simple program in MikroBASIC, exported the hex, imported into the PICkit2, wrote the hex, and nothing happens.

Code:

program cube_prototype

TRISA = 0
TRISB = 0
PORTA = %00000000
PORTB = %11111111
while true
PORTB= not PORTB
delay_ms(1000)
wend
end.

I'm not sure if this is right, I still need to learn MikroBASIC or MikroC, one of the two.
Back to top Go down
View user profile
Admin
Admin
avatar

Posts : 115
Join date : 2008-03-26
Location : USA, California

PostSubject: Re: does PICkit2 work with PICflash from MikroE?   Wed May 07, 2008 10:45 pm

You may need to check the fuses. They can sometimes make the thing not work. Also check the data sheet to see if an ADC of something needs to be turned off. I am not too familiar with basic (only used it with the basic stamp and that was PBASIC). If I were you I would learn C. It is not too hard to learn and allows for inline assembly and lower level work when needed.
Justin
Back to top Go down
View user profile http://coilgunpower.com
DaveyPocket



Posts : 74
Join date : 2008-04-01

PostSubject: Still doesn't work   Thu May 08, 2008 11:00 pm

I downloaded MikroC, I compiled some code, exported the hex, and it still doesn't work. Did you use MikroC on the source code for your 3x3x3, if so, how did you get it to work? Because I'm having serious trouble getting the thing to work, I didn't get it to work once with MikroC or MikroBASIC, I'm modifying the samples, it doesn't seem to do anything. I made some from scratch, still doesn't do anything. I need some help.
Back to top Go down
View user profile
DaveyPocket



Posts : 74
Join date : 2008-04-01

PostSubject: Nevermind.   Fri May 09, 2008 1:34 am

Please disregard the previous post, I had the clock setting on the chip set incorrectly. Had it set to 10 MHz, when my crystal is 4 MHz silent
Back to top Go down
View user profile
Admin
Admin
avatar

Posts : 115
Join date : 2008-03-26
Location : USA, California

PostSubject: Re: does PICkit2 work with PICflash from MikroE?   Fri May 09, 2008 2:28 am

Does it work? Yes I used MikroC. If you have it set to 10MHz then the only thing different should be the delays will be to long.
Justin
Back to top Go down
View user profile http://coilgunpower.com
DaveyPocket



Posts : 74
Join date : 2008-04-01

PostSubject: Works.   Fri May 09, 2008 7:22 pm

Yes it does work. I just needed to change some settings in the config. And yes, changing it to 10 MHz will make it go slower, but I also think I forgot to connect the PIC to the crystal when breadboarding. xD
Back to top Go down
View user profile
Admin
Admin
avatar

Posts : 115
Join date : 2008-03-26
Location : USA, California

PostSubject: Re: does PICkit2 work with PICflash from MikroE?   Fri May 09, 2008 10:18 pm

That would do it! With MikroC the only reason you need to tell it the speed is because using some of the built in functions like delay_ms are not real functions but they are generated by the compiler based on the speed. That is why you can not use variables with that, the delay is pre-determined for accuracy.
Justin
Back to top Go down
View user profile http://coilgunpower.com
Sponsored content




PostSubject: Re: does PICkit2 work with PICflash from MikroE?   

Back to top Go down
 
does PICkit2 work with PICflash from MikroE?
Back to top 
Page 1 of 1
 Similar topics
-
» Take a UFC fighter to work contest.
» Has Anyone Gotten Chrome Driver to Work with Windows 7?
» How do we run 10 cases out of 100 in TestNG frame work
» Does Keppra work?
» Typing in text on remote machine does not work, locally it does.

Permissions in this forum:You cannot reply to topics in this forum
Coilgun Power :: PIC Microcontrollers :: Programmers-
Jump to: