"Functional PCBs are all alike; every dysfunctional board is dysfunctional in its own way."
This week was mostly about the final project, but I also had to get the weekly assignment done. The basic requirements seemed simple: mill a board, stuff, program, connect with two 4-wire rainbow cables. With the exception of some fuzzy traces, milling was a breeze, especially compared to the ordeal I went through with the board I milled this week for my final project. Stuffing was also easy; we ran out of 2x3 headers but I made some by cutting 2x5 headers in two (this way you also get a free 2x2 header!).
The problems began during programming. There weren't any problems with bridge board, but when I tried to program the node I got a peculiar error message:
Shahars-MacBook-Pro:13-NetworkingCommunications shahar$ make -f hello.bus.45.make program-usbtiny
avr-objcopy -O ihex hello.bus.45.out hello.bus.45.c.hex;\
avr-size --mcu=attiny45 --format=avr hello.bus.45.out
AVR Memory Usage
----------------
Device: attiny45
Program: 704 bytes (17.2% Full)
(.text + .data + .bootloader)
Data: 4 bytes (1.6% Full)
(.data + .bss + .noinit)
avrdude -p t45 -P usb -c usbtiny -U flash:w:hello.bus.45.c.hex
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x000000
avrdude: Yikes! Invalid device signature.
Double check connections and try again, or use -F to override
this check.
avrdude done. Thank you.
make: *** [program-usbtiny] Error 1
Replacing the ATTiny45 chip didn't help, but after doing so I noticed I had forgotten to solder one end of the capacitor, and, more importantly, the voltage leg of the 2x2 header that provided power during programming (you can actually see this in the photos). Soldering these two did the trick.
The boards were communicating with the host, but something was wrong: they both acted as if they were node 0, regardless of the nodeid I programmed into them. After inspecting Neil's board designs and photos more carefully, I realized I connected them wrong way: I used the 2x3 header instead of the 2x2 to connect the cable (which I mistakenly used to power the node board). So I made a proper connecter cable and now things (almost) work. Each board responds to its respective nodeid by flashing the right number of times, however, only typing '0' triggers an output to the terminal (e.g., typing '1' makes the node flash twice, but doesn't output 'node 1' to the terminal as it should). This is still under investigation. I also need to add another node, hopefully tomorrow. I re-soldered some header pins on the node and now it works as expected; re-soldering also enabled powering through the rainbow cable, which didn't work before. I then added a second node. That's all, folks!




