For this week's assignment I need to upload two programs to my previous designed micro controller board. We need to use two different softwares to program and upload a routine to the board.
First we need to check the datasheet from the microcontroller that is soldered in my board. The micro controller that we used is ATMega328
Above we see a photo of the board that was designed for the week 6. Next we read the datasheet of the ATMega328
The image above shows the datasheet of the top view of the microcontroller, this picture shows all the pins that the ATMega328 has. This is very useful because I can see how many digital pins has and how many analogic ones has. I can also see which communication protocols I can apply to this board.
Then I read the pin description, this is so I can have all the information clear.
I found also some information summarized here in the Digikey store, this information it is not detailed but it works to give you an idea of how it works. This is useful for works that doesn't require precision.
The block diagram shows us how does it works and gives you a basic idea oh what componente you may need to make it work properly.
I had some experience reading data sheets because I studied a mechatronic engineering career. In my career we had to built some circuits and we learned abotu electronic components like transistors, you can't use a transistor right if you don't read its data sheet, for example. By reading a datasheet I can learn all that I need to do two things with the micro controller, first integrate it into a circuit that will help me to use it, and the other thing is learning how I will program it.
With the information above I can have an idea of how this micro controller is used and programmed, this will be helpful in the next step of this assignment.
You can find the data sheet here
I will like to learn more from the oscillation of the crystal. How is it calculated? And how it affects the inner clock from the micro controller? This information is useful when you design a micro controller board like the one we did in previous weeks.
Above we can see the Roluino being used, ready to be programmed. The first programming language that I used is arduino C++ and arduino environment. I didn't used the FABISP that I previously did because It had a couple of details with the soldering that made a short circuit at times.
Above we are testing If our pins are corrected.
Then we program the code in arduino, is a very easy blink code.
You can download the arduino file here.
Below we have the video functioning.
The code work succesfully in the board.
Now I used the Atmel Studio environment to program the same blink. AtmelStduio uses another variation of C++ to program the board. Below we can see an screen shot of the code.
You can download the AtmelStudio blink file from here.
We can see success in both of the languages and programming environments.
Conclusions
It was a good activity for me. I've never programmed my own micro controller board. I got some trouble using the programmer I made to upload the software so I learn how to use an arduino uno withpout a programmer to work as a programmer for uploading the software. I got some difficulties with that at the beginning.