This week was to create a series of board with micro-controller to turn
on a output or read an input via some type of network. I chose to
use the rs232 FDTI serial cable to do asynchronous serial
communications to all of the boards.
To start this week I started with the basic hello 45 bus boards from
Neil. I used eagle to redesign both the bridge and node boards and then milled them on my LPFK S63.
In eagle I put all the parts in and then add labels to connect the nets
so that is can be exported to board layout part of eagle.
Once all the parts were on the schematic and
labeled I transferred to the board layout side and placed all the parts
on the board and placed all the traces on the board with the ground
plane.
Once the board was cut and populated it was time to try the code to see if it works.
populated bridge board
populated node boards
The next item i had to do is make the cable that connects the node boards to the bridge board. This cable is a 4 pin 2 x 2 header and isconnected to the power, ground, transmit and receive. All of the boards 4 pin header are the same pin orientations so when making the cable I made sure that orientations were all the same.
I first had to download the example code and flashed it to see if it works.
Once I
downloaded the c file and the make file it was time
to use the make file to compile the code.
To compile the code I used make -f hello.bus.45.make
The first time I flashed the code it did not work right. After looking at the code I found I had to change the line of code that has the device id.
Now that I changed the device id from 0 to 1 and 2 for the other nodes it works. I did have one issue with one of the attiny 45 it programed but would not communicate right but after I replaced the micro on the board it worked fine. To get everything working you must connect at least the bridge board to your computer via the rs232 FDTI cable and open the term.py python program. When running the python file if you typed in a number like 0 all boards will flash once and then the board that was identified as 0 will flash again and on the screen of the computer that number will be sent to it from that board.
week 15 from chris rohal on Vimeo.