Both hiragana and katakana developed from the ancient kana system man’yōgana, a kind of phonetic characters using kanji. Man’yōshū, a poetry anthology assembled in 759, is written in this early script.
Kana is traditionally said to have been invented by the Buddhist priest Kūkai in the 9th century. Kūkai certainly brought the Siddham script home on his return from China in 806; his interest in the sacred aspects of speech and writing led him to the conclusion that Japanese would be better represented by a phonetic alphabet than by the kanji which had been used up to that point.
The present set of kana and rules for their usage were codified in 1946.
Ja, mata ne.