Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

how to program a pic micro controller

Status
Not open for further replies.

welove8051

Full Member level 6
Joined
Jul 16, 2009
Messages
357
Helped
51
Reputation
102
Reaction score
41
Trophy points
1,308
Location
india
Activity points
3,277
dear friends till date i have worked only with 8051 and some on avr.i like to know how the progamming of pic controller is done. for example to program 89s51 using isp we require mosi, miso, sck & reset pins and waveform and algorithm is clearly provided in the datasheets. what about the pic controllers, what are the different type of programmers, how they work and what are the pins used for programming. i have serial and usb programmers but doesnt no how to operate them.

what are basic settings to be done in the software winpic to program a pic micro ocntroller.
for a newbie which pic ic has to be used to learn programming.

thank you

regards
kj
 

Hi,
For PIC, people usually start with 16F84A, which has only a TMR0 module and no ADC/Comparator/SPI/UART module, but is used only to start off with PICs. Then you can move to 16F877A or better yet, 18F series and then to PIC24F.
Just out of curiosity, why are you deciding to come to PIC from 8051. Atmel has ATmega series of microcontrollers, which, when programming, I found much better than PICs. And if you already know 8051, it's going to be very easy to program ATmegas. Moreover, they're very cheap.
 

hi, the avr series in most of the cases just opposite to 8051. i use assembly language for programming. i see avr is some what complicted. i thing pic his having more features and different types than avr, so i thought of learning pic.

regards
kj
 

Hi,
I've used PIC12,16,18,24 for almost everything I've done and dsPIC33F GS series for SMPS. And then recently I made the switch to ATmega. I've found these much more versatile than the PICs and believe it or not, the less number of microcontrollers to choose from(in the range of tens) was actually more helpful to me as PIC had over 250 microcontrollers.
I use the ATtiny45, ATmega88 and ATmega8535 and I've replaced PICs in all my designs with these.
Anyway, choice is upto you. If you're learning PIC, start off with 16F84A, then goto 16F877A, then 18F458 or something equivalent and if you wish to 24F series.
Just a note, I use mikroBASIC and not assembly. I don't have any idea of 8051 or AVR assembly, although I've done 16F and 18F in assembly.
Tahmid.
 

Hi,

Yes start with a simple PIC like the 16F84. You'll require a simple programmer, a compiler and ICprog for burning the device.

Icprog is free however compilers are not.
 

thanks guys. but i want know how what is the programming algorithm or logic for pic ic's

regards
kj
 

Hi,
Take a look at this:
https://www.oshonsoft.com/picprog.html
picproghard.png


Added after 1 minutes:

If you're using the parallel port to program PIC, Oshonsoft programmer is the best that I've used so far. But if you plan to stick with PICs all the way, you may consider a PICKit2 or maybe a PICKit3.
 

By using picbasic compiler you can compiler you code writen in BASIC langage and PiC C Compiler for a C code. If you know assembly use MPLab (a free tool).
 

Tahmid said:
Hi,
For PIC, people usually start with 16F84A, which has only a TMR0 module and no ADC/Comparator/SPI/UART module, but is used only to start off with PICs. Then you can move to 16F877A or better yet, 18F series and then to PIC24F.
Just out of curiosity, why are you deciding to come to PIC from 8051. Atmel has ATmega series of microcontrollers, which, when programming, I found much better than PICs. And if you already know 8051, it's going to be very easy to program ATmegas. Moreover, they're very cheap.
IMHO 16F64(A), nowadays should be omitted by the beginners. It is an 'archaic' uC that Microchip resumed to produce for a reason that I can not understand. Some decent, and more powerful 18F's are in the same price range or just a couple of cents more expensive, have more than one counter, CCP, ...

So the 16F84(A) should not even be a uC to start. Very soon a new guy will be limited with it's (lack of) resources.
 

Hi zasto,
16F84A is always best to start off with in the PIC series, not because of price, but for the lack of peripherals. Since it only has a TMR0, it should be used to understand the basics of assembly programming and PIC architecture.
Once done with this, then you can go to 18F to learn additional peripherals such as ADC, comparator and 16-bit timers and so on.
Tahmid.
 

hi, i thing the problem with avr is that its fuse settings. it is so complicated that any body will wrongly fuse 1 or 2 controllers while learning avr. i thing pic doesnt have this kind of fuse setting problem. am i right friends?

regards
kj
 

Tahmid said:
Hi zasto,
16F84A is always best to start off with in the PIC series, not because of price, but for the lack of peripherals. Since it only has a TMR0, it should be used to understand the basics of assembly programming and PIC architecture.
Once done with this, then you can go to 18F to learn additional peripherals such as ADC, comparator and 16-bit timers and so on.
Tahmid.

I don't think PIC16F84 is a good choice. + according to me PIC controllers are better than AVR.

Use PIC16F877 instruction set for all PIC16 are same even it does't have advanced peripherals(Code for one 16 series PIC will work fine with other 16 series PIC) . And I strongly recommend u to start with PIC16F877 or 16F873 PICs. Because PIC16F84 is costlier (comp. features.) and it will become a waste after learning PIC programming.


Note:
PIN arrangement of PIC16F84 is different from other commonly used PICs.



Good luck.
 

Hi welove8051,
For AVR, the fuse settings are set before programming.
In PIC, you have to set configuration bits in the main program and depending on your programmer, maybe also before programming.
 

Hi,

First you start with 16f876a
it is a complete device with all peripherals.

use mplab ide for assembly programming
otherwise install some cross compilers like hitech c for c programming

with regards
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top