Home |
Weekly assignments |
Final project
week13:Networking and Communications
*assignment
-individual assignment:
design and build a wired and/or wireless network connecting at least two processors
-group assignment:
send a message between two projects
Wired communication between your projects
Honestly this week was really difficult for me to understand and get over.
So I chose to make and try 'Serial bus'(hello bus 45)-wired communication between projects.
And I'll explain until what I understand and did.
1.Making board.
Left picture is 'bridge board' and Right picture is 'node board'.
These are almost same but one thing(Ftdi header) is different.
The fuction of Bridge is to receive from compute and also 'transmit' the message which were received from computer to the node.
So that's why only 'bridge' need 'FTDI header'.
Because FTDI header needs for receiving from computer.
We need 1 bridge and 2 nodes.
So I made them.
Bridge schematic and board.
Node schematic and board.
Now that milling and soldering is quite easy thing to do(Though I know my soldering is not that clear hh).
But two things put me through trouble.
Attiny45 and LED
We don't have to care the direction of other things.
But we should care only two things(Attiny45 and LED).
Always confusing, which direction should I put attiny45 on the board.
I figured it out.
Circle(which is on the side of Attiny) is on RST.
So I should put circle on RST.
LED is also confusing.
I found green line(on Led) is to C.
The other side is to A.
2.Programming board
First I should make folders for each board.
So I need 3 folders(for bridge and 2 nodes, total 3 boards.)
Node0- for bridge
Node1- for one node
Node2- for the other node
Before explaining, I'll show you after programming.
After successing programming, you must have these 4 files.
Before doing that, we only have c file and make file.
With C file you can and have to make 'hex' and 'out' file.
But there's one thing you should remember and handle!!
Define
You should define the number of node.
So you should add 'define node_id '0' in the c file which is in 'node0' folder.
With the same process and logic, add define node_id '1' in the c file in 'node1' folder/
add define node_id '2' in the c file in 'node2' folder.
Programming in each folder
In each folder, open the git bash(for Window users).
And put 'make -f (the name of makefile)program-usbtiny'!!
For me, 'make -f hello.bus.45.c.make program-usbtiny'.
And then I got 'hex' and 'out' files that I showed first.
Result
Finally it works!
Thanks!!
Downloads
Bridge schematic
Bridge board
Node schematic
Node board