Skip to Content
Fundamentals of Digital Logic and Microcontrollers, 6th Edition
book

Fundamentals of Digital Logic and Microcontrollers, 6th Edition

by M. Rafiquzzaman
September 2014
Intermediate to advanced
512 pages
14h 29m
English
Wiley
Content preview from Fundamentals of Digital Logic and Microcontrollers, 6th Edition

Appendix D

Interfacing The PIC18F4321 to a Personal Computer or a Laptop Using PICkit™ 3

Appendix D contains the procedure for how to download a compiled C-program (compiled using the MPLAB C18 compiler of Appendix C) from a personal computer or a laptop into the PIC18F4321's memory. Microchip's PICkit3 is used to accomplish this. The PIC18F4321 is contained on the breadboard. Note that the PIC18F4321-based hardware on the breadboard is designed and built by the designer for a specific application.

After successful downloading of the desired program, the PIC18F-based breadboard can be disconnected from the Personal computer or Laptop. The PIC18F4321 chip on the breadboard can then execute the programs downloaded into its memory upon activating the RESET pushbutton. Thus, the desired task can be accomplished.

Finally, for C programs to work with PIC18F4321 I/O, certain configuration commands are necessary. The following configuration commands should be inserted after #include <p18f4321.h>:

#pragma config OSC = INTIO2 // Select internal oscillator
#pragma config WDT = OFF // Watch Dog Timer OFF
#pragma config LVP = OFF // Low Voltage Programming OFF
#pragma config BOR = OFF // Brown On Reset OFF

Appendix D contains the following:

D.1 INITIAL HARDWARE SETUP FOR THE PIC18F4321
D.2 CONNECTING THE PERSONAL COMPUTER (PC) OR THE LAPTOP TO THE PIC18F4321 VIA PICkit™ 3
D.3 PROGRAMMING THE PIC18F4321 FROM A PERSONAL COMPUTER OR THE LAPTOP USING PICkit™3

D.1 Initial Hardware ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Mastering Digital Electronics: An Ultimate Guide to Logic Circuits and Advanced Circuitry

Mastering Digital Electronics: An Ultimate Guide to Logic Circuits and Advanced Circuitry

Hubert Henry Ward

Publisher Resources

ISBN: 9781118969304Purchase bookOther