Upload
nolan-manteufel
View
93
Download
3
Embed Size (px)
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.
Citation preview
PIC Microcontroller
Development Board Tutorial
A low cost development board for the PIC18F4685.
Nolan Manteufel
21 Nov. 2012 1 of 12
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
Device Pin Out
Device Compatibility
21 Nov. 2012 3 of 12
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
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
21 Nov. 2012 6 of 12
Solder It
21 Nov. 2012 7 of 12
21 Nov. 2012 8 of 12
21 Nov. 2012 9 of 12
21 Nov. 2012 10 of 12
21 Nov. 2012 11 of 12
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