If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.
It looks like I used MPLAB 8.x. There is a new MPLAB-X but I've found it to be a bit buggy. Still, it may work fine.
I used the MPLAB XC8 compiler. There is an older HI-TECH C compiler that I thought also works but maybe not. Apparently Microchip did a major overhaul in their naming conventions to get all their micros looking more the same in terms of coding. So it may be critical to use XC8. And if you go to Microchip's main compiler page, you won't find XC8; you have to dig a bit for it. Easy links to free downloads are below.
I don't grow ambitions to become (not now in these ages) PIC programmer or something, yet sometimes is useful to learn few easier tips and do some simpler things on your own.
I know i can ask Carl to send me compiled .hex files for projects and that's it, but there is no joy in that!
So i tried by myself to obtain conditions and install all what's necessary in my PC to be able to compile code by my own.
It's been a while ... 9-10 years ever since i did such thing.
In "my times" we had simple Mpasmwin, easy to dig out and use.
Looking in similar software now days; i see lot of has changed! Scary!
So logically i looked for MPLAB.
On their pages (MICROCHIP) there are all the installations, but you have to be indeed very skilled to find proper ones and mange to install them.
So i installed somehow MPLAB and thought "that's all!"
DANG!
Than i looked up for HI TECH blah blah blah... whatever that may be!? (OK i know it is "compiler")
I also got problems to find installation and run it.
DANG!
Must be licenced!
Than i searched some "free" solution on the net.
There are dozen "free" packs on Filecrop and similar servers.
Beware! Half of those packs are including "crack" with trojans and worms!
Finally i founded one pack with "clean" crack.
Than i installed damn HI TECH C compiler.
Guess i am getting too old, because after installation i don't see executive nor it's icon.
After hour of scratching my head i realized that damn HI TECH is not stand alone packet but rather a "plugin" for MPLAB!
Ok, after several attempts i managed somehow to find it in MPLAB and activate it.
Than i tried to compile code for 12f1840 from the book.
DANG!
Dozen mistakes and warnings!
Than i consulted Carl.
He gave me more proper suggestion and link.
I got there, than i downloaded XC 8 ... whatever that may be?
My system warned me that i download and install "risky" and "unknown" software! Ahahahahahaha!
Ok, installed.
Looking for it's executive, nope!
No icons, no exe.
Aha! I seeeee! It is also plugin for MPLAB!
Ok, go to MPLAB and run it again!
Again tortures to find it here and activate it!
Dozen unnecessary things to do to achieve that. ( oh God, modern software programmers are imbeciles and idiots, so obvious!)
Ok, activated in MPLAB!
Again starting "new project...blah..blah...blahh" (btw who gives a sheet about project!!! i just want to compile simple code mannn!)
Ok, dozen idiotic things done to reach the point to start "build"-ing! (compiling is strange word for them , i guess?)
Ok... what i got is blank white space in MPLAB working area!?!!?
Ok... i act as i don't see that.
Hit build option!
It is "working" something!
Than new window opened and i am watching in.... again same bedlam of errors and warnings!
Dang!
Ok... now i am pis$ed off much and i give up!
Starting to uninstall everything i installed in last couple hours!
It took 45 minutes (and several chocks and freezes in my system) for me to get rid of damn MPLAB and all the $hit that came with!
Actually, MPLAB behaves like virus when you are trying to uninstall it!
I was small step away from deciding to kill whole system and install fresh XP installation again!
Oh man what a torture! Oh man what a Sodom!
...
Ok that was my latest experience.
Now... i am asking anybody of you to be kind and explain here step by step what and how to download, setup and install on PC to be able to compile simple PIC code?
Step by step, with explanations what is what and what is needed and what is not needed.
Target PIC is 12f1840.
7-8 years ago when i was dealing with 12c508/9, 16c84 and similar; compiling code was most trivial and easiest task it can be!
And usually it took me 20 seconds to do such task!
Now days... what the hell is this with this new software and new PIC's!!?!?!?
...
I am not asking this for my self only. Not at all.
Personally i don't give a damn, i can wait and ask later anybody to send me compiled .hex.
But i am asking this because of the huge majority of members who will most certainly experience same torture as i did.
To prevent that, now is good moment someone skilled to explain step by step all the compiling procedure and needed software.
...
Many thanks in advance!
Cheers!
The Hex files are now posted in the ITMD support section.
Did you set "select device" to the right chip?
Thanks much for HEX's!
But there is no joy in fact that job is done by somebody else.
I was interested to compile them on my own and by doing that to learn something.
But after last night experience i see i can't do that so easy.
Anyway thanks!
It wouldn't be me if i was not such persistent and hard headed!
So up from this morning i am trying again!
And seems i succeed something! Wow!
I think i founded wining combination.
It is here: http://www.microchip.com/pagehandler...abx/#downloads
So, after downloading and installingMPLAB® X IDE v1.41 and MPLAB® XC8Compiler v1.10 i tried again to compile the code.
It is complicated as much as it can be.
Yet, with a patience, trying this and that; finally i stumped through different adjustments and options and did something.
I did most simple way i could; open a new project, adjusted all necessary options i had to and hit "build"!
So it did!
No errors, no warnings!
Finally i got HEX file.
Comparing to Carl's HEX i got somewhat smaller file and right now i am not sure whether is about optimization or i made some mistake again.
I guess i will have to wait to obtain PIC, program it with one HEX, check, than program it with second HEX and check again.
If both HEX files works than difference in sizes is only because of the optimization methods.
Well... at least i got somewhere!
Last Saturday the 12F1840 arrived (thanksVoti’s fast shipment..) so today..testing’s day.
No problems with the hex file getting in the Microchip, used a Chinese Pic 3.. and MPLAB .
From the small pcb’s went 4 on a Euro card so it is really a small pcb.
First impression:
Sensitivity depends much on the connected coil , but for such a small circuit the sensitivity is not bad. For power I used 8 x 1.2 volt cells .. so total 9.6 volts.
The current the PI-2 take’s was much coildependent, variable from 80 mA – 130mA .
For Power FET I used the IRF9640 and for‘switching’ fet I used the BF245b (different pin layout)
The zip file has the Sprint Layout file etc. .... if someone finds errors or improvements.. let us know !
Best regards.
Ap
Comment