|
Intro to Physical Computing Syllabus code, circuits, & construction
|
Using the board the first thing you should do once the board is assembled is to make sure the siteplayer's working. To do this, power up the board and attach it to an ethernet network. If you get a link light and a power light, that's a good sign. Regardless of whether you do or not, the next step is top set the siteplayer's IP address. To do this, you'll need to understand the two jumpers next to the hex inverter Serial Routing Jumpers The six pins next to the hex inverter connect to the serial ports as follows:
By placing jumpers in the upper position (shown below), you enable the siteplayer to communicate to a PC via the DB9 connector. Both TX and RX are sent through the hex inverter, so the signal is properly inverted for RS-232 communication.
By placing the jumpers in the lower position (shown below), you enable the siteplayer to communicate with the PIC or BX-24. The signal is not inverted, so programming on either microcontroller must take this into account. Note that on the PIC, the serial connection is wired to pins RC6 (TX) and RC7 (RX), which are the hardware serial port pins for the 16F876 and 16F877. On the BX-24, the serial connection is wired to pins 11(RX) and 12 (TX). For the BX-24, programming must use COM3, set to these two pins, with the signal non-inverted.
To set the siteplayer's IP address, you'll need to use the Serial Tester application that comes with the siteplayer software. Configure the serial routing jumpers in the upper position and attach your board to a PC via a serial cable. Power the Board. Open the Serial Tester application. Click 'GET MAC" and the siteplayer's MAC address should show up in the info window. "GET IP" should give you the default siteplayer address, 192.168.1.250. Type in any address you want, click "SET IP", and the siteplayer will accept the new IP address. You're now ready to program the siteplayer. |
|
| Connecting to a Microcontroller
Once you've programmed the siteplayer, you'll want to make it speak to the PIC or BX-24. To do this, set the serial routing jumpers in the lower position. The following serial settings will allow the siteplayer to communicate with the PIC or the BX-24 at 9600 baud (the siteplayer serial port defaults to 9600): Settings for PIC 16F876/77: serout2 PORTC.6, 84, [outgoing data] serin2 PORTC.7, 84, [incopming data] Settings for BX-24: ' set up serial port: ' noninverted; not through hex inverter: call defineCom3(11,12,bx0000_1000) call openQueue(inputBuffer, 13) call openQueue(outputBuffer, 20) call openCom(3,9600,inputBuffer, outputBuffer) Connecting other components The siteplayer's I/O pins are connected to the first row of holes below the siteplayer itself on the board, should you wish to connect any external components to the siteplayer itself. In addition, there are a few holes along the bottom of the board that tap into the ground bus on the board, and a few holes along the top of the board that tap into the +5VDC bus. Similarly, the PIC's I/O pins are connected to the first row of holes on either side of the socket position on the PIC board. Note that the PIC's voltage, ground, oscillator (crystal), and reset pins are not connected to the side rows, but connected to the appropriate components on the board instead. The pins are connected appropriately for both the 16F876 and 16F877. Connections are visible on the upper (component) side of the board The BX-24's I/O pins are also connected to the first row of holes on either side of the socket position. Note that with the BX-24, all 24 pins are connected to side holes. This means you can add a programming socket if you want, or a reset button, or feed off the BX-24's power and ground pins (though I'd advise against that, and use the power and ground buses instead). The remaining holes on the board are open and unconnected, so you can mount other components as needed, via solder or wirewrap. |