| future |
Does anyone have a PIC programming howto/guide/course?
Post here please or send by email. |
|
|
| jackinnj |
on their website.
Personally I use PicBasic Pro with some occasional assembly language every once in a while. |
|
|
| Rarkov |
sorry, but you can't beat the free JAL. based on Pascal and stupidly easy...I never touch ASM but you can if you want to, it can be embeded into JAL.
Have a look...+ with one of the BEST mailing lists, it's the place to start with PICS.
Gaz |
|
|
| peranders |
| quote: | Originally posted by mhennessy
If you're a complete beginner, there's some stuff on my homepage that will help you get started. | Nice looking preamp! |
|
|
| till |
there is a very good but german tutorial at http://www.sprut.de/electronic/pic/index.htm
on the net.
there are some usefull examples like voltmeter, counter etc. sample programs and circuit. You could try to translate what you donīt understand with google or email me with questions., i know the site very well now. |
|
|
| mhennessy |
| quote: | Originally posted by peranders
Nice looking preamp! | Thanks! But it's not as nice as some of your stuff. Do you get your PCB's professionally manufactured?
Your headphone amplifiers make mine (1 op-amp plus 2 transistors) look a bit silly ;) |
|
|
| davesaudio |
the al williams tutorial is nice
wouter has a good intro on his site via the JAL link above
the JAL list is a yahoo group-took me a while to find it |
|
|
| GUILHERME |
The MicroChip site (www.microchip.com) is loaded with useful info and software. You'll find a free assembler/debugger (MPLAB), the schematic of a programmer that connects to the pc parallel port, a bootloader for pics having a UART, and so on...
And of course, reference manual of each pic model.
BTW, I've written an utility that takes a .hex file and programs a pic using the parallel port programmer from an application note as described above. It uses the routines of the AN but can work on NT/2000/XP machines (which the original routines can't because they use biosprint).
If you or anyone else wants it, I can try to put it in a package and post it here for download (I'll have to check dll dependencies first).
best,
Guilherme. |
|
|
| Elkaid |
You could also take a look at this book
http://www.amazon.com/exec/obidos/t...=books&n=507846
It's all you need about PIC... A lot of example projects, how to interface with various components such as relays, polariod sonar transducer, keypad, lcd etc... This book is a must. Yeah, you can find everything free on the net but everything you'll ever need is included in this book.
The best of all is that the book comes with a PIC programmer PCB :)
Regards, |
|
|
| audioPT |
;) ;) ;)
Don't forget to ask for samples at Microchip!!
I've received today more samples, and I'm learning PIC programming!
Tha links above have a lot of useful information. I've learned a lot!
Mark Hennessy, how about sharing with us the code of your pic? I've here 3 samples of the 16F877 :cool: and some PGA's!
Pedro Martins |
|
|
| till |
| quote: | | Mark Hennessy, how about sharing with us the code of your pic? I've here 3 samples of the 16F877 and some PGA's! |
He allready promised to to put something on his homepage, iīm waiting for this too. |
|
|
| till |
| Pedro , do you plan to use a rotary encoder for volume controll with MC/PGA? |
|
|
| audioPT |
Yes!
It's going to control the volume and other setup adjustements.
But first, I'm gathering information on PIC's to make that possible.
It's a promise that I WILL put all here, and in my home page too :cool:
Pedro Martins |
|
|
| Elkaid |
I made an input selector in the past using a PIC16F84.
Selection was made using a 2-bits encoder and the PIC was connected to a '2803 which is driving the input relays.
You can also see that I added a 45sec delay before enabling any input (to let my preamp tube to warm up...). A bicolor led is blinking red/green during warmup delay and turns green when delay is passed.
There's no volume control yet but you can easily add a remote control decoder chip and drive a motorized potentiometer with 2803's output remaining. (Or even easier : simply add a digital potentiometer)
I hope this helps :) |
|
|
| Elkaid |
| Sorry, I forgot the attachment |
|
|
| future |
| I already got a lot of info about pics, and now what programmer/software should I use? |
|
|
| Elkaid |
There's a lot of PIC programmer schematics on the Internet.
Here's my recommandations :
Solution A
If you're really serious about PICs and you plan to use several models of PIC microcontroller, you can buy a Picstart Plus development programmer. Even if it is cheap for a programmer that support almost every PIC (except 18FXXX), it is supported by the free Microchip development environment MPLAB and you don't have to build it yourself. But maybe you're not ready to spend 250$ so there's alternative "B"
Solution B
If you plan to use mostly 16F877 microcontroller (and all midrange PIC microcontroller supporting ICD - In Circuit Debugging), you can go for MPLAB ICD. It is an In-circuit emulator that allows programming too. Very handy when you need to debug an application. Best of all, it is much cheaper than Pictstart Plus (around 170$ for the complete kit). This one is also fully supported by MPLAB. You can trace in your code etc... very handy. (Note that there's also the MPLAB ICD2 which supports PIC18FXXX at the same price as the normal ICD)
Solution C
If you wish to get the equivalent of a Picstart Plus programmer, you can look for the PicAll programmer. You need to build it yourself which means that it is much cheaper solution.
http://www.picallw.com/hardware.htm
Very Interesting solution... It even supports Atmel's AVR. However, you can't use it through MPLAB environment. You have to compile your hex file and then use an another application to program your chip.
Solution D
The final solution that I'm recommending is to buy this book : http://www.amazon.com/exec/obidos/t...=books&n=507846
As I said previously in this thread, this is the ultimate ressource for PIC programming, from code examples, programming algorythm, hardware interfacing, etc.... This book is a must, and it comes with a printed circuit board to build your own programmer. This is the best way to begin in the world of PIC.
Solution "Crazy" about programming
I don't recommend this solution as it is by far the most expensive but you can go for an universal programmer. The programmer supports almost programmable ICs but they're a bit hard for a hobbyist to afford those. (Galep 4 shown on the picture)
On the software side, you should stick to MPLAB development environment as it support many external compiler. MPLAB has an internal ASM compiler but if you wish to program in C language, take a look at Hitech C compiler. http://www.htsoft.com
I hope this helps ! |
|
|
| Matttcattt |
| quote: | Originally posted by audioPT
;) ;) ;)
Don't forget to ask for samples at Microchip!!
I've received today more samples, and I'm learning PIC programming!
Tha links above have a lot of useful information. I've learned a lot!
Mark Hennessy, how about sharing with us the code of your pic? I've here 3 samples of the 16F877 :cool: and some PGA's!
Pedro Martins |
samples? from microchip? (runs to website and orders some) and ive been buying them all this time? |
|
|
| Elkaid |
Yeah, I got surprised too...
However, Microchip aren't offering samples since a long time.
(The fact that Atmel's AVR microcontroller market's share increasing quickly with time is probably one of the reason motivating Microchip sample program...)
I'm very impatient to try my hand on DSPic but it seems that they're not available yet... Microchip are announcing them for several months and still nothing.. :( |
|
|
| till |
they say dsPIC in late 2003... but you may even take a look on MSP430 from TI, samples, very cheap programmers, and more power than PIC.
For the PIC programmer i would try one of these very cheap improved tait programmer around the web. |
|
|
| future |
| I cant get any samples because they dont deliver to Brazil :bawling: :bawling: |
|
|
| future |
Ok I think I will mostly use 16F84 and 16F877... I found this programmer called JDM, it's easy to build and can program
these two PIC's.
I joined two schematics in one picture to make things easier. They are the same, but I can't think a way to join them in one to build the circuit in a prototype board, with two rows of sockets 40 and 18 pins, one inside other so I dont have to use adapters.
Does anyone can help me? |
|
|
| future |
| Sorry, this is the right picture. |
|
|
| mhennessy |
| quote: | Originally posted by future
Ok I think I will mostly use 16F84 and 16F877... I found this programmer called JDM, it's easy to build and can program
these two PIC's.
I joined two schematics in one picture to make things easier. They are the same, but I can't think a way to join them in one to build the circuit in a prototype board, with two rows of sockets 40 and 18 pins, one inside other so I dont have to use adapters.
Does anyone can help me? |
It's easier that you think - to programme a PIC, you just need to connect GND, +5V, RB6, RB7 and /MCLR
Build one programmer circuit, and connect these 5 signals to the appropriate pins on the 18 and 40 pin sockets.
An important hint here: While this isn't so bad with the smaller 16F84, you'll soon get really fed up with removing the 16F877 from your circuit, inserting it in your programmer, then replacing it in the circuit. You'll probably bend pins or wear your socket out. So, consider making an adaptor lead like I did. You just need to put a 4 or 5 pin Molex connector on your board, then plug it in to your test system when you want to programme the PIC...
The other end of the adaptor lead is soldered onto an IC socket that fits into my programmer. Easy!

This adaptor lead doesn't bother with +5V - the 16F877 gets its power from the rest of the system... The cable is just a standard internal CD-ROM audio lead, complete with neat heatshrinking and 4-way connector - recycling rules ;) |
|
|
| jackinnj |
I find a ZIP socket is helpful for programming -- this is what Microchip uses on the little programmer PICStart Plus -- also, if you are going to do a lot of prototyping it's a good idea to use a carrier for the PIC -- as the pins will bend and break after a while -- you can use a "machined" socket for this. You can also mount an SMT PIC or AVR on an adapter board -- sometimes the SMT versions are dirt cheap.
of course, one of the reasons folks use STAMPS and BX24's is that you can program these devices on the fly. |
|
|
| future |
| What I donīt understand is why the original JDM design uses almost all pins of the 16F84 if only 4 pins are needed. |
|
|
| till |
future, before you build this one, please use a DMM and check the voltages at the PCīs serial port. It may work with 16F8xx in case voltage from PC is high enough, but cause problems with 16F84 type. The voltage from PCs serial port spreads very wide, and if it is not enough PIC will not go in programming mode. Programmers with external powers supply will be safer.
this diagramm shows required programming voltage :
http://www.sprut.de/electronic/pic/brenner/vpp.htm
this works with different external power supplys an parallel port
http://www.sprut.de/electronic/pic/...er5/br5_sch.gif
and this i would like to build, but PCB is not so easy to make. If you want to make it i can send you the requred Pic, (i īm strongly interested in making a PCB for me):
http://www.piclist.com/images/com/m...free_icd_en.htm |
|
|
| janneman |
... and then there's www.piclist.com where I learned my PIC tricks.
Jan Didden |
|
|
| Elkaid |
Using ZIF sockets is a nice idea but you'll need one on your programmer and one in your target board (your prototype).
40 pins ZIF sockets aren't cheap.
Using ICSP (In-Circuit-Serial-Programming), you only need those pins : GND, +5V, RB6, RB7 and /MCLR. This way, you don't need to remove and insert your chip all the time.
As you probably know, Microchip ICD schematics are available on their website so why not use them ?
i found on the following site a complete ICD projet with PCB, instructions etc... You don't want to miss that link.
Here's the original version of the previous link with color pictures
http://membres.lycos.fr/silicium31/...IC/free_icd.htm
Take a look, you won't be disapointed.
Regards, |
|
|
| davesaudio |
been surfing:
it seem like there is a hundred variants of each parallel port/serial port PIC programmer out there.
I suspect people could not understand each others diode-cap-zener combos to create the required +5 and +12
most seem to be PC port dependant
the real RS232 spec on a serial port is huge 3-25v, thus the variants
If you have a desktop PC keep in mind these voltages ara available on a HD connector. I am leaning towards designs with an external (HD?) power - seems much more reliable.
low voltage programming looks like you give up a pin, which seems restrictive to me
if I was going to buy one the picflash USB or clone seems to have a future
if i was building for simplicity - the ludipipo w external supply is like 3 resistors. period.
ludipipo and jdm and jmb and c84 all seem to use the same rs232 pin assignments.
ic prog seems like a strong programmer supports most hardware , lets you tweak
comments?
edit-I see lots of complaints about the el-cheapo (predko), cuz there are so many or the architecture? |
|
|
| future |
| Mine is -11.15v on pin 7 |
|
|
| davesaudio |
check the microchip site for free seminars
grumpy cuz I didn't win the free usb programmer :bawling: |
|
|
|