Compiling code

Hello fella's

I know I am completely out of my league with this question but I have to ask anyway. Be gentle. :-)

I have built this clock because it is really cool! and it is completed up to the point of programming it. It uses 3 pic18f252 micro controllers.

1 controller is a master and 2 respond as slaves. I don't know how to do this. I think it would be like flash programming a bios which I have done twice. This source code needs to be compiled into what I think is hex and then sent into the micro controller. So is there anyone who does this as a side business? That is compile for a fee? I know I sound like a jerk. :-) But I want to have a success before committing more money to the project. It is a large blue led clock with gps sync.

Here is the link:

formatting link

Anyone do this?

Thank you

Mike Apache Junction, AZ

Reply to
Mike Burch
Loading thread data ...

Oi.

Write the guy, see if he'll send you hex files. It's a mystery to me why he hasn't included them. You have miles better chances of success if you have known good hex files than if you just have a code base that you need to build.

You used to be able to make a really cheap PIC programmer that would run off of a PC parallel port, but parallel ports (and Windows) aren't what they used to be. Microchip has some inexpensive eval boards that'll let you program a chip and test it on the board, then plug it into your project & give it a whirl.

Reply to
Tim Wescott

The schematic shows a programmer port on there, so you might not need an eval board to do the programming...may just be able to plug the cable in and program the code right into it...PIC should have a lot of different tools you can download for compiling and programming it yourself...I would look for a PIC developers site that is for beginners which should exists somewhere I'm guessing given the popularity of PICs. With the right compiler (which I'm guessing there is a free version of) and programmer (also should be a free one), you could do it yourself without much trouble I have to believe. I only know AVR's which is basically the equivalent, and it has all the above mentioned tools for free. And there is a lot of support on avrfreaks.com specifically for that, so I gotta believe someone could help you do this easily from a PIC equivalent site.

Reply to
andersod2

The cheapest way to get a PIC programmer is to get one of the paraller-port ones -- but that requires a compatible parallel port.

Eval boards have programmers built in, which is what motivated that suggestion. The ones you get from Microchip are very very nice, and cost lots of $$.

There's gotta be a usable, cheap USB/PIC programmer out there, though.

--
Tim Wescott
Wescott Design Services
 Click to see the full signature
Reply to
Tim Wescott

Its called the ICD2. Can debug or program PICs.

Reply to
RumpelStiltSkin

may be something here to suit you:

formatting link

Cheers Don...

--
Don McKenzie

Site Map:            http://www.dontronics.com/sitemap
 Click to see the full signature
Reply to
Don McKenzie

formatting link
is a good source for both cheap programmers and cheap eval boards/kits.

--
Grant
Reply to
Grant Edwards

Eh. Those are cheaper than I thought. Still not hobbyist cheap, but pretty darn close.

--
Tim Wescott
Wescott Design Services
 Click to see the full signature
Reply to
Tim Wescott

Check out

formatting link
and look at the PicKit II. I think it is about $35 USD. USB pic programmer for almost the entire range of pics. You can get MPLAB there as well which is the programming IDE.

Regards, Steve

Reply to
Stephen D. Barnes

The PicKit was what I was thinking of for the OP. Unfortunately that doesn't get him compiled code to load; the Microchip compiler is very nice but it defines hardware accesses differently than the CCS compiler does so it'll choke on code written for that compiler.

--
Tim Wescott
Wescott Design Services
 Click to see the full signature
Reply to
Tim Wescott

I'm not the guy to listen to, but I have to agree with Tim's original suggestion. This person obviously wants people to succeed in this project, so at the very least he would know of and be willing to suggest an appropriate programmer. He would also want to list it there in the project site, so you are probably doing him a favor by asking him the question.

I have an AVR-ISP board which is a simple parallel port to jtag programmer and is pretty cheap and works on my Win xp machine (it came with an eval board that was $35)...yes, there are sync issues that make it so it doesn't work perfectly every time, but the issues aren't a big deal...I gotta believe there is a PIC equivalent to that somewhere...

Reply to
andersod2

Thank you for all of your replies as they helped me a lot! The author of the project was kind enough to give me the hex files. He has been very gracious with me up to this point and I didn't want to annoy him or step on his toes plus I thought that if he had wanted it out there he would have posted it. But I asked him and he said ok. This guy is really ,really sharp! And I am out of my league but I'm going to make it work or else. Now I have to get the programs into the controllers. I have two files 1 master and 1 slave. Two boards get the slave version. If I do get an off the shelf programmer , is this module smart enough to take the hex file and send it where it needs to go or is there another program that does that? How long would the controller retain the programming without power applied? I have seen one state that it should last for

40 years. Is that correct?

Thanks again for your time

Mike Burch

Apache Junction, AZ

Reply to
Mike Burch

You'll need to run a program on a host that operates the programmer interface and uses it to program the contents of the hex file into the target.

Probably. Nobody knows for sure. Accellerated life testing (running devices at high temperatures) is used to estimate things like that. 40 years sounds reasonable.

--
Grant
Reply to
Grant Edwards

Grant,

Thank you for your reply and your input. Do you think this would be an acceptable programmer?

formatting link

Thank you

Mike Burch

Apache Junction, AZ

Reply to
Mike Burch

formatting link

Disregard. He is out of town.

Reply to
Mike Burch

My clock works! Thank you for all of your help. I wound up using the Microchip PICkit2 programmer and the software went in perfectly. Not nearly as difficult as I first imagined it would be.

Best wishes Mike Burch Apache Junction, AZ

Reply to
Mike Burch

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.