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

Multiple Tasks for the 8051

Hello there!
Iam a novice using the 8051 for a project and would like to know if it is possible to use just one 8051 to control the following functions:
-read in a signal from an inductive sensor used to measure the speed of rotation from a wheel, perform some calculations on the data and use this data to control a servomotor which requires a pulse width modulation.

-update the reading on a serial LCD connected to the Tx pin for serial communication after a certain number of pulses.

-a temperature sensor will be connected to one of the ports. The reading will be converted to a digital form using the ADC of the 8051 and used to display the temperature on 4 LED displays.

I'm thinking that it might not be possible to use one 8051 because some of the tasks are time critical. Is there a way of controlling all these components or is it impossible.
Lastly, if I were to buy an 8051, which of the models will you advise that I buy?

Pardon me for my naivety. Your response will be appreciated.

Parents
  • As others have said "how fast is fast?"

    I've encountered 8051 apps that have a far busier working day than this.

    If you choose your device carefully, the first task is easy. Many 8051s have a built-in PWM generator. Assuming your sensor produces a pulsed signal, connect it to an external interrupt. Then you can use one of the internal timers so keep track of the interval, and tweak the PWM in the service routine.

    Your LCDs should be happy with an update every 100ms or so, which you can set up using an interrupt triggered by another timer.

    Then you can run your ADC continuously from your main idle loop. There are many examples of ADC applications on the Keil site.

    I know it seems like a lot, but you'd be surprised what even a pokey 8051 can do, in a set ammount of time.

    SJC

Reply
  • As others have said "how fast is fast?"

    I've encountered 8051 apps that have a far busier working day than this.

    If you choose your device carefully, the first task is easy. Many 8051s have a built-in PWM generator. Assuming your sensor produces a pulsed signal, connect it to an external interrupt. Then you can use one of the internal timers so keep track of the interval, and tweak the PWM in the service routine.

    Your LCDs should be happy with an update every 100ms or so, which you can set up using an interrupt triggered by another timer.

    Then you can run your ADC continuously from your main idle loop. There are many examples of ADC applications on the Keil site.

    I know it seems like a lot, but you'd be surprised what even a pokey 8051 can do, in a set ammount of time.

    SJC

Children
No data