Differences
This shows you the differences between two versions of the page.
videos:pic_programming_using_sdcc [2021-05-01 04:20] – created Tony | videos:pic_programming_using_sdcc [2022-04-12 19:18] (current) – Tony | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== How To Program PIC Microcontrollers Using SDCC ====== | ||
+ | |||
+ | |||
+ | In this video, I go over how to get started using a PIC microcontroller as well as programming and uploading your first program on GNU/Linux! | ||
+ | |||
+ | I go over what PIC microcontrollers are, how they work, and the advantages/ | ||
+ | |||
+ | I explain the IC itself, how we can wire it to the programmer. I used a PicKit2 in this video (note that the PicKit3 drivers might not work on Linux). | ||
+ | The program is written in C, I used SDCC as the compiler, and PK2CMD to upload to the IC. I also have a demo of the blink circuit at the end. | ||
+ | |||
+ | Most tutorials I could find were for MPLab and other Windows only IDE's, so I wanted to showcase how it could be done on other OSes. | ||
+ | |||
+ | For this video, I used the PIC18F2550, you can follow along with many other PIC12, PIC14, PIC16 or PIC18 devices that are supported. | ||
+ | |||
+ | Timestamps: | ||
+ | |||
+ | 00:00 - Introduction | ||
+ | |||
+ | 00:17 - What is PIC? | ||
+ | |||
+ | 00:49 - PIC Advantages and Disadvantages | ||
+ | |||
+ | 03:17 - Why Follow Along | ||
+ | |||
+ | 03:42 - PIC Product Lines | ||
+ | |||
+ | 04:08 - The PIC 18F2550 | ||
+ | |||
+ | 05:17 - How do we upload our programs? A look at the PicKit2 programmer. | ||
+ | |||
+ | 06:39 - Pinouts of the PicKit and IC | ||
+ | |||
+ | 08:14 - Wiring the programmer to the Microcontroller | ||
+ | |||
+ | 10:20 - Installing the software on Linux | ||
+ | |||
+ | 11:57 - PicKit detection test | ||
+ | |||
+ | 12:11 - Example code files | ||
+ | |||
+ | 12:52 - Header files and options, sdcc includes | ||
+ | |||
+ | 15:56 - Datasheet and I/O on the Microcontroller | ||
+ | |||
+ | 19:09 - Blink example program explanation | ||
+ | |||
+ | 21:09 - Compiling programs using SDCC | ||
+ | |||
+ | 22:03 - A look at the assembly file | ||
+ | |||
+ | 23:41 - A look at the binary HEX file | ||
+ | |||
+ | 24:06 - Uploading hex files to the chip using pk2cmd | ||
+ | |||
+ | 25:10 - Wiring the circuit to run our program | ||
+ | |||
+ | 27:45 - Updating our programs | ||
+ | |||
+ | 28:50 - Continuing further | ||
+ | |||
+ | 29:36 - Concluding remarks | ||
+ | |||
+ | Links: | ||
+ | |||
+ | The datasheets, pinouts and documentation on the chips shown in the video are all from Microchip' | ||
+ | |||
+ | PIC 18F2550: https:// | ||
+ | |||
+ | PicKit 2: https:// | ||
+ | |||
+ | SDCC project: https:// | ||
+ | |||
+ | SDCC examples: https:// | ||
+ | |||
+ | Thanks for watching! I hope you found this video useful! | ||
+ | |||
+ | Tony Tascioglu | ||
+ | |||
+ | tonytascioglu.com | ||
+ | |||
+ | --- | ||
+ | |||
+ | Production Remarks and Rants: | ||
+ | |||
+ | - This video took quite a while to put together from the multiple cameras and audio tracks I was working with. I had to do some drastic color correction for many scenes in this, to get it looking better, brighter | ||
+ | and at a proper white balance! As a result, there are a few glitches of transitions and short clips where the effects did not get applied. | ||
+ | |||
+ | - This video originally had background music, I asked a couple of friends, and Bruce suggested removing any background music because "it was too distracting" | ||
+ | and tag him. | ||
+ | |||
+ | - There is some distortion in the first camera clips from the mp3 compression the mic uses (it was an Olympus recorder), and I was probably too close to it. I applied more drastic noise suppression in the second | ||
+ | half so there' | ||
+ | |||
+ | - Everything except the Linux logo in the thumbnail is from this video, though I had to mess with the contrast a bit | ||
+ | |||
+ | --- | ||
+ | |||
+ | Music by Approaching Nirvana: | ||
+ | |||
+ | https:// | ||
+ | |||
+ | https:// | ||
+ | |||
+ | http:// | ||
+ | |||
+ | Intro: Their Story (Animals) | ||
+ | |||
+ | Outro: Glimpse of Winter (Blocking the Sky) | ||
+ | |||
+ | --- | ||
+ | |||
+ | Watch this video on Peertube: https:// | ||
+ | |||
+ | If you liked this video, please leave a like and if you want more, then be sure to subscribe! If you didn't enjoy this video, then consider sending an email! | ||
+ | |||
+ | Copyright 2020 | ||
+ | |||
+ | Tony Tascioglu | ||
+ | |||
+ | tonytascioglu.com | ||