This article is about the use of an 8-bit PIC family of PIC microcontrollers PIC18F458 and PIC16F877 which are RISC type microcontrollers like AVR family microcontrollers and we have published a book on PIC using BASIC language (or order from Shoppee). This article, will be in C language and the board used as shown in Figures 1 and 2, but for the laboratory of the Faculty of Information Technology Phetchaburi Rajabhat University, choose a board for learning in the course of computer architecture as shown in Figure 2, and use a set of chip programs as shown in Figure 3. Article part 1 (Board CP-PIC V3/458 or CP-PIC V3/877), is an introduction to the features of the microcontroller and appearance of the laboratory test board. The use of the different parts of the PIC will be discussed in the next article.
To use the chip programmer in Figure 3, it must be connected with the cable to the test board in Figure 2 as shown in the connection example in Figure 4.
Microcontroller Features
The PIC is Microchip’s microcontroller with a variety of 8, 16 and 32-bit PIC cores, but for ease of learning, an 8-bit architecture is used via the PIC18F458 or PIC16F877 chip, each with Features as follows.
PIC18F458
- Operates with a maximum clock frequency of 40 MHz.
- Flash ROM memory size is 32K.
- 1536 bytes of RAM memory
- It has 256 bytes of EEPROM memory.
- Support 10-bit ADC
- Current Sink 25mA
- Current Source 25mA
PIC16F877
- Operates with a maximum clock frequency of 10 MHz.
- Flash ROM memory size is 8K.
- RAM memory size 368 bytes
- It has 256 bytes of EEPROM memory.
- Support 10-bit ADC
- Current Sink 25mA
- Current Source 25mA
Software
The software used to develop a program in C language is MPLAB X IDE with XC8 installed as shown in Figure 5 and the software for programming the chip that is used with the programmable board chip in Figure 4 is Program PICkit2 of Microchip as shown in Figure 6.
Conclusion
From this article, the reader has learned about the features of the PIC18F485 and PIC16F877 microcontrollers as a basis for studying the architecture of the microcontroller system in C language later in the next article. Finally, have fun learning and practicing programming.
(C) 2022, By Anuchart boonmark, Danai Jedsadathitikul and Jarut Busarathid
Updated 2022-03-02