Add to Favorites    Make Home Page 1207 Online  
 Language Categories  
 Our Services  

Home » C Home » Hardware Interaction Through C Home » Electrical equipment control

A D V E R T I S E M E N T

Search Projects & Source Codes:

Title Electrical equipment control
Author bhaskar mukherjee
Author Email clx_delta [at] rediffmail.com
Description this program enables to drive several electrical equipment connected on a PCB. It acts as a software to intiate those equipments along with their running status.At a time 8 system can be handeled
Category C » Hardware Interaction Through C
Hits 390860
Code Select and Copy the Code
Code : //Computerised electrical equpiment control system. //Developped by: Bhaskar Mukherjee, B.Tech(ECE) #include<stdio.h> #include<conio.h> #include<dos.h> void main() { void tone(void); int p=0x0378; char ex[50]="Created by BHASKAR MUKHERJEE."; int k; char ex1[50]= "Programming language used is : C"; int m,j,l; char ex2[50]="ALL SYSTEMS SHUT DOWN SUCCESSFULLY." ; char ex3[50]="THANK YOU FOR USING THIS SOFTWARE."; int u[10]; int i; static a,b,c,d,e,f,g,h; char no; clrscr(); textcolor(15);gotoxy(20,6); cprintf("COMPUTERISED ELECTRICAL EQUPIMENT CONTROL"); textcolor(11); gotoxy(20,7); cprintf("-----------------------------------------"); textcolor(9); gotoxy(10,10); cprintf("EQUIPMENT NO. 1 2 3 4 5 6 7 8"); textcolor(9); gotoxy(10,12); cprintf("STATUS %d %d %d %d %d %d %d %d",a,b,c,d,e,f,g,h); textcolor(10); gotoxy(14,16); cprintf(" FOR 'ON'AND 'OFF' PRESS CORESSPONDING EQUIPMENT NUMBER."); textcolor(13);gotoxy(25,18); cprintf(" STATUS 0 = OFF STATUS 1 = ON"); textcolor(12); gotoxy(32,22); cprintf("FOR EXIT PRESS 'E'"); no=getch(); switch(no) { case '1': a=!a; tone(); outportb(p,1); delay(500); outportb(p,0); break; case '2': b=!b; tone(); outport(p,2); delay(500); outportb(p,0); break; case '3': c=!c; tone(); outport(p,4); delay(500); outportb(p,0); break; case '4': d=!d; tone(); outport(p,8); delay(500); outportb(p,0); break; case '5': e=!e; tone(); outport(p,16); delay(500); outportb(p,0); break; case '6': f=!f; tone(); outport(p,32); delay(500); outportb(p,0); break; case '7': g=!g; tone(); outport(p,64); delay(500); outportb(p,0); break; case '8': h=!h; tone(); outport(p,128); delay(500); outportb(p,0); break; case 'e': if((a||b||c||d||e||f||g||h)==1) { clrscr(); textcolor(13); gotoxy(20,12); cprintf(" WARNING:PLEASE SHUT DOWN ALL THE EQUIPMENTS!"); sound(200); delay(8500); nosound(); break; } else { clrscr(); for(j=0;j<35;j++) { textcolor(13); gotoxy(20+j,12); cprintf("%c",ex[j]); sound(3000+j); delay(30); nosound(); } for(m=0;m<40;m++) { textcolor(10); gotoxy(20+m,13); cprintf("%c",ex3[m]); sound(1800+m); delay(30); nosound(); } for(k=0;k<34;k++) { textcolor(4); gotoxy(20+k,14); cprintf("%c",ex1[k]); sound(2000+k); delay(30); nosound(); } for(l=0;l<40;l++) { textcolor(3); gotoxy(20+l,15); cprintf("%c",ex2[l]); sound(2500+l); delay(30); nosound(); } window(10, 10, 80, 25); printf(" PRESS ANY KEY."); getch(); outportb(p,0); exit(0); } case 'E': if((a||b||c||d||e||f||g||h)==1) { clrscr(); textcolor(10); gotoxy(20,12); cprintf("PLEASE SHUT DOWN ALL THE EQUIPMENTS."); sound(200); delay(500); nosound(); delay(3000); break; } else { clrscr(); for(j=0;j<23;j++) { textcolor(5); gotoxy(20+j,12); cprintf("%c",ex[j]); sound(3000+j); delay(30); nosound(); } for(m=0;m<23;m++) { textcolor(3); gotoxy(20+m,13); cprintf("%c",ex3[m]); sound(1800+m); delay(30); nosound(); } for(k=0;k<34;k++) { textcolor(11); gotoxy(20+k,14); cprintf("%c",ex1[k]); sound(2000+k); delay(30); nosound(); } for(l=0;l<40;l++) { textcolor(12); gotoxy(20+l,15); cprintf("%c",ex2[l]); sound(2500+l); delay(30); nosound(); } textcolor(12+BLINK);gotoxy(40,40); cprintf(" PRESS ANY KEY."); getch(); outportb(p,0); exit(0); } default: clrscr(); sound(500); delay(100); nosound(); textcolor(9); gotoxy(30,12); cprintf("INVALID KEY PRESSED."); textcolor(11); gotoxy(33,14); cprintf(" WAIT FOR 2 SECONDS."); delay(3000); break; } main(); } void tone(void) { sound(1000); delay(100); nosound(); }

Related Source Codes

Script Name Author
The Game Opposite as seen on Nokia 2300 Mobile Manikanta
RECURSIVE BALANCED QUICK SORT ashish
Radix Sort ashish
Change your mouse pointer Ashim
The blinking star Shashank
Data Validation Crylittlebaby
To search a file by giving file type like mp3 or mpeg or doc Prashanth SR
Menus Demonstration B.Chidhambaram
Employee Database Project Using C. Reenku Raman Nayak
Creating a Lexical Analyzer in c fahad bader al-buhairi �դ ?�� ��??���
Calendar Program Omkar & Devendra
Stop double Process for start in C Cedrik Jurak
Stop double Process for start in C Cedrik Jurak
Time Scheduler Atiq Anwar
A timepass game between atmost two players Rahul Roy

A D V E R T I S E M E N T




Google Groups Subscribe to SourceCodesWorld - Techies Talk
Email:

Free eBook - Interview Questions: Get over 1,000 Interview Questions in an eBook for free when you join JobsAssist. Just click on the button below to join JobsAssist and you will immediately receive the Free eBook with thousands of Interview Questions in an ebook when you join.

New! Click here to Add your Code!


ASP Home | C Home | C++ Home | COBOL Home | Java Home | Pascal Home
Source Codes Home Page

 Advertisements  

Google Search

Google

Source Codes World.com is a part of Vyom Network.

Vyom Network : Web Hosting | Dedicated Server | Free SMS, GRE, GMAT, MBA | Online Exams | Freshers Jobs | Software Downloads | Interview Questions | Jobs, Discussions | Placement Papers | Free eBooks | Free eBooks | Free Business Info | Interview Questions | Free Tutorials | Arabic, French, German | IAS Preparation | Jokes, Songs, Fun | Free Classifieds | Free Recipes | Free Downloads | Bangalore Info | Tech Solutions | Project Outsourcing, Web Hosting | GATE Preparation | MBA Preparation | SAP Info | Software Testing | Google Logo Maker | Freshers Jobs

Sitemap | Privacy Policy | Terms and Conditions | Important Websites
Copyright ©2003-2024 SourceCodesWorld.com, All Rights Reserved.
Page URL: http://www.sourcecodesworld.com/source/show.asp?ScriptID=1060


Download Yahoo Messenger | Placement Papers | Free SMS | C Interview Questions | C++ Interview Questions | Quick2Host Review