Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

breakoutModewide
languagenone

...

Onboarding

...

Guide

...

(with

...

PIC18

...

MCU)

...

Parts

...

you

...

need:

...

  • MPLAB

...

  • IDE

...

  • MPLAB

...

  • XC16

...

  • Compiler

...

  • Picdev

...

  • board

...

Questions

...

before

...

this

...

begins:

...

  • What

...

  • is

...

  • a

...

  • PIC?

...


  • Datasheet

...

  • -

...

...


  • Slideshow

...

  • -

...

...

  • Why use a PIC over an Arduino or a Pi?

  1. A Pi runs GNU/Linux,

...

  1. and

...

  1. having

...

  1. an

...

  1. operating

...

  1. system

...

  1. and

...

  1. requires

...

  1. task

...

  1. scheduling

...

  1. that

...

  1. does

...

  1. nothing

...

  1. but

...

  1. slow

...

  1. down

...

  1. operation

...

  1. of

...

  1. the

...

  1. device

...

  1. in

...

  1. our

...

  1. context.

...

  1. Plus,

...

  1. it's

...

  1. a

...

  1. lot

...

  1. cheaper

...

  1. and

...

  1. easier

...

  1. to

...

  1. imbed

...

  1. when

...

  1. all

...

  1. we

...

  1. need

...

  1. is

...

  1. a

...

  1. controller.

...

  1. Arduino's

...

  1. are

...

  1. generally

...

  1. pricier,

...

  1. less

...

  1. easy

...

  1. to

...

  1. embed,

...

  1. and

...

  1. are

...

  1. slower

...

  1. than

...

  1. a

...

  1. PIC.

...

  1. That

...

  1. said,

...

  1. they

...

  1. could

...

  1. be

...

  1. used,

...

  1. just

...

  1. aren't

...

  1. a

...

  1. great

...

  1. choice

...

  1. if

...

  1. you're

...

  1. making

...

  1. production

...

  1. equipment.

...

  • Why do we need a microcontroller?
    A microcontroller handles all of the logic behind something like a remote controller. In order to listen for button presses and cause some output to happen, there needs to be a small microprocessor and associated pieces in the middle.

  • Why are we using C?
    Strictly speaking, C is the granddaddy of modern high-level languages. It balances easy to read syntax with being fairly true to what happens under the hood. C++ is not used since object oriented programming is not useful for small microcontrollers and would be inefficient to use. Other languages like Python (specifically microPython) probably could be used, but it doesn't really make sense to when the compiler we have is written for C.

How to!

1. Load up the MPLAB IDE.

Simply download the installer and run it. Tested so far on Windows 10 and Fedora 34, but not MacOS Big Sur. If on Linux, open the tar ball, set the file to executable and then run it as normal.

For windows:
https://ww1.microchip.com/downloads/en/DeviceDoc/MPLABX-v5.50(1)-windows-installer.exe

...

For

...

linux:

...


https://ww1.microchip.com/downloads/en/DeviceDoc/MPLABX-v5.50(1)-linux-installer.tar

...

For

...

OSX:

...


https://ww1.microchip.com/downloads/en/DeviceDoc/MPLABX-v5.50(1)-osx-installer.dmg

...

Keep

...

in

...

mind

...

that

...

only

...

x86_64

...

processors

...

are

...

supported.

...

If

...

you

...

are

...

running

...

an

...

M1

...

Macintosh,

...

then

...

you

...

may

...

need

...

to

...

run

...

a

...

VM,

...

use

...

a

...

translation

...

layer,

...

or

...

just

...

remote

...

into

...

a

...

machine

...

available

...

through

...

the

...

Faculty

...

of

...

Engineering.

...

2.

...

Download

...

the

...

MPLAB

...

XC8

...

compiler.

...

For

...

windows:

...


https://www.microchip.com/content/dam/mchp/documents/DEV/ProductDocuments/SoftwareTools/xc8-v2.32-full-install-windows-x64-installer.exe

...

For

...

linux:

...


https://www.microchip.com/content/dam/mchp/documents/DEV/ProductDocuments/SoftwareTools/xc8-v2.32-full-install-linux-x64-installer.run

...

For

...

OSX:

...


https://www.microchip.com/content/dam/mchp/documents/DEV/ProductDocuments/SoftwareTools/xc8-v2.32-full-install-macos-x64-installer.dmg

...

If

...

asked

...

to

...

add

...

to

...

PATH

...

environment

...

variables,

...

please

...

do

...

say

...

yes.

...

This

...

way

...

you

...

won't

...

end

...

up

...

having

...

to

...

manually

...

add

...

the

...

path

...

later.

...