1 / 18

Getting Started with PIC Microcontrollers

Getting Started with PIC Microcontrollers. Kelly Flowers – NN8E April 18 th , 2011. My Background. Licensed in 1979 Education – BSEE 1981 Licensed Professional Engineer (Ohio) Former NOARS member (80’s and 90’s) Worked for Allen-Bradley/Rockwell for 25yrs

Download Presentation

Getting Started with PIC Microcontrollers

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Getting Started with PIC Microcontrollers Kelly Flowers – NN8E April 18th, 2011

  2. My Background • Licensed in 1979 • Education – BSEE 1981 • Licensed Professional Engineer (Ohio) • Former NOARS member (80’s and 90’s) • Worked for Allen-Bradley/Rockwell for 25yrs • Worked with computers and microprocessors since 1979 • Began working with PICs in late 90’s

  3. What am I going to cover tonight? • PIC background, purpose, value proposition • PIC architecture (what’s it look like inside one) • How can you use one? • PIC system overview(dev s/w, programmer, target or protoboard) • Programming language choices(Assy, Basic, C) • Simple examples / hands on • Recommended resources Just want to whet your appetite tonight!

  4. The 411 on PICs • Peripheral Interface Controllers came along in the 90’s from Microchip • Small pin count microcontrollers intended to be ‘smart’ and ‘fast’ I/O front ends for more traditional microprocessors • Not intended to have big number-crunching ability • Hundreds of PIC’s and dsPIC’s

  5. Why are they so popular? • Cost! • Per piece cost is low, typically under $5 • Software development environment needed to program the devices is FREE (MPLAB IDE) • Programmers are low cost • Learning curve is fast(low # of instructions) • Proliferation of hardware, software, books • Backward compatibility • Higher level language compilers(Basic, C) • ‘Canned’ serial comms (RS232, SPI, I2C) • Flash memory based, quickly re-programmable • Minimal support parts needed

  6. The simplest of PIC’s This even has analog input capability!!!

  7. General PIC project overview PIC INPUTS Digital Analog OUTPUTS Digital SERIAL DEVICES (displays, EEPROM, RTC, smart sensors)

  8. What do you need to get started? • PC to load development software(MPLAB) on to • Programmer which connects between PC and your PIC • Target or protoboard or your actual project board to test your program!

  9. The simplest of PIC projects Even the 12F675 supports ICSP!

  10. What is MPLAB IDE? • This is the program you download to your PC to get started with writing your first program • Integrated Development Environment • Free integrated software tool set for developing and troubleshooting programs for embedded applications using PIC’s • Easily integrates with 3rd party software such as high level language compilers • Really high quality, professional grade software • The bad news is Microchip upgrades it a lot and every few generations changes the look and feel!

  11. Programming Language Choices • Assembly language is the lowest level • No extra cost to use • Fastest • Manipulating things at the ‘bit level’ • Not easy to do higher level tasks like serial comm and math

  12. 35 Assembly instructions (mid-range)

  13. Two Higher Level Choices • BASIC • Micro Engineering Labs • C • Multiple vendors (I use CCS) • Free ‘light’ versions • Popular with scientists and engineers • High level languages are used to simplify more complicated tasks like math and serial communications • Microchip made using these with MPLAB a breeze! • Typically execute more slowly than Assembly programs doing the same thing, but this is not usually a problem • The full versions cost $100 to $300

  14. You’re gonna need a Programmer…

  15. Putting it all together • Picture your final project(I like to do the hardware design first) • Download MPLAB or install it off supplied disc • Connect programmer with blank PIC installed • Launch MPLAB and set up for proper PIC and the type of programmer you are using • Write your program(or use an example) and ‘build’ till you have no errors! (the hard part) • Try it out! Do this as many times as needed since you can keep erasing and reprogramming in seconds! I recommend the PICkit 2 + ARRL Book

  16. Project Thoughts…. • Keyer • Test equipment • Freq counter • Signal gen (DC to Daylight with DDS board!!!) • SWR / power meter • Repeater control • Automatic control of anything! • Hobby servo control • Any timing and/or counting applications • Holiday lights • Home automation

  17. Resources • Microchip website • MPLAB, PICkit 2&3, ICD 2&3, datasheets, app notes • ARRL “PIC Programming for Beginners” • Hellebuyck “Beginner’s Guide to Embedded C Programming” • Square 1 website(www.sq-1.com) • Wilmshurst “Designing Embedded Systems with PIC Microcontrollers • Nuts and Volts magazine • www.sparkfun.com • Programmers, proto boards, parts • www.best-microcontroller-projects.com • Tutorials, projects • www.olimex.com • Excellent cheap proto boards(available at sparkfun) • www.kangaus.com PIC-EL II proto board, docs • www.digikey.com, www.mouser.com, www.jameco.com, www.newark.com PICs and parts • GOOGLE!!! EBAY!!!

More Related