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.
Hello,
I want to programm the interrups for the at89c51cc03 in C. But I can't find how i have to do this.
i have the configuration from the datasheet. but how look the "interrupt funktion header"??
There is nothing in standard 'C' about interrupts - therefore it will always be implementation-specific and you will always have to refer to the appropriate Compiler Manual.
In this case, it's: http://www.keil.com/support/man/docs/c51/c51_le_interruptfuncs.htm
See also: http://www.keil.com/download/
thanks.. but for what stands interrupt 1 using 2 behind the (void)
but for what stands interrupt 1 using 2 behind the (void)
That should all be explained in the text surrounding the code snippet.
The interrupt keyword tells the compiler that the following function is, in fact, an interrupt service routine that services the interrupt with the given number.
The using keyword tells the compiler that the function shall use the specified register bank.
Detailed explanations can be found in the compiler manual, as they would be way too long to post here.
There is a 'Search' facility on this website - it includes the online manuals.
All of the manuals are available online here: http://www.keil.com/support/man/
From there, you can easily find the C51 Compiler manual: http://www.keil.com/support/man/docs/c51/
Look at the contents list down the left-hand side.
Clearly, neither interrupt nor using are standard keywords - so look in the section on "Language Extensions": http://www.keil.com/support/man/docs/c51/c51_extensions.htm
Note that one of the bullet points is called "Function Attributes" - try that link!
There is also a list of all the keyword extensions here: http://www.keil.com/support/man/docs/c51/c51_le_keywords.htm
You don't have to learn the manual by heart, but you need to spend some time studying it so that you know where to find things!
why should i learn: "How to use the manual" while there is a forum where i can ask the user ;)
back to topic: thanks for the fast reply. i will look there i find the time ;)
Because most users will find it impolite if you ask them to read the manual to you. Usually, if you do not want to deal with the specifics of the compiler or the hardware, you go and hire (that implies paying for the service) a consultant.
Also, the manual will give you much, much more detailed answers to many, many questions in much, much shorter time than this forum will.
but most users know exactly the answer, why should i use hours for hours to search for the answer?
but know i've got the answer ;)
thanks a lot
Because then you will know where to find the answer and where to refer to if you have more questions.
And why should other users waste their (possibly valuable) time explaining something that is explained in very excruciating detail in the one document that every user of the compiler should read before typing the first character of a program ?
Because, sooner or later, people will realise that you're just wasting their time, and will stop doing your work for you.
especially as you've stated it so clearly and explicitly yourself!
why should i use hours for hours to search for the answer?
because in the search for the answer you need right now, you will learn where to find the answers to future questions.
Nobody I know will know everyting in the manuals, but any decent user will know (or, at least, have an idea) where in the manuals to look for an answer.
Familiarrity with the manuals is essential to being productive.
Erik
I posted the above before I realized you has posted the same in a post below the one I replied to.
Repetition is the mother of all studies. Things like the above cannot be stressed enough.