We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
how we use single pin in any port by using c program for 89s51
<coce>
bit portpin;
portpin = P1^3;
portpin = 1;
portpin = 0;
<endCode>
bit portpin; portpin = P1^3;
No, that is wrong.
Look up the correct syntax in the Manual
Hint: use sbit for SFR bits...
i give you detailes for mista neil missed
yes this is good and compilies.
<Cod>
sbit portpin;
portpin = 81^3;
porpin = 0;
<enCode>
or ( count = 1 ; count <> 100 ; count = count - 1 ) { sempaptop ( count / 1 ) ;
add___to_ variable ( mik , 7 ) ;
}
return mik + count;
<code> or ( count = 1 ; count <> 100 ; count = count - 1 ) { sempaptop ( count / 1 ) ; </code>
Has the C51 compiler learned to mix Pascal and C?
And what is the magic keyword "or"?
You still haven't noticed that this forum does not recognise a "<Cod>" tag?
And that the instructions on how to post source code are clearly stated before your very eyes:
www.danlhenry.com/.../keil_code.png
So it's not surprising to find that you've still got the details of defining an sbit wrong!
sbit portpin; portpin = 81^3;
But don't take my word for it - read it for yourself in the manual: http://www.keil.com/support/man/docs/c51/c51_le_sbit.htm
how we use single pin in any port by using c program for 89s51 anyone that has even seen the manual, should know that.
<coce> whatever that is bit portpin portpin = P1^3;
and that is dead wrong
Erik
You mean <coce>, <endCode>, <Cod> and <enCode> and I just couldn't stop myself from using <code> and </code>
sory for the bad typeing before
this code compillews very good
<SORCE>
#defin sfr 81 #define bit 3 #define
#bit portpin = sfr^ bit.
ortpine = 1;
portpn = 0;
<END_SUORCE>
ok, this is some kind of a joke, right? by the way, <SORCE> should be <SOURCE> and <END_SUORCE> should be <END_SOURCE>. And believe me, it is not your typing...
But they still aren't the correct tags for use on this forum!
The correct tags to use are very clearly stated directly above the message entry box:
If that's not clear enough, there is also a link to further "Tips for Posting Messages" http://www.keil.com/forum/tips.asp
And the 'Preview' will clearly show whether or not you've got it right.
Anyone who really can't get this right after 3 attempts is clearly either having a laugh, or totally unsuited to any kind of programming! Maybe both...
No, it does not!
Actually it may compile, just not if you are using Keil.
After all, we have (had) quite a few jokers that post things not related to Keil in the Keil forum.
It is really funny to watch some of the threads. The solutions are simple and straightforward but the meandering about the solution goes on for pages, usually involving the right way to post codes or the use of the english language
The solutions are simple and straightforward but the meandering about the solution goes on for pages, usually involving the right way to post codes or the use of the english language 1) "The solution is simple and straightforward" and thus show that the OP did not bother to read the manual, let alone go through the "getting started guide". 2) if anyone after being told about "the right way to post code" would do so, there would be one and only one post on that subject. 3) nobody discuss "the use of the english language" but using SMS in a professional forum is abnomiable.
And "abnomiable" must be a new word for me to learn :p
Sounds like a math term - the dividable binomial?