i want a simple programe that multiply data of 2 ports(port 1&port 2) written in C
I hope this clears it up for you...
#include <8951.h> void main( void ) { unsigned int result; result = P1 * P2; }
--Cpt. Vince Foster 2nd Cannon Place Fort Marcy Park, VA
... you did not solve the problem yourself. If you do not it will be aggrevated cheating. At least if you admit where you got the answer, the instructor may just give you a 'F', not expel you.
Erik
when I was in school, we were instructed to write a UNIX shell. I have to admit, cheating did cross my mind :) I wouldn't expel somebody over an "hello world" progrma. Erik, please... :) :) :)
... and not grant diplomas to those that can not program/engineer, just copy.
of course, if the diploma read "web search" "forum use" or "copying", that would be another issue.
If this was a class assignment, you might want to give the teacher a more detailed answer to guarantee a grade worthy of your skills...
#include <http: //www.atmel.com/8951.pdf> /* define the cpu architecture */ auto code main( extern int cpu, static float oscillator ) reentrant using 8951 { far register bit *result;// use the cpu registers for fast multiplication // Remember to divide both sides by the cpu speed to keep the multiply // operator from going unstable: result / oscillator = (cpu.Port1 * cpu.Port2) / oscillator; if( cpu != (void)"Atmel" )// check to make sure it is the correct controller { result += (volatile) NULL;// adjust for other microcontrollers } // return the result as an embedded number ('enum') return( (enum)main->result ); goto main;// infinite loops are typical for embedded applications. }
What kind of class would assign such a lame task or question? And what kind of student would use an answer from 'the internet' without being able to understand if it is even in the ball park of being correct? If this question had to be asked, then clearly any answer would be blindly accepted not matter how ridicules it was.
Seriously, somebody please provide a link to such a class. This forum seems to get a lot of these 'classwork' type questions. I'd like to see what those classes expect of their students, and what the prerequisites must be.
Cpt. Vince, I give you a straight A !
View all questions in Keil forum