I am learning ASM and have to implement a 7 segement display control in ASM language using a sillicon labs C8051F330D and I have to do it as a RTOS Real time operating system using timer 2, does anypne have an example of using timer 2 or setting up a RTOS system with the 8051???
is it enough if we send a finished program?
Yes sure, that would be great and would help me understand it and learn!!
neither
"I am learning ASM"
If you're just learning, you need to begin at the beginning with the basic stuff - and an RTOS most certainly does not count as basic stuff!!
These tutorials cover the basics: www.8052.com/tut8051.phtml www.8052.com/tut8052.phtml
"implement a 7 segement display control"
What does that actually mean?
What, exactly, do you need to "control" about the 7-segment display?
You can't begin to solve a problem in any language before you have a proper definition of what the problem is!
I do know the basics of ASM
I can make leds blink, make calls, make macros, I can move numbers and letters around 4 seven segment displays
But fot this university project I have to be able to write any word on 4 seven segement displays using Sillicon Labs C8051F330D using a RTOS based of Timer 2 interrupt
But what else are you going to do?
Just using a timer and displaying data on a display doesn't require an RTOS.
Do you mean you have to create the RTOS, and then this is just a simple application to demonstrate it?
Yes the teacher told us whe have to do and RTOS using timer 2 to be able to display any word we want on 4 seven segement displays and later in the course we will add and ADC DAC and 4 stepper motors
but for the next 4 weeks I have to make the RTOS using time2, and I know how to display words in the 4 seven segement display but using delay and other routines, not using timer 2 or an RTOS
IF your teacher told you, then you need to refer to your class notes, reading list, etc.
Teachers give assignments like this to test that what's been taught has actually gone in.
If you don't understand the assignment, you need to talk to your teacher to get it clarified.
Once you have "done" this RTOS it will, of course, be your RTOS - so you should know implicitly how to use it! And, since it is your RTOS, nobody else will know how to use it unless you provide full documentation!
The problem is whe have had only two clases and on clases we discuss totally diferent subjects, having to do with computer architecture and other things that do help us, but have nothing to do with the RTOS, so we have to find on our own how to do the RTOS using Timer 2 and I am having a really ahard time figuring it out
I think you have mentioned timer 2 seven times in your posts. That is not a very important fact. An RTOS should have a time base, but can use almost any time base that is available.
Focus instead on what an RTOS does.
Have you googled for RTOS - and for example read the wikipedia information?
If you already know how to write assembler programs, then it shouldn't be too hard to write a timer-based scheduler to switch round-robing between pending jobs each tick.
After that, it shouldn't be so much harder to give the different tasks a priority, and allow them to wait for events - for example available serial data. While waiting, lower-prioritized tasks will be processed round-robin, and as soon as you get an ADC conversion interrupt, UART rx interrupt or similar, the interrupt handler unblocks any pending "consumer" task, that takes care of the ADC value or received character.
"The problem is whe have had only two clases and on clases we discuss totally diferent subjects"
and you haven't been given any suggested reading?
it seems very strange that you would be given specific instruction to use Timer-2 but no other guidance at all...
I am going to assume you are Not writing a RTOS, by your responses to the questions. What RTOS are you asking about? The Keil one? If so look for samples it installed. And look at the manual. Then ask specific questions. The internet hates to do homework.
Yes I do have to write an RTOS that manages 4 7 segmnet display, 8 leds, 1 ADC 1 DAC a keyboard and 4 stepper motors, I hace to start by managing the 4 7 segement displays
Writing an RTOS is not a simple task. You can not do it without a lot of instruction. Just using one requires some instruction. In this case if you have to ask you can't. You must have been given some instruction and reference material. Step 1 is the scheduler ( Task manager). But there are several kinds. I can assume you are doing co-operative multi-tasking. This would be the simplest. But again there is no one solution.