The MP3car.com Store The MP3car.com Blog    

Sponsored links

Go Back   MP3Car.com > Mp3Car Technical > Hardware Development

Reply
 
LinkBack Thread Tools Display Modes
Old 04-29-2005, 02:34 PM   #1
Maximum Bitrate
 
KyleYankan's Avatar
 
Join Date: Mar 2005
Posts: 491
Pic Programmer

Hello everyone. I thought I posted this but for some reason I can't find it!

I had a few questions about programming a PIC so I figure a new topic would be best in case anyone is searching for it.

OK, here's my questions:
I don't have alot of money. A homemade programmer is defintly the way to go, for a while with me. Can anyone recomend an easy to build circuit?

Here's a few random questions too:

What's an ICD2? What's EEPROM? Do I need either or? I beleive PICs have built in EEPROM, so why do some programming boards offer it?

What exactly is needed to program a PIC? I want to go the parallel port way, because my serial ports are being used.

One last question: How easy/hard is it to transfer serial data between a pic, and other hardware?
KyleYankan is offline   Reply With Quote
Advertisement
 
Advertisement
Sponsored links

Old 04-29-2005, 02:36 PM   #2
Maximum Bitrate
 
KyleYankan's Avatar
 
Join Date: Mar 2005
Posts: 491
Oh, and about the actual programming. I understand programming a pic can be done in C. I'm sufficient in C++. and own a copy of codewarrior. Do I have to compile my code in codewarrior, or does the program I use with the programming board handle it?
KyleYankan is offline   Reply With Quote
Old 04-29-2005, 03:54 PM   #3
Raw Wave
 
shotgunefx's Avatar
 
Join Date: Apr 2005
Location: Boston, MA
Posts: 1,799
Quote: Originally Posted by KyleYankan
Hello everyone. I thought I posted this but for some reason I can't find it!

I had a few questions about programming a PIC so I figure a new topic would be best in case anyone is searching for it.

OK, here's my questions:
I don't have alot of money. A homemade programmer is defintly the way to go, for a while with me. Can anyone recomend an easy to build circuit?

Here's a few random questions too:

What's an ICD2? What's EEPROM? Do I need either or? I beleive PICs have built in EEPROM, so why do some programming boards offer it?

What exactly is needed to program a PIC? I want to go the parallel port way, because my serial ports are being used.

One last question: How easy/hard is it to transfer serial data between a pic, and other hardware?


Ok. I'd just buy a PGC1 or PGC2. probably cheaper then making your own. $12-13 dollars + shipping. They work with most computers. Some have a cheap rs232 driver that doesn't provide actually 12 volt swings though so on some pcs it won't work. I own both and they work fine.

ICD2 is In-Circuit-Debugger. I haven't used it yet, but it gives you a real time look into the chip IIRC when running.

Pics don't have much eeprom, for instance most pic16x have 128 bytes! You'd normally use this for persistant info. Like volume/level or whatnot.

You need a c compiler that can target it. I think GCC does now, but I normally use Hi-Tech C when using C code. The free version works well but has some restrictions. If you want to use it, make sure you buy a PIC the free version targets.

Serial is pretty easy. I normally use a MAX232 but there are cheaper methods. I don't recall them, cause I never actually used them. If you can spare 20 bucks, get an Olimex proto board (18 or 40 pin). You get the board, PIC, MAX232 wired with caps, 4 or 20MHZ crystal and ICSP (In circuit serial programming header) and RS232 connector. All you need to do is plug it in and your almost done. You will need to wire RX/TX to the MAX232 though.

Hope this helps.
shotgunefx is offline   Reply With Quote
Old 04-29-2005, 05:21 PM   #4
Raw Wave
 
rando's Avatar
 
Join Date: Mar 2004
Location: Redondo Beach, CA
Posts: 1,969
For your first programmer, search for THVP (both in these forums and on google). It's a simple parallel port programmer supported by several different PIC programming packages. You can make this with parts found at radio shack for ~$10. The main limitation of this programmer is the software support -- basically you can only flash those chips supported by your software.

Once you've used the above circuit and are ready to move on to something that works with pretty much every recent PIC, search for ICD2 (again on google or on these forums). There are several plans around that will show you how to make your own. In addition to programming, the ICD2 will allow you to debug your code while it runs on an actual chip (i.e. in the target circuit) instead of just simulating it. You can build one of these for < $25 but you'll need to order some of the parts from digikey or elsewhere.

You can hook almost any PIC to your serial port. Some have dedicated hardware for this purpose and on others you'd have to implement the low level serial routines in code (lots of compilers come with libraries to do this). Either way you need some kind of level converting circuit to convert the TTL voltage levels of the PIC to RS232 compliant (or at least compatible) voltage levels. The MAX232 is a common IC that can do that.
__________________
2004 4runner

Last edited by rando; 04-29-2005 at 07:54 PM.
rando is offline   Reply With Quote
Old 04-29-2005, 05:49 PM   #5
FLAC
 
mauri's Avatar
 
Join Date: Jan 2004
Posts: 1,001
Sw free ,IC-PROG 1.05 ----> link
http://www.electronics-lab.com/downloads/mcu/005/

Hardware to program the pic free ----> link
http://www.pianetaradio.it/tecnica/programmatore.htm


Mauri
mauri is offline   Reply With Quote
Old 04-30-2005, 06:50 PM   #6
Low Bitrate
 
marshallh's Avatar
 
Join Date: Apr 2005
Location: Kansas
Posts: 70
Hi,
I have the Velleman K8048, which works pretty well for programming most types of common PICs. You can see more info here
http://velleman.be/common/product.Aspx?lan=1&id=350903

A good place to buy this is here
http://www.qkits.com
Although they are in Canada, they ship fast and I trust them more than some in the US.

Any more questions, let me know!
marshallh is offline   Reply With Quote
Old 05-02-2005, 01:01 AM   #7
Low Bitrate
 
Stonewall78's Avatar
 
Join Date: Dec 2003
Location: Calgary, AB
Posts: 99
I have the pic programmer from kitsrus.com (also sold as qkits) and it works pretty well and has regularly updated software.
Stonewall78 is offline   Reply With Quote
Old 05-02-2005, 01:04 AM   #8
Raw Wave
 
Join Date: May 2003
Posts: 2,021
Wow, I got exactly the same one, a velleman kits.

I used it alot until I built the ICD2 clone.
Chris31 is offline   Reply With Quote
Sponsored links
Advertisement
 
Advertisement
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
m1-atx pic blank kyrenia Power Supplies 1 04-04-2005 02:05 PM
OBD2 PIC code. racemier Engine Management, OBD-II, Engine Diagnostics, etc. 3 02-06-2005 01:10 PM
PIC programming how to MatrixPC General MP3Car Discussion 6 12-23-2003 03:13 PM
Using a PIC with Zehnder's LCDplugin - First Time Programing. Machs_FueL Software & Software Development 1 06-16-2002 04:12 AM
Can someone write me a PIC program 4 a awesome s/down controller please? gizmos General Hardware Discussion 3 07-17-2000 01:43 PM


All times are GMT -5. The time now is 04:25 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0
Copyright © 1999 - 2008 Mp3Car.com Inc.Ad Management by RedTyger
Message Board Statistics