+ All Categories
Home > Documents > Getting Started With PIC Microcontrollers

Getting Started With PIC Microcontrollers

Date post: 22-Nov-2015
Category:
Upload: harish-kumar
View: 40 times
Download: 9 times
Share this document with a friend
Description:
Microchip's 16F Microcontroller
Popular Tags:
18
Getting Started with PIC Microcontrollers Kelly Flowers – NN8E April 18 th , 2011
Transcript
  • Getting Started with PIC MicrocontrollersKelly Flowers NN8EApril 18th, 2011

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

  • What am I going to cover tonight?PIC background, purpose, value propositionPIC architecture (whats 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 onRecommended resources

    Just want to whet your appetite tonight!

  • The 411 on PICsPeripheral Interface Controllers came along in the 90s from MicrochipSmall pin count microcontrollers intended to be smart and fast I/O front ends for more traditional microprocessorsNot intended to have big number-crunching abilityHundreds of PICs and dsPICs

  • Why are they so popular?Cost!Per piece cost is low, typically under $5Software 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, booksBackward compatibilityHigher level language compilers(Basic, C)Canned serial comms (RS232, SPI, I2C)Flash memory based, quickly re-programmableMinimal support parts needed

  • The simplest of PICsThis even has analog input capability!!!

  • General PIC project overviewINPUTS

    DigitalAnalogPICOUTPUTS

    DigitalSERIAL DEVICES(displays, EEPROM, RTC, smart sensors)

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

  • The simplest of PIC projectsEven the 12F675 supports ICSP!

  • What is MPLAB IDE?This is the program you download to your PC to get started with writing your first programIntegrated Development EnvironmentFree integrated software tool set for developing and troubleshooting programs for embedded applications using PICsEasily integrates with 3rd party software such as high level language compilersReally high quality, professional grade softwareThe bad news is Microchip upgrades it a lot and every few generations changes the look and feel!

  • Programming Language ChoicesAssembly language is the lowest levelNo extra cost to useFastestManipulating things at the bit levelNot easy to do higher level tasks like serial comm and math

  • 35 Assembly instructions (mid-range)

  • Two Higher Level ChoicesBASICMicro Engineering LabsCMultiple vendors (I use CCS)Free light versionsPopular with scientists and engineersHigh level languages are used to simplify more complicated tasks like math and serial communicationsMicrochip made using these with MPLAB a breeze!Typically execute more slowly than Assembly programs doing the same thing, but this is not usually a problemThe full versions cost $100 to $300

  • Youre gonna need a Programmer

  • Putting it all togetherPicture your final project(I like to do the hardware design first)Download MPLAB or install it off supplied discConnect programmer with blank PIC installedLaunch MPLAB and set up for proper PIC and the type of programmer you are usingWrite 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

  • Project Thoughts.KeyerTest equipmentFreq counterSignal gen (DC to Daylight with DDS board!!!)SWR / power meterRepeater controlAutomatic control of anything!Hobby servo controlAny timing and/or counting applicationsHoliday lightsHome automation

  • ResourcesMicrochip websiteMPLAB, PICkit 2&3, ICD 2&3, datasheets, app notesARRL PIC Programming for BeginnersHellebuyck Beginners Guide to Embedded C ProgrammingSquare 1 website(www.sq-1.com)Wilmshurst Designing Embedded Systems with PIC MicrocontrollersNuts and Volts magazinewww.sparkfun.comProgrammers, proto boards, partswww.best-microcontroller-projects.comTutorials, projectswww.olimex.comExcellent cheap proto boards(available at sparkfun)www.kangaus.com PIC-EL II proto board, docswww.digikey.com, www.mouser.com, www.jameco.com, www.newark.com PICs and partsGOOGLE!!! EBAY!!!


Recommended