how do you compile to hex with microstudio and would you recommend i just use another power supply instead of the pickit 2? thanks again
how do you compile to hex with microstudio and would you recommend i just use another power supply instead of the pickit 2? thanks again
I ALWAYS recommend to use external power supply, just for safety sake.
Since I don't remember of any, I think I should do some step-by-step guide for beginners. 1 for Microcode studio, and one for MPLAB using PBPDemo.
Hows that sound?
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Hey Jason,
Firstly, I can't say wether MPLab is more or less capable than MCS. It's just the only one I know and use.
In order to compile in MCS I believe you only need to go to VIEW, COMPILE AND PROGRAM OPTIONS and tell MCS where to find PBP.
(Mine is just C:\pbp)
For Me I just use the compile button on the upper left of the mcs window (below NEW) I have not bothered to get "Compile Progarm" to work.
Below is a post I made in another thread that might help...
I use MicroCode Studio...
I just compile the program in MCS, then move over to the pickit2 window and do a "File", "Import Hex" and go to the directory where MCS put the .hex file and load it and "Write" to the PIC. Mine are under C:\Program Files\Mecanique\MCS.
Just open up MCS and Pickit2 and leave them open for the duration of your programming / editing session.
Once you locat the directory that MCS stores the .hex file, Pickit2 will find it the next time you compile. If you are testing the same program repeatedly you will find the .hex file you are working on, listed as a recent file, under the "File" drop down in the Pickit2 window. You can just double click on the existing link under the "File" menu and you are ready to "Write" to your PIC.
I have not bothered to figure out how to get MCS to automatically compile and burn.
Sometimes I will manually modify the PIC "fuses" in the Pickit2 window just before burning. I'm not that good at setting the "fuses" correctly in my program yet. (look below the "Help" drop down menu, in the Pickit2 window, and you will see a "Configuration" link which will allow you to change the "fuse" bits.
Hope this addresses your question
good luck
Dwight
Personally I think the PICkit2 is ideal to supply power for your test circut as long as you arent pulling too much current.
I can, literally, make a change to a program, compile, import to pickit and program a PIC to test the code in less than 15 seconds. I just leave the pickit window open along side of the MCS window.
NOTE: here is a GOTCHA to watch out for with the LPC demo board...
If you are trying to read the onboard POT into RA0 and send the results to a DEBUG window... there is a confilict as RA0 is also used for DEBUG... so what I did is to cut the trace from the POT to RA0 and put a loose wire instead. That way I can take the output from the POT to any of the PINS that I want to, not just RA0. (See the LPC schematic in its documentation. (this one drove me nuts for a while)
Hope you are making progress
Dwight
These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.
I get an illegal opcode error when I run that configuration command and the 16f690 device in microstudio dissapeared
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
the @ device pic16F690, intrc_osc_noclkout, BOD_OFF, PWRT_OFF, wdt_off, mclr_off,protect_off
command and the pic16F690 opcode error
Here is some info on how to set your configuration fuses. http://www.picbasic.co.uk/forum/cont...o-your-Program They are case sensitive, so changing them all to capitals will help. Here is one way to do it, if you wanted it in your code space.
You may notice that there is no mclr_off or protect_off options in the P16F690.INC in the MPLAB directory. That is causing some of the errors.Code:@ __CONFIG _INTRC_OSC_NOCLKOUT & _BOD_OFF & _PWRTE_OFF & _WDT_OFF & _MCLRE_OFF & _CP_OFF
thanks for your help, but now I am getting this error ERROR: Unable to execute mpasmwin.Error[118] C:\TEST.ASM 52 : Overwriting previous address contents (2007)
any ideas?
PICKit2 works great with MCS, you would start the pickit software and start MCS, set the PICKit2 to auto import the hex file named for your project, then each time you recompile in MCS it will automatically reload the hex and reprogram the PIC. I use those Demo boards sometimes and they work well within their limitations. I doubt the Demo version of PBP will allow you to do very much in the way of programming a pic unless you are very clever to optimize your code. BTW for the demo board use the PICKit2 power is adequate, it is short tolerant in that it will crash and protect your USB, at least it does mine. It allows you to select the PIC's operating voltage too.
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Bookmarks