i think that the following link will be useful to you
http://elinux.org/EBC_Exercise_10_Flashing_an_LED