PROJECT 6.3—Two-Dice Project Project Description This project is similar to Project 2, but here a pair of dice are used—as in many dice games such as backgammon—instead of a single dice. The circuit shown in Figure 6.8 can be modified by adding another set of seven LEDs for the second dice. For example, the first […]
Continue reading…
Uncategorized
Simple PIC18 Projects:Chasing LEDs
PROJECT 6.1—Chasing LEDs Project Description In this project eight LEDs are connected to PORTC of a PIC18F452-type microcontroller, and the microcontroller is operated from a 4MHz resonator. When power is applied to the microcontroller (or when the microcontroller is reset), the LEDs turn ON alternately in an anticlockwise manner where only one LED is ON […]
Continue reading…
Simple PIC18 Projects:Program Description Language (PDL)
Program Description Language (PDL) Program description language (PDL) is free-format English-like text which describes the flow of control in a program. PDL is not a programming language but rather is a tool which helps the programmer to think about the logic of the program before the program has been developed. Commonly used PDL keywords are […]
Continue reading…
C Programming Language:Programming Examples
Programming Examples In this section, some simple programming examples are given to familiarize the reader with programming in C.
Continue reading…
C Programming Language:PIC Microcontroller Input-Output Port Programming
PIC Microcontroller Input-Output Port Programming Depending on the type of microcontroller used, PIC microcontroller input-output ports are named as PORTA, PORTB, PORTC, and so on. Port pins can be in analog or digital mode. In analog mode, ports are input only and a built-in analog-to-digital converter and multiplexer circuits are used. In digital mode, a […]
Continue reading…
C Programming Language
There are several C compilers on the market for the PIC18 series of microcontrollers. These compilers have many similar features, and they can all be used to develop C- based high-level programs for PIC18 microcontrollers. Some of the C compilers used most often in commercial, industrial, and educational PIC18 microcontroller applications are: • mikroC • […]
Continue reading…
Microcomputer Systems:BCD Numbers
BCD Numbers BCD (binary coded decimal) numbers are usually used in display systems such as LCDs and 7-segment displays to show numeric values. In BCD, each digit is a 4-bit number from 0 to 9. As an example, Table 1.4 shows the BCD numbers between 0 and 20. Summary Chapter 1 has provided an introduction […]
Continue reading…
PIC18F Microcontroller Series
PIC16-series microcontrollers have been around for many years. Although these are excellent general purpose microcontrollers, they have certain limitations. For example, the program and data memory capacities are limited, the stack is small, and the interrupt structure is primitive, all interrupt sources sharing the same interrupt vector. PIC16- series microcontrollers also do not provide direct […]
Continue reading…
Microcomputer Systems:Addition and Subtraction of Floating Point Numbers
Addition and Subtraction of Floating Point Numbers The exponents of floating point numbers must be the same before they can be added or subtracted. The steps to add or subtract floating point numbers are: • Shift the smaller number to the right until the exponents of both numbers are the same. Increment the exponent of […]
Continue reading…
Microcomputer Systems:Floating Point Numbers and Converting a Floating Point Number into Decimal
Floating Point Numbers Floating point numbers are used to represent noninteger fractional numbers, for example, 3.256, 2.1, 0.0036, and so forth. Floating point numbers are used in most engineering and technical calculations. The most common floating point standard is the IEEE standard, according to which floating point numbers are represented with 32 bits (single precision) […]
Continue reading…