pic18 microcontroller development board

13
PIC Microcontroller Development Board Tutorial A low cost development board for the PIC18F4685. Nolan Manteufel 21 Nov. 2012 1 of 13

Upload: nolan-manteufel

Post on 30-Oct-2014

93 views

Category:

Documents


3 download

DESCRIPTION

This includes the schematic for connecting a PIC18 to a PICkit, pictures of constructing a development board, the schematic for an LED on PORTA bit 1 and C code to turn the LED on.

TRANSCRIPT

Page 1: PIC18 Microcontroller Development Board

PIC Microcontroller

Development Board Tutorial

A low cost development board for the PIC18F4685.

Nolan Manteufel

21 Nov. 2012 1 of 12

Page 2: PIC18 Microcontroller Development Board

Table of ContentsTable of Contents.................................................................................................................2Device Pin Out.....................................................................................................................3Device Compatibility...........................................................................................................3Schematic.............................................................................................................................4

Download ExpressSCH and ExpressPCB.......................................................................4Download the Schematic.................................................................................................4Open Schematic to Review or Edit..................................................................................4

Hardware..............................................................................................................................5Mouser Shopping Cart.....................................................................................................5Assemble the Parts...........................................................................................................5Solder It...........................................................................................................................7

Programming.....................................................................................................................12Going Further.....................................................................................................................12

21 Nov. 2012 2 of 12

Page 3: PIC18 Microcontroller Development Board

Device Pin Out

Device Compatibility

21 Nov. 2012 3 of 12

Page 4: PIC18 Microcontroller Development Board

Schematic

Download ExpressSCH and ExpressPCBhttp://expresspcb.com/ExpressPCBHtm/Download.htm

Download the Schematichttps://sites.google.com/site/porquenoengineering/pic-18-development-board/PIC18F4685_board.sch

https://sites.google.com/site/porquenoengineering/pic-18-development-board/PIC18F4685_led.sch

Open Schematic to Review or Edit

21 Nov. 2012 4 of 12

Page 5: PIC18 Microcontroller Development Board

HardwareBuilding things takes practice; and “practice makes perfect.” Assembling kits is a great place to start. Building with prototyping parts allows you to build your designs. Whenever you build something, spend time looking at it. Treat it like art! Soldering takes practice. Knowing where and how to place parts takes practice. Soldering the correct pins to the correct wires takes practice. Reviewing your work for mistakes takes practice. You should practice soldering, spend time looking at how other engineers make

Mouser Shopping Carthttp://www.mouser.com/ProjectManager/ProjectDetail.aspx?AccessID=9a9900246d

Assemble the Parts

21 Nov. 2012 5 of 12

Page 6: PIC18 Microcontroller Development Board

21 Nov. 2012 6 of 12

Page 7: PIC18 Microcontroller Development Board

Solder It

21 Nov. 2012 7 of 12

Page 8: PIC18 Microcontroller Development Board

21 Nov. 2012 8 of 12

Page 9: PIC18 Microcontroller Development Board

21 Nov. 2012 9 of 12

Page 10: PIC18 Microcontroller Development Board

21 Nov. 2012 10 of 12

Page 11: PIC18 Microcontroller Development Board

21 Nov. 2012 11 of 12

Page 12: PIC18 Microcontroller Development Board

ProgrammingI am using Windows XP with MPLAB. Steps may vary slightly on LINUX for MPLAB-X.

Download HI-TECH C compiler for PIC18s. Google it, look for microchip.com results. Install it.

Start a new project.

Select the HI-TECH compiler under Project >> Select Language Toolsuite.

This code turns on the LED.

// LED.c

#include <htc.h>

// Configuration bits set in MPLAB.// Internal OSC

void init(void){PORTA = 0;LATA = 0;TRISA = 0; // All PORTA pins are set as output.}

void main(void){init();while (1){PORTA = 0x02;}

Going FurtherThe PIC18F4685 is a powerful 8-bit microcontroller. The ways is can be used are endless.

I’m interested seeing it run MATLAB generated C code for software defined radio modulation/demodulations. Or connect to the internet and allow devices to be controlled by a smart phone. Or control a CMOS camera module and save the images to an SD card. Or build a radio and use the PIC18 to connect it to a PC allowing you to Instant Message (IM) from your PC through your radio.

Enjoy!

21 Nov. 2012 12 of 12