Week Eight

Embeded Programming

Programming

Starting with reading the data sheet and other material about C i saw that this would take a while to learn. several versions of coding were used to make the darn thing blink but all only resulted i it LED being constantly on and not blinking also the button does nothing. Ive been going though allot of material to find out what the problem with my code is.


I found out what my problem was and it was not with my code at the time but with me forgetting a step in the programing that is basically i did not add program-usbtiny at the end, also the button needs to be pushed down a bit. but i managed to get the button to activate the LED. The datasheet assisted me mostly with organising wich pins to use and that they have multible perposes or are capable of being dedicated pins for certain tasks
and then figguring out how the timing works in the microcontroler.
DDRx is an 8-bit register which stores configuration information for the pins of Portx. Writing a 1 in the pin location in the DDRx makes the physical pin of that port an output pin and writing a 0 makes that pin an input pin.
that is uesd to set if pin is an out put or an input like for the botton in this program and Each physical pin of a port is configured independently and thus a port can have some of its pins configured as input an the others as output pins.>
What ive learned form reading a datasheet is that there is quite amount of math involved getting the right timing for the controler to speak at the rigth speed for the servo

Button blink code c file Button Blink Hex This is a step by step how to program with a make file in the comandptompt window Makefile for Embedded Programming Tutorial











All the links and referance materials (lots of reading)

Sites of Fabacademy students i referenced

##

home
Back to Top