About PIC16F84 microcontroller.

Discussion in 'Embedded Systems and Microcontrollers' started by Shyamal805, Nov 7, 2012.

  1. Shyamal805

    Thread Starter New Member

    Mar 20, 2012
    27
    0
    Sir,
    I am new in microcontroller programming. Just started from now. I want to know for PIC16F84 microcontroller -

    1. Which compiler is perfect?
    2. Can i use/install MPLAB 8.5 for windows7 64 bit?
    2. Can i use c programming?
    3. Which programming language is best for this uC?

    Please help me.

    Shyamal
     
  2. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,386
    1,605
    1. Which compiler is perfect?

    There is no such thing.

    2. Can i use/install MPLAB 8.5 for windows7 64 bit?

    Yes you can.

    2. Can i use c programming?

    Yes you can.

    3. Which programming language is best for this uC?

    The one you already know. An assembler (machine language) and simulator already comes inside MPLAB. Microchip lets you download their C compiler for free, and while it is limited it is quite serviceable. There are also other sources for compilers. The only other language I have seen used in Basic, and while I have used it in the past I no longer do so when C is available.
     
  3. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    Also the 16f84 is quite outdated. You can get newer PICs that offer more for less money.
     
  4. Shyamal805

    Thread Starter New Member

    Mar 20, 2012
    27
    0
    Which is the most updated PCIs? Please tell me.

    Thanks.
     
  5. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    Well the 16f628 or 16f88 is a good replacement for for the old 16f84. Unless size matter. I would perhaps recommend to use a 28 or 40 pin PIC. However before you get any PIC. You must be sure it can be programmed with your current programmer. What kind of programmer do you have
     
  6. Shyamal805

    Thread Starter New Member

    Mar 20, 2012
    27
    0
    Sir, i'm new & have small knowledge on Microcontroller. I want to start working on PCI16F84 because i have some tutorials and tips on PCI16F8. For few pin(18) hope it will be good for me to easily understand & it is also available on my country for this reason i want to start working first.

    After completing PCI16F84 project i will start working for newer PCIs like 16f628 or 16f88 that you give here.

    Sir, I don't know what kind of programmer i can use. I search on google and get a site which gives PIC 16F84 Serial Programmer circuit diagram and layout. I want to make this but don't know is this programmer circuit diagram is ok?

    please help me to make a pci programmer...

    Thanks
    Shyamal
     
  7. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    4,884
    1,001
    Save your money and buy the microchip programmer. Don't waste you money on third party programmers.

    http://www.microchip.com/stellent/i...deId=1406&dDocName=en538340&redirects=pickit3


    And please don't refer to forum members as "sir" in every paragraph. There are ladies on the forum too. Besides we are all equals here and there is no reason to call people sir or mam.
     
  8. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    4,884
    1,001
  9. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    The standalone application keeps the Pickit 2 a viable competitor to the Pickit 3. I have yet to find a device I can't program with a Pickit 2:D
     
  10. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    4,884
    1,001
    Then you are not looking very hard. ;) We get questions all the time way their pic kit 2 won't program a chip and the answer usually is that it is not supported by the 2.
     
  11. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    This is a pretty wide range of support for the PICs most people will see...
     
  12. takao21203

    Distinguished Member

    Apr 28, 2012
    3,577
    463
    MPLABX also has a standalone programmer software.

    The PICKIT2 also can be destroyed, even if it takes a while (It will turn more and more erratic).
    The PICKIT3 has much better protection.
     
  13. takao21203

    Distinguished Member

    Apr 28, 2012
    3,577
    463
    The 16f84 is kind of a piece of foobar with it's 1K memory.

    16f1503: 4K
    16f1824: 8k

    16f716: 2K

    18f24j10: 16K
    18f14k50: 16k

    Why would one want to use a 16f84 these days?

    You only limit yourself in terms you will not be able to write larger C programs.

    So the 16f84 is definitively not some kind of allround PIC or "starting point" PIC.

    Alternatively, get some 16F5X, all three: 16f54, 16f57, 16f59.
     
  14. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    Well... no, I don't generally look for chips I can't use! That may be my problem.;)
     
  15. Shyamal805

    Thread Starter New Member

    Mar 20, 2012
    27
    0
    Thanks,
    Which reference book is perfect for microcontroller programming? C programming will be good for me so i need such kind of book. Give me some instruction for starting uC programming using c language.
     
  16. takao21203

    Distinguished Member

    Apr 28, 2012
    3,577
    463
    Learn Windows Visual Studio C++.

    It includes C as a subset. You can try out many things, but it is more painless, the debugger is much better.

    I never used any books for embedded C.

    In addition, read the original C language paper (I think written by Brian Kerninghan).
    http://www.cs.cmu.edu/~mihaib/kernighan-interview/

    I also recommend the CMOS cookbook to understand the CMOS technology. Microcontrollers are based on this.
     
  17. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    4,884
    1,001
    I completely disagree. Trying to learn Visual Studio is far, far more complicated than needed. The OP would easily get lost in all of the information that is completely irrelevant to MCU programming.

    My suggestion would be to learn BASIC for the user that has never programmed before. The concept of pointers is a bit hard to grasp for the beginning programmer.

    Mikro has some pretty good lessons on pics. Here is one on C

    http://www.mikroe.com/products/view/285/book-pic-microcontrollers-programming-in-c/

    But I believe they have BASIC too.
     
  18. takao21203

    Distinguished Member

    Apr 28, 2012
    3,577
    463
    Yes but starting off with Visual Studio is fairly simple.

    -Intellisense + context help
    -MSDN documentation for every language feature (which is quite good actually). Including all the standard C stuff
    -Large user base with a good forum (MSDN community).

    Yes BASIC- then also download Visual Basic :)

    You can argue it is irrelevant to embedded C but that's argueable. C is so much portable, you can take functions from embedded C programs, and use them for Windows.

    Normally you'd isolate hardware dependent stuff into specialized functions.

    For the trivial beginners stuff, that all can be tried out in Visual Studio. A char is a char under Windows C, and on a small microcontroller, all the same.

    BASIC is far less portable...

    On the microcontrollers you need some I/O at first, or complicate hardware debugging. In Visual Studio, you have a very powerful integrated debugger. You can very easily create a blank form with a few text labels, and manipulate their value with just one line code!

    Once you are a bit familiar with the basic C stuff, make the transition to embedded C!

    You don't have to use C++ features at all, even if it is called C++.

    The point is, these days often USB is used. And in many cases, this will mean a USB host, for instance a PC, and a USB device. Unless you use LINUX already, you'd have to introduce Windows at this point anyway.

    There are also some embedded evalution kits, that actually include such Windows sample applications.

    If I put Windows C and embedded C on a scale, I give 3 to Windows, and 7 to 8 to embedded (difficulty).

    At other places I even recommend to learn javascript- it is free, does not need a specialized IDE, and can be learned by only looking up webpages.
     
  19. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    4,884
    1,001
    There is no reason to learn an environment that you will not use. Sorry.

    Time is much better spent learning the much internals.

    Now if op wants to expand and use Visual Studios to write apps to interface to micros then that is another thing.

    As far as potability, even C is not that portable when it comes to micros. Even with the same family of chips, there are differences between C compilers.

    Most hobbyists don't need to worry about portability anyway. They code for themselves for their own project and the code isn't going anywhere. Use the language that you feel most comfortable using and don't worry about it.

    Again if you want to aspire to share your code with others then C is probably the better choice.
     
  20. takao21203

    Distinguished Member

    Apr 28, 2012
    3,577
    463
    It is of course 2 different worlds- on embedded chips, you'd try to reduce memory footprint. You don't normally have malloc available.

    On a Windows PC, you'd often use a graphic designer for the user interface. Drag a pushbutton, drop it on the form, click the button, and the designer spells the function skeleton for you. You only add code inside the function.

    If you learn embedded C, you would maybe believe that saving memory is relevant.

    It depends if you only want to produce a few small hobby programs, or if you really are kind of a programmer, or at least want to become one.

    My point is to learn programming as such, embedded Microcontrollers are not particulary well suited. You will come accross problems, and then you'll encounter there is no easy way to deal with them.

    If on the other hand you have learned mainstream C or C++, you will have it far more easy with embedded C. If you run into trouble, you'll know what to do, or at least you will have some ideas what is wrong.

    Learning embedded technologies also includes digital I/O, all the pheripherals, I2C, LCD interfacing, just to name a few things.

    Learning both things at once, programming and the embedded technologies, is very difficult. I had years of programming experience (for instance MSDOS assembler), and nonetheless, I also spent years with PIC assembler.

    Learning Windows C++ only took me about 6 months, and back then, Visual Studio wasn't as powerful as it is now. All MFC based.
     
Loading...