Skip to main content

Featured post

Digital Clock On LCD (16x2) PIC16F1937 Used In FlowCode Programming and Simulation

In this sample project we are using FlowCode Simulation Software for Programming and Testing with PIC16F1937.It shows how to use and simulate and program LCD for use in different projects.In this Project we have created digital clock(Using two digit each for seconds minute and hours in 24 Hour format on LCD) on 16x2 Liquid Crystal Display.Varying the delay and write-erase sequence can be manipulated to get desired result.

Here is the Flow code program:
LCD(16x2) Display Related Programs
ADC-Voltage as Float(LCD with PIC16F1937)
ADC-Voltage as String (LCD with PIC16F1937)
ADC Sampling and outputting to a LCD(LCD with PIC16F1937)
Printing Number on 16x2 LCD Display with PIC16F88
Printing and Updating Number on 16x2 LCD Display
Printing a Two line(String) message (LCD 16x2)
Printing a formatted number on ( LCD 16x2 ) Using PIC16F88

LCD (Liquid Crystal Display 16X2):-
Its screen is an electronic display module and find a wide range of applications. A 16x2 LCD display is very basic module and is very…

Harmonic Progression-Write A Program To Find SUM of Infinite HP.- C Programming Examples

As we have started C Programming coding with Example Series, We have published last posts "Write A Program To Find SUM of AP" and "Write A Program To Find SUM of GP Sequence". We have chosen to start with mathematical series and in this post you will find some basic idea and some useful concepts about Harmonic Progression (H.P.).You can download C Codes below.Please let us know your feedback.

Suggested Reading:
Common C Questions :TURBO C/C++
Integrated Environment : TURBO C/C++ - Getting Started
TURBO C/C++: Installer and Installation
C Language Programming With Examples-INDEX

Harmonic Progression/Sequence Step-wise Video Tutorial(See C- Codes Below ):

In mathematics, a Harmonic Progression (or harmonic sequence) is a progression formed by taking the reciprocals of an arithmetic progression. In other words, it is a sequence of the form. 
where −a/d is not a natural number and k is a natural number.

Equivalently, a sequence is a harmonic progression when each term is the harmonic mean of the neighboring terms.It is not possible for a harmonic progression (other than the trivial case where a = 1 and k = 0) to sum to an integer. The reason is that, necessarily, at least one denominator of the progression will be divisible by a prime number that does not divide any other denominator.

A general H.P. is 1/a + 1/(a + d) + 1(a + 2d) + ...

nth term of an H.P. = 1/[a +(n -1)d]

Three numbers a, b, c are in H.P. if 1/a, 1/b, 1/c are in A.P.
i.e. if 1/a + 1/c = 2/b
i.e. if b= 2ac/(a + c)
Thus the H.M. between a and b is H = 2ac/(a + c).(Source)


Write A Program In C To Find SUM of Harmonic Progression-Series- Sequence:C Codes are written and tested in TuboC/C++ IDE as you can see in Video:

/*
 *Write a Program in C to Find the Sum of H.P Series
 */
#include <stdio.h>

void main()
{
    int n;   //Integer Declaration
    float i, sum, term;   //Float Declaration

    printf("\n\n1 + 1 / 2 + 1 / 3 +......+1 / n \n"); //Show the format of the series to the user
    printf("Enter the value of n \n");
    scanf("%d", &n);     // %d for accepting integer value
    sum = 0;
    for (i = 1; i <= n; i++)    //For loop for n Times
    {
term = 1 / i;
sum = sum + term;  //Adding each individual term in each looping
    }
    printf("the Sum of H.P Series is = %f", sum);    //Print result on the screen Float Type
    delay(5000);    // To Show the result to the user
}

Comments

  1. Very interesting blog. A lot of blogs I see these days don't really provide anything that attract others, but I'm most definitely interested in this one. Just thought that I would post and let you know.

    ReplyDelete
    Replies
    1. Thanks for your encouraging Words.We hope you will keep giving us your valuable feedback.

      Delete
  2. You might want to format that code, it's easier to read.

    ReplyDelete
    Replies
    1. @ionut Thanks sir.
      We will try our best to keep formatting in mind next time.
      May be we will try putting it in iframe. Lets see.Thanks for your valuable inputs.

      Delete
  3. mcafee.com/activate Online Help – Call 1-844-584-0060 Tollfree. Step by Step guide for McAfee Activation, Download & complete installation online. www.mcafee.com/activate or Mcafee activate

    ReplyDelete
  4. Very informative, keep posting such smart articles, it extraordinarily helps to understand relating to things.

    ReplyDelete

Post a Comment

KeyWords

Show more

Popular posts from this blog

Dual (+-) 5v Power Supply Unit Proteus Simulation

Dual (+-) 5v Power Supply Unit

PCB in Final Look
Simple  Dual (+-) 5v Power Supply Unit for different projects. Can be used directly with AC main no need for battery.
Circuit diagram



Digital Clock On LCD (16x2) PIC16F1937 Used In FlowCode Programming and Simulation

In this sample project we are using FlowCode Simulation Software for Programming and Testing with PIC16F1937.It shows how to use and simulate and program LCD for use in different projects.In this Project we have created digital clock(Using two digit each for seconds minute and hours in 24 Hour format on LCD) on 16x2 Liquid Crystal Display.Varying the delay and write-erase sequence can be manipulated to get desired result.

Here is the Flow code program:
LCD(16x2) Display Related Programs
ADC-Voltage as Float(LCD with PIC16F1937)
ADC-Voltage as String (LCD with PIC16F1937)
ADC Sampling and outputting to a LCD(LCD with PIC16F1937)
Printing Number on 16x2 LCD Display with PIC16F88
Printing and Updating Number on 16x2 LCD Display
Printing a Two line(String) message (LCD 16x2)
Printing a formatted number on ( LCD 16x2 ) Using PIC16F88

LCD (Liquid Crystal Display 16X2):-
Its screen is an electronic display module and find a wide range of applications. A 16x2 LCD display is very basic module and is very…

Motor Types- Special Types of Motor

Motor Types- Special Types of Motor
1. Iron less or core-less rotor motorNothing in the principle of any of the motors described above requires that the iron (steel) portions of the rotor actually rotate. If the soft magnetic material of the rotor is made in the form of a cylinder, then (except for the effect of hysteresis) torque is exerted only on the windings of the electromagnets. Taking advantage of this fact is the core less or iron less DC motor, a specialized form of a PM DC motor. Optimized for rapid acceleration, these motors have a rotor that is constructed without any iron core. The rotor can take the form of a winding-filled cylinder, or a self-supporting structure comprising only the magnet wire and the bonding material. The rotor can fit inside the stator magnets; a magnetically soft stationary cylinder inside the rotor provides a return path for the stator magnetic flux.

Fibonacci Series Using Array And For Loop - C Programming Examples

As we have started C Programming coding with Example Series, We have published last posts
"Write A Program For SUM of Infinite HP"

"Write A Program To Find SUM of AP" and

"Write A Program To Find SUM of GP Sequence".

We have chosen to start with Arithmetic Series and in this post you will find some basic idea and some useful concepts about Fibonacci Numbers .You can download C Codes below.Please let us know your feedback.

In this post we are doing again Fibonacci Series but with different approach.In last post "Fibonacci Progression Using While Loop" you will see how to generate Fibonacci Numbers by using concepts of  Do-While Loop.In this post we will talk about another loop i.e. For Loop and side by side Concept of Arrays will be discussed and demonstrated.
Fibonacci Series - Sequence ( Using Array And For Loop ) Video Tutorial(See C- Codes Below ):

For Loop Concept: FOR Loops are the most useful type. The syntax for a for loop is  for ( variable init…

INDEX-Tutorials for Flow Code Programming and Simulation

Categorized Topics
We are using Flow Code Simulation Software from MATRIX for Programming and Testing,You will find topics from Flow Code Programming and Simulation.You can request a topic here.If some links are not working please let me know.
Flowcode is one of the world's most advanced graphical programming languages for micro-controllers. The great advantage of Flowcode is that it allows those with little to no programming experience to create complex electronic systems in minutes. Flowcode is available in multiple languages and currently supports the PICmicro, dsPIC, PIC24, AVR/Arduino and ARM series of micro controllers.You can Download the Demo Software HERE.







INDEX
Seven Segment LED Display 
Using Seven Segment with PIC16F88Counting using loops(Seven Segment with PIC16F88)Counting switch presses(Seven Segment with PIC16F88)
Timers and Counters
Timed Counter And Use of Timer Interrupt(PIC16F88)
ADC Programming
ADC Simulation In Flow CodeServo with ADC control input ,Flow Code Simulati…

Keypad and LED Interfacing With PIC16F88 FlowCode Programming And Simulation

In this sample project we are using FlowCode Simulation Software for Programming and Testing with PIC16F88.It shows how to use and simulate and program Keypad with LED for use in different projects.In this Project we are testing Keypad and outputting binary values to LED (Light Emitting Diodes ).Varying the delay and write-erase sequence can be manipulated to get desired result.

Above is the Flow code program:
LED Display Related Programs
Reading A Switch and outputting to a LED with PIC16F88
Outputting an 8-bit value with PIC16F88
Lighting an LED with PIC16F88
Masked inputs with PIC16F88
Controlling a single output pin Using PIC16F88

Testing Diodes/LED (Light Emitting Diodes) Using Digital Multimeter

Keypad Introduction:-The invention of the keypad is attributed to John E. Kerlin, an industrial psychologist at Bell Labs in Murray Hill.A computer keyboard usually has a small numeric keypad on the side, in addition to the other number keys on the top, but with a calculator-style arrangement of …

Arithmetic Progression - Write A Program To Find SUM of AP C Programming Examples

We re starting C Programming Tutorial Series.We will try to satisfy our readers by giving some quality content in this series.

To Begin-with we have chosen to start with mathematical series.First series that always troubles students is Arithmetic progression.In this post you will find some basic idea and some useful concepts below.

Arithmetic Progression Step-wise Video Tutorial(See C- Codes Below ):





Integrated Environment : TURBO C/C++ - Getting Started
TURBO C/C++: Installer and Installation
C Programming Basic Questions
Variables-Pointer-Array-Files
Write A Program To Find SUM of Geometric Progression
Write A Program To Find SUM of Infinite Harmonic Progression

Arithmetic Progression / Sequence  Mathematically Explained:

Arithmetic progression (AP) is a sequence of numbers in which each term after the first is obtained by adding a constant, d to the preceding term. The constant d is called common difference.

An arithmetic progression is given by a, (a + d), (a + 2d), (a + 3d), ...
where a = th…

Fibonacci Numbers Series Progression Using While Loop - C Programming Examples

As we have started C Programming coding with Example Series, We have published last posts
"Write A Program For SUM of Infinite HP"
"Write A Program To Find SUM of AP" and
"Write A Program To Find SUM of GP Sequence".
We have chosen to start with Arithmetic Series and in this post you will find some basic idea and some useful concepts about Fibonacci Numbers .You can download C Codes below.Please let us know your feedback.

Fibonacci Numbers Progression - Series - Sequence to Nth Term Step-wise Video Tutorial(See C- Codes Below ):

Fibonacci Sequence:-The Fibonacci Sequence is the series of numbers:
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, ...The next number is found by adding up the two numbers before it.

The 2 is found by adding the two numbers before it (1+1).Similarly, the 3 is found by adding the two numbers before it (1+2),And the 5 is (2+3),and so on!

Timed Counter And Use of Timer Interrupt Using PIC16F88 Microcontroller - Flow Code Simulation

Flow Code-Timed Counter And Use of Timer Interrupt(PIC16F88)

In this example of counting seconds using Timed Counter and Timer Interrupt.In this example we are using 7 Segment Display to display the results of calculation as seen in the examples code and videos.

Here is the MACRO for Interrupt Program Code:


Here is the Flow code MAIN program:
Complete list of projects:
Tutorials for Flow Code Programming and Simulation