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.
Hi,
There is an application note on using the interrupt vectors in C51 c programming for 8051. It goes like this-
unsigned int int_count; unsigned char second;
void timer0 (void) interrupt 1 using 2 { if (++int_count == 4000) { /* count to 4000 */ second++; /* second counter */ int_count = 0; /* clear interrupt counter */ } }
Can anyone explain what does that "using 2" at the end of the function denote?
I understand that interrupt 1 specifies that this is the ISR for interrupt number for timer0 overflow at adress 000Bh. Does the last keyword "using 2" denote the polling priority of the interrupt?
TIA, Mrunmoy
"ARM7 ... are actually cheaper than the 8051s"
You can't just say that without qualification!
I think you mean, "some ARM7s are actually cheaper than some 8051s."
Both ARM7 and 8051 cores are available in an extremely wide range of devices, and there is certainly an overlap between the lower range of ARMs and the higher range of 8051s...
In this case, I think the price doesn't matter, since we are talking about learning to program a microcontroller.
The '51 core has been available for quite a number of years now, but it will not disapear too soon, because of widespread use and gazillions of variants. Hence, it is a good processor for learning embedded programming. Especially since it very clearly shows the difference between embedded and workstation programming.
The '51 core has been available for quite a number of years now, but it will not disapear too soon, because of widespread use and gazillions of variants
true, AND a new derivative is introduced almost every day.
in addition to the 'processor only derivatives' all kinds of combos are coming out: BB (now TI) chose the '51 architecture when they came out with the first 24 bit a/d intefrated with a uC IR chose the '51 for their "integrated washer-dryer" power solutions Nordic chose the '51 for their UC radio con=mbination A?D has some '51 combos ..........
I do believe that every year since it's introduction (including 2006) more '51s have been used than the year before. It is a fact (that microchip obfusciates) that when you add all the brands of the '51 together it is the most used processor in the world.
Erik
I wrote: "ARM7 ... are actually cheaper than the 8051s"
Andy replied: "You can't just say that without qualification!"
In which he is correct.
The higher-end 8051s, like the 64Kb Flash devices, e.g., the P89C668 (recently discontinued), the RD2 and RE2 (an Atmel vaporware), overlap with many ARM7 families in price, like the LPC21xx and LPC23xx from Philips. The remarkable thing is that for US8.22 you get a LPC2368 with 72MIPS, 32bit core with full speed Ethernet, USB and CAN for less than a P89C668 and slightly more than a P89V664. But there are 8051s that cost around U$1.00, and there are also ARM7s that cost around U$1.50.
But I agree with all what was said about the relevance of mastering the 8051 core. Although it is one of the first uC cores still in action, it has an impressive number of derivatives, and if you want you can get a single-cycle 8051 that runs at 200MHz.
I agree with Erik that you must know the chip and the toolchain, and not use them outside their limits. For example, the classic '51 and all its C compilers are really bad at floating point and math-intensive apps, like filtering, but are very good at control apps and 8/16bit math.
I think that a systems designer must be knowledgeable in many platforms. The '51s have many hardware and software peculiarities, and you must know them. I like Microchip cores very much also, and have developed quite many systems for all PIC families. The ARM core implementations available are very interesting, and you should know them also, if you are serious about system development. Every architecture has its strong and weak points, and you must explore and apply the right mindset to each one. What is a completely prohibitive approach for one core is natural and fast for another.
So, I should take 8051 and understand its software architecture in C first.
I believe its not a big deal to work on any microcontroller based designs. Because, if you do one design from starting to end. Its just the same in all others. The only things that we should keep in mind are the design checklists. I mean, personally I think that given a concept, I can prototype it with the right choice of micro and it depends a lot on the requirements of the customer.
The datasheets and application notes give it all that is required to design. And the best part are the people like you who are ready to provide help on concepts online.
Thanks, thanks a lot for all your concepts and discussions in this thread that i posted. I wish I could meet such seasoned technical people like you and get some good tips for design. That would give me more confidence on myself.
Dear All,
If you do not mind then I would like to have your contact details, so that i can post my questions to you directly.
Jonny Doin Jason Daniel Per Westermark Andy Neil Erik Malund
Kindly provide me your details.
Best Regards, Mrunmoy.
I believe its not a big deal to work on any microcontroller based designs. Because, if you do one design from starting to end. Its just the same in all others what a load of CRAP.
If you are one of the best at the PIC and get thrown into a '51 design, your firts attempt will, at best, be mediocre. That said, there is nothing hindering that you can, eventually, become proficient in both.
and deprive all other members of the information?
discussing through a forum has many purposes, let me mention two 1) others may pick up valueable information. I have learned much by seing information posted I was not aware of and did not even think of asking about. e.g. I have picked up a technique or two where I had no idea that a more efficient way than mine (and many others) "tried and true" method existed. 2) if someone makes a wrong reply it is (almost) immediately corrected.
So, please do not suggest taking this discussion off the forum
Mrunmoy,
Given the nature of your job situation, I can understand that you might want to ask some questions privately. You can email me at jdaniel@NOSPAM.ieee.org. (Remove the NOSPAM. to get my real address). That being said, please take the advice of others about the forum: If you're going to ask a technical question, do it here so that others who have similar concerns will be able to find it and learn from it.
-Jay Daniel
Thanks Daniel.
But as Erik said. Everyone should get benefited by the technical discussions in this forum. I will post all technical questions in here.
I agree 100% to you Erik, that I should post all the technical questions here. Because even i got benefited by the answers that all of you have posted.
But, what i said was not crap. At least a seasoned person like you shouldn't be saying that. Pls. don't take it otherwise, i am not blaming anyone here.
If you can do one design well, even if it is a small one, you'd definitely do the big design well. I mean a microcontroller will always be a microcontroller no matter how many extra features it has. It all depends upon how well one has understood and comprehended that first design. We make mistakes but, these mistakes teach us good lessons.
After all, everything starts small and grows big. Don't you agree with that Erik?
Jay,
Sorry for referring you with your last name.
"I should post all the technical questions here."
Actually, this forum should only be used for discussions specifically about Keil products - see: http://www.keil.com/forum/
For general discussions about the 8051/2 family, you could try: http://www.8052.com/forum
See also: http://www.keil.com/forum/otherforums.asp
If you can do one design well, even if it is a small one, you'd definitely do the big design well. and the moon is made of green cheese. That you get 'blinky' to work, by no means make you qualified for a big job.
I mean a microcontroller will always be a microcontroller no matter how many extra features it has. there is NO SUCH THING AS "A" microcontroller e.g. a PIC and a '51 are as different as ... no, a hundered times more different than an apple and an orange.
We make mistakes but, these mistakes teach us good lessons. correct
After all, everything starts small and grows big. usually.
Actually, this forum should only be used for discussions specifically about Keil products...
But a higher number of high-quality technical discussions that are handled on _this_ forum, will result in a correspondingly fewer number of people who will visit other forums where they may accidentaly get recommendations to look at products by IA<beep> or similar.
Strictly speaking, it would be advantageous for Keil to allow general-purpose embedded discussions, possibly allowing people to filter away these threads if not interested. The cust of running a forum is not proportional to volume of posts.
After all, everything starts small and grows big.
Like the list of open bugz in Bugzilla? :)