Skip to content
CEC Semester Twenty Three 2023

PIC Microcontroller Embedded Development Using the CCS PIC MCU C Compiler

Fred Eady -
Owner, EDTP Electronics Inc. and Principal Engineer, Ongoing Systems LLC.
April 24,
2023
CCS C Project Wizardry 101
To unleash the full power of the CCS PIC MCU C Compiler we must master the use of the magic contained within the Project Wizard. Today, we will pick up the Project Wizard wand for the first time and use it to manipulate a piece of PIC silicon known as the PIC18F45K50. During the course of today’s discussion, we will call upon the resources embedded within the Project Wizard to automatically assemble C constructs that will enable us to do such things as control GPIO pins, measure analog voltages, and communicate with external devices. Today’s targeted hardware is an off-the-shelf USB Development Kit that can be purchased from CCS. Before we end today’s session we will compile our Project Wizard-generated C source code and load the compiled application binary into the USB Development Kit’s PIC18F45K50 using a CCS ICD-U80 programmer/debugger.
Course Resources
Special Educational Materials
Microchip Functional Safety for Microchip Products - Datasheet Preview – Video
Microchip Explorer 16/32 Development Board - Digi-Key Daily – Video
Intelligent Analog Family of MCUs – PTM
April 25,
2023
TCP/IP Device Development Using the CCS C Compiler
The CCS PIC MCU C Compiler is capable of producing TCP/IP-based applications. If you have ever written a TCP/IP application, you know that there are a zillion little software knobs you have to turn to tune the application to your needs. The software knobs in the TCP/IP application we will build today will be manipulated by the CCS PIC MCU C Compiler Project Wizard. TCP/IP is only good for pushing and pulling data along in a network. So, we will need to design and assemble some PIC18-based hardware to run the TCP/IP stack and process the data that the TCP/IP stack algorithms are transporting.
Course Resources
Special Educational Materials
Microchip Functional Safety for Microchip Products - Datasheet Preview – Video
Microchip Explorer 16/32 Development Board - Digi-Key Daily – Video
Intelligent Analog Family of MCUs – PTM
April 26,
2023
USB Device Development Using the CCS C Compiler
There are embedded applications that do not require the device to connect to the Internet. However, most every embedded device is required to communicate with something whether it be another embedded device or a personal computer. When dinosaurs roamed freely, RS-232 was the preferred embedded device intercommunications method. The dinosaurs are gone and RS-232 is alive and well. Despite RS-232’s continued usefulness, USB has come to the forefront of inter-device communication. In the case of embedded devices, USB offers features that RS-232 cannot rival. USB is faster than RS-232 in most cases. USB can support multiple devices on its bus. And, in most cases, the embedded device can be powered directly from the USB bus. The CCS PIC MCU C Compiler supports USB on PIC microcontrollers. Today’s lecture will focus on coding USB applications that connect USB-enabled PIC microcontrollers with USB-enabled personal computers.
Course Resources
Special Educational Materials
Microchip Functional Safety for Microchip Products - Datasheet Preview – Video
Microchip Explorer 16/32 Development Board - Digi-Key Daily – Video
Intelligent Analog Family of MCUs – PTM
April 27,
2023
The CCS Long Range RF Kit
CCS offers a multitude of development kits in addition to its CCS PIC MCU C Compiler. The CCS Long Range RF Kit is actually a LoRa hardware implementation supported by CCS LoRa firmware drivers. A PIC18F45K22 microcontroller runs the show and controls a Microchip RN2903A LoRa Technology Transceiver Module using the CCS C compiler’s built-in RN2903A driver. The CCS Long Range RF Kit comes with a pair of RN2903A LoRa transceivers and PIC18F45K22 controllers. Our job will be to use the CCS PIC MCU C Compiler to establish a LoRa link between the pair of PIC18F45K22 controllers using the RN2903A LoRa transceivers and the built-in CCS RN2903A driver.
Course Resources
Special Educational Materials
Microchip Functional Safety for Microchip Products - Datasheet Preview – Video
Microchip Explorer 16/32 Development Board - Digi-Key Daily – Video
Intelligent Analog Family of MCUs – PTM
April 28,
2023
Coding a Winbond SpiFlash Driver Using CCS C
The CCS PIC MCU C Compiler Project Wizard includes an entry that allows the inclusion of a built-in driver for the Microchip SST25VF0XXB series of SPI Serial Flash devices. Instead of calling upon the CCS Project Wizard for the Microchip Serial Flash driver, this time we will step away from using a built-in driver and use the CCS C Compiler to code a driver for the Winbond W25QXX series of SpiFlash devices. Our Winbond driver will run on a PIC1847J53, and there just happens to be a W25Q16JVSNIQ SpiFlash device attached to the PIC18F47J53’s SPI portal.
Course Resources
Special Educational Materials
Microchip Functional Safety for Microchip Products - Datasheet Preview – Video
Microchip Explorer 16/32 Development Board - Digi-Key Daily – Video
Intelligent Analog Family of MCUs – PTM
Instructor
Fred Eady
Owner, EDTP Electronics Inc. and Principal Engineer, Ongoing Systems LLC.

Fred Eady is the owner of EDTP Electronics Inc. and is the principal engineer at the Georgia branch of Ongoing Systems LLC. EDTP Electronics was established in 1988. In the meantime, Fred has written thousands of magazine articles. He has written for all of the major electronic magazines, including Radio Electronics, Electronics Now, Nuts and Volts, Servo, MicroComputer Journal, and Circuit Cellar. Fred has even done a few short feature articles for Design News. To date, he has authored four books and contributed to a fifth. He currently works as a PIC microcontroller consultant and is a Microchip Authorized Design Partner. Fred’s expertise also extends into the ARM community where he is a hardware and firmware design consultant. His customers include aerospace companies, machine shops, specialty startup companies, medical machine manufacturers, coin-operated device businesses, and various other research and development companies. He has a very close working relationship with Microchip Technology, the manufacturer of PIC microcontrollers, and has taught multiple Ethernet and WiFi classes at Microchip's annual Masters Conference.