Bully Board
From Ece
Warning: information on the page is old and no longer maintained!
The Bully Board is a library of PCBs for use at MSU to make prototyping new designs faster and to enable students to build a library of PCBs resulting from classes they take. The system consists of a baseboard and a number of "personality modules" which plug into the base board. Each board is described below.
Contents |
USB PIC
The USB PIC personality module contains a full-speed USB-capable PIC plus the necessary supporting circuitry.
Software
You need the Microchip MPLAB IDE (tested with v7.61) and the Microchip C18 compiler (tested with v. 3.12) to develop and compile code for the PIC. A MSU USB library based on Microchip's AN956 makes the USB PIC appear to be a serial port. The Microchip bootloader allows users to rapidly program the USB PIC with their code with an easy-to-use Windows GUI.
Getting started
- Install the MPLAB IDE and the C18 compiler using the links in the paragraph above. Be sure to install the compiler after installing the IDE. Next, on the Microchip Custom Driver page, download and install the MCHPFSUSSB_Setup.zip which includes the necessary bootloader and app notes. Install all the software in its default location; the rest of these instructions depends on using the default installation paths.
- Unzip the MSU USB library. Follow the one-time setup instructions for MPLAB.
- Program the PIC with the
USB_bootloader_xxxx.hex(where xxxx = the particular chip you're using) from thebindirectory in the MSU USB library using the programmer in the micro lab, a Pickit2, or an ICD2. - Plug in the PIC. Triple-click the reset button to go to the bootloader (NOTE: If code is already loaded, double-clicking the reset button puts the PIC into bootloader mode). Windows will ask to install a driver; pick the one which comes with the Microchip bootloader at
C:\MCHPFSUSB\Pc\MCHPUSB Driver\Release. See the Microchip PICDEM FS USB User's guide, page 14 (page 18 in the PDF) and following for detailed instructions. - Open the Microchip USB bootloader Windows GUI at
C:\MCHPFSUSB\Pc\Pdfsusb\PDFUSB.exe. In the Bootload mode tab, click the drop-down box. If everything's working right, you'll see the entry PICDEM FS USB0 (Boot); choose that. Load thebin/echo_xxxx.hexfile from the MSU USB library the program it. See the Microchip PICDEM FS USB User's guide page 26 (page 30 of the PDF) for more instructions on the operation of the bootloader. - Open up Hyperterminal and note what COM ports currently exist.
- Single-click the reset button to run the echo program. Windows will ask to install a driver; pick the one which comes with AN956 at
C:\MCHPFSUSB\fw\Cdc\inf\win2k_winxp. Instructions are similar to those in the Microchip PICDEM FS USB User's guide, page 14 (page 18 in the PDF), but the path to the driver ofC:\MCHPFSUSB\fw\Cdc\inf\win2k_winxpdiffers from the instructions. - Go back to Hyperterminal and look for a new COM port. Use that; the baud rate/data bits/handshaking/etc. doesn't matter; just use the defaults.
- Press any key. You should see the message
MSU USB ready; further keypresses will echo the key preseed. If no key is pressed for more than 1 second, theWaiting...message will be printed.
Congratulations! The PIC USB over serial system is now working. To use it:
- Before resetting your PIC, click the disconnect icon
.
- Reset your PIC. You should hear the USB unplug sound followed by the plug-in sound.
- If you want to run the program you wrote again, single-click the reset button.
- If you want to run the bootloader, double-click the reset button. Update your code using the bootloader then single-click when finished to run the updated code.
- Click the call icon
. Press the spacebar to get the "MSU USB ready" message. Return to step 1 and repeat.
IMPORTANT: first click disconnect, then reset the PIC, then click connect. Resetting the PIC without doing a disconnect first creates an additional COM port. To fix this, disconnect, reset the PIC, then reconnect / call. HyperTerminal may get confused and hang; if so, quit and restart it.
Source code
Source code for the MSU USB library contains:
- The echo program - demonstrates use of the USB to UART library. Use this as a base project for all your USB-to-serial projects.
- The robot program - contains code to send and receive data from Matlab using the Matlab interface.
- The USB to UART library.
- The MSU USB bootloader.
Note that the file usbdrv.h, included with both the bootloader and the serial port firmware, contains a bug.
Hardware
| Qty. | Description | Part number | Reference Designator | Price (qty 100) |
|---|---|---|---|---|
| 1 | 20 MHz crystal | Digi-Key 300-6042-ND | Q1 | $0.50 |
| 2 | 15 pF capacitors | Digi-Key 490-3691-ND | C3 and C4 | $0.1455 |
| 1 | 22 uF capactor | Digi-Key P819-ND | C6 | $0.0721 |
| 1 | 0.22 uF (220 nF) capacitor | Digi-Key P4966-ND | C5 | $0.1003 |
| 2 | 0.1uF cap | Digi-Key 399-2127-ND - not in stock Digi-Key 399-4151-ND | C1 and C2 | $0.0863 |
| 1 | 500 mA fast-acting axial fuse | Digi-Key F2311-ND | JP2 | $0.3555 |
| 1 | Pushbutton momentary on | Digi-Key P8009S-ND | S1 | $0.1898 |
| 1 | PIC18(L)F2450/2455/2550 | Digi-Key PIC18LF2450-I/SP-ND | IC1* | $3.84 |
| 1 | PIC18(L)F4450/4455/4550 | IC2* | ||
| 1 | 10K resistor | R1 | ||
| 1 | 470 ohm resistor | R2 | ||
| 0 | RJ-11 jack for ICD2 (optional) | Digi-Key WM5412-ND | J1 | $0.6360 |
| 1 | single-row 6-position header for the PicKit2 | Digi-Key WM4004-ND | JP1 | $0.3856 |
| 1/2 | single-row header, 36 positions, to populate headers | Digi-Key S1011E-36-ND | JP4, JP3 | $1.113 |
| 1/2 | single-row socket, 64 positions | Digi-Key ED7064-ND | IC1, IC2, JP2 | $2.688 |
| 1 | LEDs, size T1, axial | Digi-Key 516-1299-ND | D1 | $0.1680 |
| 5 | Jumper shorting blocks | Digi-Key A26228-ND | Use in JP2, JP3, JP4 | $0.0712 |
| 1 | USB mini-B right-angle receptacle, through-hole | Digi-Key WM17115-ND | X1 | $1.1668 |
Notes:
* IC1 is 28 DIP, and IC2 is 40 DIP. Install either IC1 or IC2 in sockets.
** D2 should be no-installed; short a wire across its terminals.
Cost is $9.62 for parts (last updated 17 July 2007).
Misc notes
- The MCLR_ connection current used was roughly based on ideas in chapter 3 of the PICkit 2 Microcontroller Programmer User's Guide. However, the Schottky diode suggested in the schematic was replaced with an LED, which is a bad thing -- the purpose of the Schottky is to drop a low voltage drop, rapid turn-on to protect a power-on reset chip. Microchip's AN820 has a very good discussion of the rationale behind this circuitry.
- For more information on oscillators with PICs, see AN943, "Practical PICmicro® Oscillator Analysis and Design." This assumes knowledge of AN826, "Crystal Oscillator Basics and Crystal Selection for rfPIC™ and PICmicro® Devices" and AN849, "Basic PICmicro® Oscillator Design".
- AN943 focuses more on aging / robustness, rather than simply crystal selection.
- AN826 is fairly technical and focuses somewhat on designers who need to custom order a crystal.
- AN849 is more aimed toward typical PIC operation and is the best place to start.
- We have a HC49US20.000MABJ, AT-cut, 18 pf load capacitance, 20 MHz crystal.
Bully (base)board
Provides a means of interconnecting up to 4 personality modules and includes a 5V regulator to supply power. More information is give in the requirements document.
| Qty. | Description | Part number | Ref. Des. |
|---|---|---|---|
| 1 | 22 uF Capactor | Digi-Key P819-ND | C2 |
| 1 | 500 mA fast-acting axial fuse | Digi-Key F2311-ND | F1 |
| 2 | 1K axial resistor (SCL and SDA) | R6, R7 | |
| 1 | LDO 5V regulator | Digi-Key LM2937ET-5.0-ND | U2 |
| 4 | PCI connector | Digi-Key S3142-ND | X1-X4 |
| 1 | red LED | Digi-Key 67-1402-ND, but wrong part | LED1 |
| 1 | 0.1uF cap | Digi-Key 399-4151-ND | C4 |
| 4 | standoffs | Digi-Key RP430-ND, but wrong part -- should be screw type |
Revision notes:
- Order a plug for the battery, so it can be easily connected/disconnected to the board.
- Beef up traces to handle lots of current over Vraw
- Add in decoupling to isolate motor noise from logic supply (what kind?)
- Spin the bully board as a connector-only, with just a regulator and pullups
- Find better standoffs and resize holes
- Develop a right-angle board for easier debug
Proto board personality module
A wireless prototyping module for testing out circuits. More information is given in the requirements document.
| Qty. | Description | Part number |
|---|---|---|
| 1 | 400-point solderless breadboard WBU-301 | Jameco WBU-301 |
| 6 | 10-point, 0.1" single-row headers | Digi-Key S7008-ND |
Revision notes:
- Replace the headers with something cheaper. They're ridiculously expensive.





