Embedded Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsComputer HardwareEmbedded Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old April 21st, 2011, 09:47 AM
shreeram1802 shreeram1802 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2011
Posts: 1 shreeram1802 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 19 m 8 sec
Reputation Power: 0
Embedded Arm7 Programming For Lpc2148

Hi,
I have written a code in c++ but due to my lack of knowledge in embedded programming for lpc2148 i am not able to do it...
I would like to get this code converted into embedded.... urgently required...
the code is as follows.


#include<iostream.h>
#include<conio.h>
#include<dos.h>
float ph,ph_new,valve1,valve2,err=0;
void main()
{
clrscr();
Again:
cout<<"\nEnter the ph"<<endl;
cin>>ph;
ph=ph+err;
if (ph<7 && ph>4.9)
{
valve1=(350-(50*ph));
cout<<"The valve opening is"<<valve1 <<endl;
delay(2000);
}
else
if (ph>7.5 && ph<9.1)
{
valve2=((100*ph)-760)/1.4;
cout<<"The valve opening is"<<valve2 <<endl;
delay(2000);
}
else
{
cout<<"\nInvalid Input"<<endl;
}
cout<<"\nThe current value of ph is";
cin>>ph_new;
err=ph_new-7;
goto Again;

}

Reply With Quote
Reply

Viewing: Dev Shed ForumsComputer HardwareEmbedded Programming > Embedded Arm7 Programming For Lpc2148

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap