PDA

View Full Version : How to go forward?



TheMadMan
- 2nd October 2007, 20:45
Hi all
Mnemonics are as clear as mud to me, C is in the same class so I want to go with PICBasic.
Have a very limited (3rd world) budget so I have to be carefull.
Any suggestions for a GUI that will <B>WORK</B>, is easy to set up and will talk to a PICKit 1 board and is preferably freeware?
I do a lot of programming (VB6, ASP, PHP, MySQL etc) and I want to start controlling things outside the computer. (Today a machine, tomorrow the world! ;>) and I've sussed out that the easyest way would be to use a PIC as an intermediate communications device.
I've also realised that by using one of the bigger (40 pin) PICs, I may not need the computer at all. I see learning to read from a memory stick in my future somewhere.

Anyway, must get the programming GUI, compilation software and program flash app and hardware working first so if there is anyone available to mentor me thru this rather daunting process, I'd like to hear from you.

Thanks for reading this post.

All the best

mister_e
- 2nd October 2007, 21:00
mmm the only one i know is MPLAB directly from microchip. But PICKIT 1 should have it's own software as Pickit 2 have. If so, i would suggest MicroCode Studio. There's a free version available and it's really easy to work with.

Now, which PICBasic compiler.... there's a few different type. Here we use Melabs PicBasic or Melabs PicBasic Pro. To be honnest... use the Pro version. Yeah there's a price difference but it really worth it.

You could still try the demo version available on their website.

MicroCode Studio (code editor, IDE, serial communication windows and 1 free ICD model) :
http://www.mecanique.co.uk/code-studio/index.html

PicBasicPro Demo
http://melabs.com/pbpdemo.htm

mackrackit
- 2nd October 2007, 21:25
The software that comes with PICKIT 1 only imports or exports a pre compiled hex file. So you will need MPLAB, but remember the PICKIT 1 will only work for a few chips (8 and 14 pins) so you may want to look at the PICKIT 2.

Here is a link to instructions to set PIC BASIC up with MPLAB.
http://www.melabs.com/support/mplab.htm

I agree with mister_e, get the PRO version of PIC BASIC if you can.

Archangel
- 3rd October 2007, 03:44
Hello TheMadMan,
Cheap JDM programmers available on eBay, just search for JDM programmer, I saw one with a start bid of 99 cents US, that is all I have ever used, works great using I C Prog 1.05D available free on the web. Write some small programs, compile with demo PBP until you get a feel for what you want to do.

TheMadMan
- 3rd October 2007, 19:18
Hi All
Thanks for the feedback!

<b><u>MicroCode Studio</u></b>
Downloaded and installed it and played around a bit. Seems a bit buggy in that gives strange errors.
&lt;Code&gt;<font color=blue><b>
x var byte
x = 1
SELECT CASE x
CASE 1
y = 10
CASE 2, 3
y = 20
CASE IS > 5
y = 100
CASE ELSE
y = 0
END SELECT
</b></font>&lt;/Code&gt;

Errors on the "SELECT CASE x" line.
Copied and pasted straight out of the manual document.

Also, does not give many of the most popular chips.
List of chips available from the dropdown list is
<font color=blue><b>
12C671, 12C672, 12CE673, 12CE674
14000, 14C000
16C554, 16C558
16C61, 16C62, 16C620, 16C620A, 16C621, 16C621A, 16C622, 16C622A, 16C62A, 16C62B, 16C63, 16C63A, 16C64, 16C642, 16C64A, 16C65, 16C65A, 16C65B, 16C66, 16C662, 16C67
16C71, 16C710, 16C711, 16C712, 16C715, 16C716, 16C717, 16C72, 16C72A, 16C73, 16C73A, 16C73B, 16C74, 16C74A, 16C74B, 16C76, 16C77, 16C770, 16C771, 16C773, 16C774
16C84
16C923, 16C924
16CE623, 16CE624, 16CE625
16F627, 16F628
16F73, 16F74, 16F76, 16F77
16F83, 16F84, 16F84A, 16F870, 16F871, 16F872, 16F873, 16F874, 16F876, 16F877
17C42A, 17C43, 17C44
17C752, 17C756, 17C756A, 17C762, 17C766
18C242, 18C252
18C442, 18C452
18C658, 18C858
PS1, PS1_2K, PS2, PS2_2K, PS3, PS3_2K, PS4, PS4_2K</b></font>

Maybe it was a faulty install or something, has anyone else had similar problems?


... but remember the PICKIT 1 will only work for a few chips (8 and 14 pins)

I've heard that if you make up a 14 pin to 40 pin adapter board you can use the PICKit 1 to burn the 40 pin range. Is this true? If so, does anyone have the pin connections?


Cheap JDM programmers available on eBay, just search for JDM programmer, I saw one with a start bid of 99 cents US, ...
Looks like a nice unit - fancy chip holder - US$49.00 + postage is a bit steep when you are not in America and not earning US$.
Found the circuit for the JDM Programmer (evidently done by Ludipino) at http://www.geocities.com/CapeCanaveral/7706/ludipipo.zip . Very low component count. 1 zener, 1 diode, 1 cap, 4 resistors, serial plug and ic socket. See it uses the fancy one - maybe thats the big price item.
There is a warning that it doesnt like laptops and must be plugged directly into the com port.

Found his site at http://www.jdm.homepage.dk/newpic.htm

Question: looks like the programmer puts the incoming signal into pins 12 and 13. If I use these pins as input/output in my app/board, wont the signals be "programmed" into the PIC?


works great using I C Prog 1.05D available free on the web.
Site at http://www.ic-prog.com - now at version 1.05F.
(All that raw machine code is frightening!)




...compile with demo PBP until you get a feel for what you want to do.

Just how "cut down" is the demo compiler version?
I do have access to a legal installation of PBP.

Thanks to all for the feedback so far. I'm certain I will have many more "idiotic" questions but I'll keep them for later.

All the best

Bruce
- 3rd October 2007, 20:27
Where is Y declared?



x var byte
y var byte
x = 1
y = 0
SELECT CASE x
CASE 1
y = 10
CASE 2, 3
y = 20
CASE IS > 5
y = 100
CASE ELSE
y = 0
END SELECT
Does this compile without errors?

mister_e
- 3rd October 2007, 20:49
PICKIT 1 is a ICSP programmer (In Circuit Serial Programming), it only use the PIC dedicated pin to program them. In each and every datasheet you'll find the information. Those you'll need

MCLR/Vpp
Vss
PGD
PGC

Refer to PicKit 1 manual
http://ww1.microchip.com/downloads/en/DeviceDoc/40051D.pdf

page 41.

As long your device is in the Pickit 1 list, you should be able to program it. Now, how's the support now for this one since Pickit 2 is on the market? i don't know.

TheMadMan
- 4th October 2007, 04:07
Where is Y declared?
OOPS!!!
Red Face Moment.
Bit pressed for time right now (5:06am local). Will give it a try.
Thanks.

TheMadMan
- 4th October 2007, 04:33
MCLR/Vpp
Vss
PGD
PGC

Handy information


As long your device is in the Pickit 1 list, you should be able to program it. Now, how's the support now for this one since Pickit 2 is on the market? i don't know.
Dont think the 16pin and larger will be there.
Seems like using the PICKit 1 for anything bigger than 14 pins (and older generation types) is a non-starter.

I'll have a look for a generic ICSP board circuit and make up the necessary adapters as I go.
Maybe take the the "Ludipino JDM Programmer" circuit, make the necessary mods and build one for each pin configuration as I need it. There cant be <B>THAT</B> many variations can there.

Dont think that Microchip are idiots. All chips in each pin-count range probably have PGD and
PGC placed on the same pin.

Having said that, I'll probably choose the chip that is the exception to the rule at some time or another and make some smoke.

Thanks for the input mister_e.

All the best.

PS. Like the play on your name on your home page. ;>)

TheMadMan
- 4th October 2007, 04:56
Dont think that Microchip are idiots. All chips in each pin-count range probably have PGD and PGC placed on the same pin.
I see that Microchip dont make any reference to the programing pins in pin reference drawing at the top of the document.
You have to dig for it further down in the detailed list of each pin's functions.
If (like me) you dont really know what you are looking for, you may miss it (as I did).
Oh Well, live and learn.

TheMadMan
- 4th October 2007, 20:56
Hi all
A very kind soul made my day!!!!
He <B>GAVE</B> me a serial in circuit programmer. <B>FREE</B>.
Has a serial connecter and the output is a 6 wire telephone plug which takes the signal to any one of a number (3 at the moment) of small boards, an 8 pin, a 14/16/18 pin and a 40 pin unit. All I have to do is populate the boards with an ic holder and a bunch of header pins and make up cables appropriate to each.
The 40 pin unit is actually a full on project board, own voltage regulator, crystal, reset button, power led and <B>ALL</B> the ports are taken to header pins via a current limiting resistors. Theres even place for screw type connectors if needed. Very neat even if I say so myself!

All I have to do now is re-create the boards on Eagle so that I can make up some more as and when I need them.

Talking about Eagle takes me to my "electronics" computer. I've loaded so many gui's, compilers and all sorts of other things lately looking for a comination that will work for me, I think I've given the thing a nervous breakdown. So, guess who will be nuking a hard drive and getting a fresh Win2KPro installation done Friday nite.

It goes without saying that PICBasic Pro will be in there somewhere, the question is "What Else Is Needed?"

<B><U>MicroCode Studio : Cost 150 UK Pounds (ZAR 2250 approx) </U></B> Cant get the "Case" statement to work properly. If there is a bug in the demo, who's to say its not present in the (costly) purchased installation.

<B><U> MPLAB : Cost FREE </U></B> Seeing as it is the one that Microchip themselves have put out and is free, this seems like the most promising option. The PICBasicPro site also has what seems like a pretty good instruction sheet on how to get PBP integrated into MPLAB. There also seems to be a whole bunch of training/tutorial stuff (hav'nt checked it out yet!)

<B><U>I C Prog : Cost FREE </U></B> Seems to be aimed at the people who are into very low level programing. Way beyond where I am at the moment - maybe in the future if I really become "geeky" about the whole thing.

So! Once I've done the box re-install, download the latest stable MPLAB and get it working with PBP. I have a PIC12 around somewhere so we'll try flashing a LED. I think that would be the "Hello World" type program to start with.

To all the people who gave advice and comment, a big thanks. Really appreciated it.

All the best

mister_e
- 5th October 2007, 03:32
mm MicroCode Studio is not as this expensive, ~30 pounds
http://www.mecanique.co.uk/code-studio/index.html

There's a free version available too. Basically MicroCode Studio Plus just add the Bootloader firmwares and ICD capability that The free version don't have. So you can buy it later without any problem

PBP demo is available bellow
http://www.melabs.com/pbpdemo.htm

Hey.. this install MicroCode studio as well... woohoo. Ok a bit limited in the PIC model and code size, but it's free and this be more than enough to start to play with.

Full version is listed @ 249.95 USD on Melabs Website, you might look at their distributor list
http://www.melabs.com/purchase.htm#Distributors

MPLAB or MicroCodeStudio? well, for me MicroCode Studio do all i need for now, but in some occasion i may use some MPLAB features. I find easier to surf in my code using MicroCode than with MPLAB, but it's me...

Short history PBP is the compiler, while MicroCode and MPLAB are the code editor + some freebies here and there.

Happy coding.