Microcontroller 8051 Piano in Keil and Proteus 8 simulator

0
265
interface 8051 with piano

Micocontroller 8051 Piano

 

[visitor]

interface 8051 with piano

Subscribe to view Code

[/visitor]

DESCRIPTION: –  

[sam id=”4″ codes=”true”]

The piano is a musical instrument played mainly by means of a keyboard. It is one of the most popular instruments in the world.

Today, it is one of the two parts of Indian classical music, with the other one being Carnatic music, which represents the music of South India.

he rhythmic organization is based on rhythmic patterns called Taal. The melodic foundations are called ragas. One possible classification of ragas is into “melodic modes” or “parent scales”, known as Thaats, under which most ragas can be classified based on the notes they use.
Thaats may consist of up to seven scale degrees, or swara. Hindustani musicians name these pitches using a system called Sargam, the equivalent of Western movable do solfege:
Sa (Shadaj) = Do
Re (Rishab) = Re
Ga (Gandhar) = Mi
Ma (Madhyam) = Fa
Pa (Pancham) = So
Dha (Dhaivat) = La
Ni (Nishad) = Ti
Sa (Shadaj) = Do
Both systems repeat at the octave. The difference between sargam and solfege is that re, ga, ma, dha, and ni can refer to either “Natural” (Shuddha) or altered “Flat” (Komal) or “Sharp” (Tivra) versions of their respective scale degrees. As with movable do solfege, the notes are heard relative to an arbitrary tonic that varies from performance to performance, rather than to fixed frequencies, as on a xylophone. The fine intonational differences between different instances of the same swara are called shrutis. The three primary registers of Indian classical music are Mandra (lower), Madhya (middle) and Taar (upper). Since the octave location is not fixed, it is also possible to use provenances in mid-register (such as Mandra-Madhya or Madhya-Taar) for certain ragas. A typical rendition of Hindustani raga involves two stages:

In this project we are generating the same friquencies whch are excately same as sa re ga ma pa dha ni sa by using the controller.

[sam id=”5″ codes=”true”]

 

[member]

interface 8051 with piano

[message_box title=”Program” color=”yellow”]

/* Name : Piano.c
* Purpose : Making piano with 8051 microcontroller.
* Author : Surdip Chaudhary
* Date : 10/03/2014
* Revision : None
*/

#include<reg51.h>
sbit bu=P2^0;

void delay1on()
{
TMOD=0X01;
TH0=0Xf8;
TL0=0X80;
TR0=1;
while(TF0==0);
TR0=0;
TF0=0;
}

void delay2on()
{
TMOD=0X01;
TH0=0Xf9;
TL0=0X55;
TR0=1;
while(TF0==0);
TR0=0;
TF0=0;
}

void delay3on()
{
TMOD=0X01;
TH0=0Xfa;
TL0=0X00;
TR0=1;
while(TF0==0);
TR0=0;
TF0=0;
}

void delay4on()
{
TMOD=0X01;
TH0=0Xfa;
TL0=0Xab;
TR0=1;
while(TF0==0);
TR0=0;
TF0=0;
}

void delay5on()
{
TMOD=0X01;
TH0=0XFB;
TL0=0X00;
TR0=1;
while(TF0==0);
TR0=0;
TF0=0;
}

void delay6on()
{
TMOD=0X01;
TH0=0XFB;
TL0=0X80;
TR0=1;
while(TF0==0);
TR0=0;
TF0=0;
}

void delay7on()
{
TMOD=0X01;
TH0=0XFC;
TL0=0X00;
TR0=1;
while(TF0==0);
TR0=0;
TF0=0;
}
void delay8on()
{
TMOD=0X01;
TH0=0XFC;
TL0=0X40;
TR0=1;
while(TF0==0);
TR0=0;
TF0=0;
}

void main()
{

P2=0X00;
while(1)
{

if(P1==0xFE)
{
bu=~bu;
delay1on();

}
else if(P1==0xFD)
{
bu=~bu;
delay2on();
}
else if(P1==0XFB)
{
bu=~bu;
delay3on();

}
else if(P1==0XF7)
{
bu=~bu;
delay4on();

}
else if(P1==0XEF)
{
bu=~bu;
delay5on();

}
else if(P1==0XDF)
{
bu=~bu;
delay6on();

}
else if(P1==0XBF)
{
bu=~bu;
delay7on();

}
else if(P1==0X7F)
{
bu=~bu;
delay8on();

}
}
}

[/message_box]

[/member]

 

Leave a Reply

Be the First to Comment!

Notify of
wpDiscuz