Electronic Products
Find us here:
  • Books
    • Embedded C Books >
      • cbookfiles
      • cbook2files
      • cbook3files
    • BASIC Books >
      • Programming PICs in BASIC_vol1
      • PICBasic Book Support
      • Basic Atom Book Support
    • Other Books >
      • Arduino Book
      • chipkitbookfiles
  • Chuck's Blog
    • Blog Posts Archive
    • Disclaimer
  • YouTube Channel
  • About Chuck
    • About Chuck
    • Stock Car Racing
  • 3D Printing
    • Fabrikator Mini
  • Getting Started with PICs
    • BASIC Programming
    • C Programming >
      • C Compilers
  • Build Your Own PICKit 2
    • PICkit 2 Starter Kit
  • CHIPINO
    • Shields
  • CHIPAXE Breadboard Modules
  • Understanding Hex Files
  • chipKIT
  • Newsletter Archive
  • Contact
  • Retired Designs
    • BasicBoard
    • Ultimate OEM
    • Maximite BasicBox
    • Maximino
  • Downloads
  • Kickstarter Projects
    • Demo-Shield
  • Great Cow Basic Site
  • Buy Hardware
  • Links I Recommend

Configuration Settings

4/7/2014

0 Comments

 
When programming a Microchip PIC you will need to setup the configuration settings. These are the settings that control which oscillator to use, internal or external, high speed (>4Mhz) or low speed (<4 mhz). The MCLR reset pin can be an external reset pin or a standard input pin. The watchdog timer can be enabled or disabled. Low voltage programming (which a lot people get caught by) can be turned on or off.
All these and more are in the configuration settings.
Picture
Most devices have default settings and then the compiler you are using will probably have some default settings as well. The Great Cow Basic compiler I like to play with, has default settings based on the speed you are running and what device you are programming. In the end the assembly file produced will have a line that starts with __CONFIG ... and then all the settings. Sometimes this will occur on multiple lines. But in the end all that data ends up in the .hex file you program the Microchip PIC device with.

When you load the .hex file into the PICkit 2 programmer software, it will automatically load the configuration settings from the .hex file. You can then manually change them if you want. Some programmers default to manual setting but most have the option to read them from the .hex file.

Configuration settings can be some of the most confusing parts of programming Microchip PICs for a beginner and that's why I like the way the Great Cow Basic compiler handles all that for you. To really understand all the configuration settings for a device you have to read the data sheet and I won't go into that this time, I'll save that for another blog post. The more complicated the device is the more configuration settings it will have. So that's why its typically not the best move for a beginner to start out with the latest and greatest Microchip PIC device. Its why I recommend the PIC16F690 or the PIC12F683 which I used in a couple of my books. The PIC16F886 is also fairly simple when is comes to the Configuration setup.

So don't be intimidated by the Config settings, just learn the basics before you program. I plan to add a section to my website on this topic in the future. Until then if you have a question about programming or config settings shoot me the question through my contact form and I'll try to help you out.
0 Comments



Leave a Reply.


    Categories

    All
    3D Printer
    Chipaxe
    Chipino
    Chipkit
    CNC
    Copper Connection
    Dot Matrix
    Elproductsnews
    Expresspcb
    Graphic Lcd
    Great Cow Basic
    Kickstarter
    Lcd Shield
    Makefaire
    Makercase
    Maximite
    Microchip Pic
    Pickit 2
    Pickit 3
    Videos

    Visit previous blog posts in the archives below.

    Archives

    February 2018
    October 2017
    September 2017
    July 2017
    November 2016
    August 2016
    July 2016
    May 2016
    March 2016
    January 2016
    November 2015
    September 2015
    August 2015
    July 2015
    June 2015
    April 2015
    March 2015
    February 2015
    January 2015
    December 2014
    November 2014
    October 2014
    September 2014
    August 2014
    July 2014
    June 2014
    May 2014
    April 2014
    March 2014
    February 2014
    January 2014
    December 2013
    November 2013
    October 2013
    September 2013
    August 2013
    July 2013
    June 2013
    May 2013
    April 2013
    March 2013
    October 2012
    October 2011

    RSS Feed



    About Chuck

    Chuck has been programming with PIC Microcontrollers since there were only five devices. Now there are over 700 and growing. He also has a lot of fun 3D printing designs using his Davinci 3D printer and TinkerCad software. In this series of blog posts and occasional videos on his YouTube Channel he tries to help you get started with electronics and 3D printing.

    Disclaimer

Powered by Create your own unique website with customizable templates.