We develop a theory of Tannakian Galois groups for t-motives and relate this to the theory of Frobenius semilinear difference equations. We show that the transcendence degree of the period matrix associated to a given t-motive is equal to the dimension of its Galois group. Using this result we prove that Carlitz logarithms of algebraic functions that are linearly independent over the rational function field are algebraically independent.