LCD INTERFACE WITH 8051
PWM PIC16F877A OSCILOSCOPE CIRCUIT DIAGRAM
HOW TO USE THE PWM OF PIC 16F877A A COMPLERE CIRCUIT DIAGRAM AND CODE WRITTEN IN BASIC
lcd and Microcontoller
LCD INTERFACE IN 8BIT AND 4-BIT MODE WITH PIC MICROCONTROLLERS
THE GRAPHIC LCD
THE GRAPHIC LCD INTERFACE WITH MICROCONTROLLER PIC16F877 AND ITS EXAMPLE CODE AND A COMPLETE SOLUTION
OSCILLOPSCOPE USED IN PWM PROJECT WHERE TWO CHANNEL PWM FROM PIC16F877 IS SHOWN
SECOND MMD PROJECT LED moving message diaply using PIC16f628 CD4017 and 74LS595 Introduction of MMD Project-2:- The PIC microcontroller...
The LM35 series are precision integrated-circuit temperature sensors, whose output voltage is linearly proportional to the Celsius (Centigra...
MikroC gives us a very simple PWM library with 4 functions shown below: Pwm_Init() Pwm_Change_Duty() Pwm_Start() Pwm_Stop() The expalan...
Industrial and control application/may require automation of the process such as temperature, pressure, liquid flow, etc., in order to minim...
Introduction: PC based Temperature data logging is a series of posts, in which we will tell a beginner to make all by itself. tools: Foll...
PIC 16f877 based Rotation Per Minute (RPM) Meter Development:- In this Project we will develop a RPM meter using PIC microcontroller PIC ...
Multiplexed LED Display 4-digit Interfacing with PIC micro-controller 16F877A. The heart of this project is PIC microcontroller PIC16f877a....
Practical example of the use of soft-uart using PIC microcontroller: The serial port of a PC (e.g., COM1) is connected to a PIC18F452 micr...
Tutorial of PIC16f877A programming: How to write a code for PIC microcontrollers ? If above question is in your mind then this Tutorial w...
These tutorials demonstrate how to use a multiplexed 7 segment LED displays. The digit of a seven segment display basically contains seven L...
- January (5)
- February (2)
- March (5)
- April (5)
- May (2)
- MAX6674/5 Thermocouple to Digital Converter Interf...
- Example Project with PIC12f508 for electronic Dice...
- Random Digression algorithm for random numbers
- PIC 12f675 Example Project for Quiz Game Controlle...
- Telephone Card Chip Example Project with PIC12f675...
- Keypad Scanning with PIC microcontrollers
- Counting Events by using microcontroller
- MBasic Compiler for PIC microcontrollers
- simple programming examples and algorithms for PIC...
- C-Language Algorithms For PIC Microcontrollers - p...
- Calculate the area and volume of circle using micr...
- C-language algorithms for PIC micro-controllers Lo...
- Program passing an array using pointers post # 5
- mikroC built-in functions pic16f877a lcd interfaci...
- The MikroC Built in Function "Lo" and "Hi"
- MikroC for PIC built in function "Higher"
- PASSING VARIABLES BY REFERENCE in MIKROC for PIC m...
- Program to read from the EEPROM.
- Interface of LCD with PIC using MikroC builtin Lib...
- Text Based LCD Interfacing with PIC18f452
- MikroC Software UART Library For PIC
- July (5)
- August (14)
- September (3)
- November (7)
- December (3)
I am free lancer to design electronic circuits and programming or coding of microcontroller or microprocessor based projects. Interested people can contact me. Student and learner can also contact for help in their projects. Please write your questions in comment section or directly e-mail to me. My e-mail address is :
Tuesday, June 22, 2010
Problem Program # 7:
Write a program using a "while" statement to clear all ten elements of an integer array M.
As shown in the program that follows, NUM is defined as 10 and variable j is used as the loop counter: The program is follows.
#define NUM 10
unsigned char j = 0;
while (j < NUM)
M[j] = 0;
Program Problem # 8:
Write a program in c-language for PIC microcontrollers to convert the temperature from C to F starting from 0C, in steps of 1C up to and including 100C, and store the results in an array called F.
Given the temperature in C, the equivalent in F is calculated using the formula:
First of all we need the formula to convert the temperature in C to Temperature in F. And this formula is available in all thermodynamics or heat and temperature related books.
The conversion formula is as follows:
F = (C - 32)/1.8
The next step is to generate a loop:
A for loop is used to calculate the temperature in F and store in array F:
In this loop we will use above formula at every step (increment) and the result will be stored in an array of intergers.
The required program is as follows.
unsigned char C;
for(C = 0; C <= 100; C++)// as required the range is from 1 to 100 in the steps of 1 degree C.
F[C] = (C – 32.0) / 1.8;// conversion and storage in an array.
Now there are some work for you to do.
1. Write a C program to set bits 0 and 7 of PORTC to logic 1.
2. Write a C program to count down continuously and send the count to PORTB.
3. Write a C program to multiply each element of a ten element array by 2.
4. Write a C program to add two matrices P and Q. Assume that the dimension of
each matrix is 3 X 3 and store the result in another matrix called W.
5. Repeat Exercise 4 but this time multiply matrices P and Q and store the product in matrix R.
6. What do the terms variable and constant mean?
7. What does program repetition mean? Describe the operation of while, do-while,and for loops in C.
8. What is an array? Write example statements to define the following arrays:
a) An array of ten integers
b) An array of thirty floats
c) A two-dimensional array having six rows and ten columns.
9. Write a program to calculate whether a number is odd or even.
10. Write a program to calculate the sum of all positive integer numbers from 1 to 100.
11. Write a program to evaluate factorial n, where 0! and 1! evaluate to 1 and n! = n X (n – 1)!
12. Write a program to calculate the average value of the numbers stored in an array. Assume that the array is called M and has twenty elements.
13. Modify the program to find the smallest and largest values of the array. Store the smallest value in a variable called Sml and the largest value in a variable called Lrg.