Sadly none of his teachings were recorded in his life time. Hindu’s are good at memorizing things verbatim but the Buddha was not a great stickler for such rules. He only enjoined his disciples to accept his teachings on the basis of reason alone. So after a few decades there were discrepancies in the accounts of his followers about what they heard at the feet of the master. This had to be resolved before the teachings could be reduced into writing. Great councils were held for this purpose and thus begin the era of written teachings of the Buddha.
The Pali Scriptures that thus came into existence contained three different collections: the Sutta, the Vinaya and the Abhidhamma. The Sutta or the doctrine part is the real foundation of the system. Vinaya prescribed rules for monks and Abhidhamma only elaborated on the Sutta’s.
The suttas divide themselves into Nikayas. (1) Digha (long), (2) Majjhima (of middling length); (3) Samyutta (delivered at meetings by special people); (4) Anguttara (incremental); (5) Khuddaka (contains several segments). All these together belong to Sthaviravada or Theravada. ‘Thera’ meant elders and the works are a collection what’s remembered by the elders who have sat at the feet of the master and learned Dhamma.
The word Dhamma is used in four senses by the Buddhists: That is, about (1) Scriptures, (2) quality (3) causes and (4) unsubstantial and soulless, for the Buddhists the last one is the most important. it was the essence of the doctrine. Phenomena comes and goes, nothing is permanent all is transitory. The master did not bother to answer questions on the origin of the universe and the like. Buddha only intended to find out "What being what else is," "What happening what else happens" and "What not being what else is not."
So there is only dependent origination. Buddha began his search by asking in “How to know the Way to escape from this misery of decay and death.” Then it occurred to him “what being there, are decay and death, depending on what do they come?” As he thought deeply into the root of the matter, he came to realize that decay and death can only occur when there is birth and so on to 12 causes. It goes like this:
Misery is caused by birth- birth is caused by previous existence- previous existence is caused by clinging- clinging is caused by desire- desire is caused by feelings- feelings are caused by sense contact- sense contact is caused by six fields of contact- six fields of contact is caused by mind and body – mind and body is caused by consciousness- consciousness is caused by conformations- conformations are caused by ignorance. Buddha called this the Bhavachakra.