It is said that 8051 has an on-chip oscillator but requires external clock to run it. What may be the internal circuit for on-chip oscillator, how it runs after connecting crystal oscillator? Also what is the purpose of external capacitor with crystal oscillator?
The book clearly mentions that The 8051 has an on-chip oscillator but requires an external clock to run it.
To go into more details, i think you need to refer to operating principle of Oscillators. Just high-lighting few points here: Oscillators are the closed loop circuits that generate sustained output oscillations of a constant frequency (as per the theory). But there is an AC noise signal present at the input which is actually being amplified using feedback(oscillators have gain slightly more than 1) and the output frequency depends upon the resonant circuit(combination of R/L/C).
So the point is, even an oscillator requires an input signal. In the TTL oscillator circuit, the terminals of the component pick up the ac noise, which is amplified and fedback to the input. But in an IC, where the circuit is integrated, no input will be present for the oscillator circuit. Hence a external crystal or an RC oscillator is required.
An IC can manage quite well without having any external crystal or RC oscillator.
While a TTL circuit can oscillate without any noise. An inverter can be designed to always power up with the output in a fixed state - but if that output is connected to the input, the chip will then see a reason to invert. So toggle the output. Which will again make it see a reason to invert, and toggle the output. The timing here controlled by the delay in the TTL logic.
The crystal is there to define the oscillating frequency, just because a crystal is extremely exact (at least when compared to an RC circuit). Chips with internal RC oscillators can manage well enough for UART communication by having the internal RC components laser-trimmed to better than 0.5% precision.
An oscillator obviously need an amplitude larger than 1. But depending on design, it needn't be close to 1. The TTL inverter have an amplification that is way much more than 1. It's just that the amplification needs to happen in a bandwidth span where you the phase change between in and out is enough.
Back to noise - for lots of crystal oscillators, noise is the only way that makes the crystal start to spin up the oscillation. And that is why some processors may fail badly to start the oscillator with some crystals or with some power-up speeds. So with a slow power-up, the drive pin can slowly ramp op the signal but there isn't enough signal seen on the oscillator input pin to magnify and feed back.
Another issue is of course that a crystal may oscillate at the fundamental frequency - but can also have overtone oscillation. So burden capacitors and filtering of the input signal can result in a circuit that always locks onto the same frequency. Or sometimes starts with fundamental and sometimes overtone frequency.
"The 8051 has an on-chip oscillator but requires an external clock to run it"
That is wrong.
The on-chip oscillator most certainly can (and, very often, does) run without an external clock!
In fact, I would suspect that most 8051 applications use just a crystal and do not use an external clock?
A crystal (as explained in my earlier link) simply provides the resonant element for the internal oscillator circuit.
The internal circuit is designed to ensure that it will start oscillating. The specific device Datasheet will contain details of how long to allow for the oscillations to become stable...
In fact, I would suspect that most 8051 applications use just a crystal and do not use an external clock Depends on the manufacturer and IC. (refer to the respective datasheet).
The original 8051 architecture was designed such that crystal or RC oscillator or an external clock generation circuit can be used as clock input to 8051.
The specific device Datasheet will contain details of how long to allow for the oscillations to become stable... The reference text books explaining the 8051 architecture don't contain any such topic or even a Note mentioning this. And the OP is a newbie, may be a student who has just started studying from the book (he has posted the link).
.
In the TTL oscillator circuit, the terminals of the component pick up the ac noise, which is amplified and fedback to the input.
Meant RC Oscillator and not TTL. Note was about the RC oscillators which are AC circuits.
An oscillator obviously need an amplitude larger than 1. But depending on design, it needn't be close to 1. The TTL inverter have an amplification that is way much more than 1.
oscillators have gain slightly more than 1. The amplitude must be definitely more than 1 (if units is Volts)
"The original 8051 architecture was designed such that crystal, or RC oscillator, or an external clock generation circuit can be used as clock input to 8051"
Yes. Exactly.
So it is incorrect to say that it requires an external clock to run it.
Sure, an external clock can be used, but it is not required.
That was my point.
"RC oscillators ... are AC circuits"
As is a crystal oscillator - the crystal provides the resonant element, as does the RC in an RC oscillator.