This project consists on having a breadboard, the processor Atmega8 without any board, and in the act of programming it and permeating it with bluetooth communication for your personal projects.
So, in this image we can see the entire hardware used:
1 x USB ISP programmer (usbasp)
1 x atmega8
1 x itead bluetooth shield from arduino (containing the HC05 BT shield)
2 x ceramic capacitators
1 x external quartz oscilator of 16MHz
1 x led (color of your choosing)
- x wires
I am not covering here how to program the microcontroller with the ISP, but I'm leaving here the schematics with the pin layouts you need to do so, as well as all the command lines I needed to program it:
Here are the command lines:
An example of a batch file is made available at the end, as a makefile, to automatize the entire process.
The first image shows that my connections are already made. A special note to the necessity to use an external clock, because the one provided inside the uController does not have the resolution required to support the programming. Hence, a couple of .22 pF ceramic capacitators are needed, and linked to both the ground and the oscilator. From the oscilator, you link each of its "feet" to the XTAL 1 and 2 from the scheme above.
Next image shows the connections of the oscilator in a better way, as well as the led turned off.
The led will blink whenever it receives bluetooth communication:
Now, I connected my phone to it. the uController scans all the communications, and when the received communication is (in this case) a given character (in this case, the caracter 'x'), it will reply with an "ok" message: