To build a wired &/or wireless network connecting at least two processors.
We have been making PCB boards with individual micro-controller to do something on its own so far (whether input or output or using it as an ISP). This week, we learn how to build a network using two or more micro-controller boards and to have them talk to one another. In simple term we learnt how to communicate with more than one micro-controllers.
Some of the different methods of networking and communication discussed in class are listed as follow:
I would probably explore the I2C communication and follow by Asynchronous Serial communication (which are between one master ATtiny 45 controller board and two slave ATtiny 45 boards).
The I2C bus is a half-duplex, synchronous, multi-master bus requiring only two signal wires: data (SDA) and clock (SCL). These lines are pulled high via pull-up resistors and controlled by the hardware via open-drain drivers, giving a wired-AND interface. I2C uses an addressable communications protocol that allows the master to communicate with individual slaves using a 7-bit or 10-bit address. During communication with slave devices, the master generates all clock signals for both communication to and from the slave.
Each communication begins with the master generating a start condition, an 8-bit data word, an acknowledge bit, followed by a stop condition or a repeated start. Each data bit transition takes place while SCL is low, except for the start and stop conditions.
The start condition is a high-to-low transition of the SDA line while the SCL line is high. A stop condition is a low-to-high transition of the SDA line while the SCL line is high. The acknowledge bit is generated by the receiver of the message by pulling the SDA line low while the master releases the line and allows it to float high. If the master reads the acknowledge bit as high, it should consider the last communication word not received and take appropriate action, including possibly resending the data.
I would be referring to Neil's boards and using all ATtiny45 micro-controllers in my I2C communication boards design.
Similarly for this study, I would be referring to Prof. Neil's boards in making the bridge board and two node boards.
At first we attempted to flash the bridge and nodes using Prof. Neil's code available in the class webpage for this week on Asynchronous Network Communication. The results were irregular. No matter what key/ character had been "pressed", three LED all blinked. But serial monitor shown no feedback data at all. So we decided to proceed to rewrite the code in Arduino to see how was the responses.
As such we turn to use Aduino IDE and wrote a similar code to emulate the '0'pressed equal to node0 and '1' pressed equal to node1 and '2' represent node2. I would like to say that we have succeeded in producing the code in IDE that could replicate what was being shown in the class video, but in actual fact we are not. When the numbers (0,1, and 2) being pressed, the LEDs on each node take turn to lit up. But there was no display at neither the serial monitor or the term.py. Till the moment when writing this report, I can only satisfied with the result of individual LED was able to lit up in response to the nodes and master board number. A video clip of the results is as shown.
After completed the Arduino testing, we were almost ran out of clue and idea what other thing that could have gone wrong, so we decided to try out Neil's c code one more time before going to seek for advise from our local instructor. Guess what, the code suddenly work with slight flaws on node2 where the returns are garbage. Our findings are as captured in video clip2 as follow:
Electronic weeks were the most hectic for me, it is no different for this week exercise. I was hopeful that, I can learnt something which can be directly applicable in my Final project. But rather, ending up struggle with Asychronous communication network troubleshooting.