Excerpts from Books and Wikipedia
"When metal later replaced bamboo, probably in the early 1100s, these lances became 'fire tubes' or 'eruptors.' The oldest record of them is a painting, dated to 1128. The early Chinese cannons could throw a ball about 50 yards (45 m). A century later they had become powerful enough to breach city walls, and were made of bronze. . . . Cannon technology spread and was developed in Europe; the Scots defended Stirling Castle with cannons in 1341, and three cannons were used at the battle of Crecy-en-Ponthieu in 1346 by England's King Edward III, who had more than a hundred of them in London." [1001 Inventions] The Battle of Zonchio in 1499 was the first naval battle that used cannons in ships. The Ottoman fleet defeated the Venetians. [Wikipedia: Timeline of Middle Ages]