This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

7 segmnet with 80c51

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???

Parents
  • 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

Reply
  • 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

Children
  • 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...