Programming with FTDI

programming start here in this I have to use the FTDI cable for making the communication to the board

I have one node board and one bridge board I take one board from abhijeet ,so now I have 3 board so one by one I programe these board with fabisp

First I connect the fabisp to the node board then I connect fabisp to the computer then I open the terminal and write the following command

I download the embedded c file from fab academy website and for these three board I need to change the program over there


Source:fab academy shedule

Now I explain the code

node id is hardcoded,node id for brodge is 0 and node id for node is 1 if another node is added then it could be harded to have node id 2 or any other number when the microctroller recives the node id through serial communication that is ftdi it respond to it by sending back akowledgemnt in form of node id here computer is master and microcontroller is slave and the node blinks different than bridge

In this I set the port for led and also set the portB for the rx and tx pin


Then I set the value "0" to the bridge board


Then I set the value "1" to the node board


In this code there is if condition loop means it cheaks the value of address and then it go further if the input address is match then that board is communication other wise it jump to next address to check the address for board.The below loop is main loop of node and bridge board in this loop first it recive the charactor then it compare the charactor with defined character in code if it is matched then led blink of that board otherwise it goes to the back code and again check the node_id or bridge_id.


then I open the terminal write the sudo make,sudo flash at that time I do change in programming t.e shown in below diagram.I change in programe ie set id as 1 for node 1

I programmed all the boards and gave them their unique ids, I used Neils make file from the schedule page and used avrdude to program the board.


I used this command sudo python term.py /dev/ttyUSB0 9600 here the port I am using is dev/ttyUSB0 just like COM20 in windows and the baudrate is 9600


when i enter this command then thre is one window open and i write in that the 0,1,2 and according with this adress run my board. but only 2 microcontrollers take the signal and node 2 is not workin but node 1 and bridge 0 is working

I used first time FTDI cable and because of the ftdi cable programming is more easy working video of my board

How it works.

here giving the identity to each node and bridge board. When something interacts in the serial lines it could be any random thing, each and every node listens to it and if it finds that the message is addressed to it, like by calling its name them it responds by by running the routine that is meant to run when it is called. From the computer we are sending a message in the serial communication channel. This message is the name of the node, both the nodes listen to it but the once whose name is the called responds by blinking differently and sending response string.

Modification in code for different pattern of led blinking

In above code I understand how code works but this code is neils code so now i change that code for different pattern I modified the code to blink twice for acknowledgement

the modified code-In this code I first declare the function for my new patern this halfdelay_(50)is for the blink twice


after declaration part I called that function in main loop

HTML5 Icon

In above neils code I modified that code but it takes long for me to be experties in making code.

Learning outcomes

This is the first networking in the whole my education means when I was in last year of my college then we have one subject networking .At that time I know the basic information but how it practically work I understand in this assignment