In the first two weeks of the project I was reading and trying to grasp the basics of PCB design and KiCAD. This week I put this knowledge into action and finally started with creating the schematics for the project. The board we are designing contains an FPGA (spartan-6), PIC18 microcontroller, SD card slot, and several I/O ports. By now, I have created the configuration connections between the FPGA and the microcontroller, SD card and Ethernet connections. So let’s talk in a bit of details about each part of the circuit.
Although now I am creating the schematics from scratch, this board has been designed before by a previous intern (Kin Wai Lee). For some parts of the circuit I am following his designs and the decisions he and Dr. Shawn have reached to. He did a great job creating the PCB as well as explaining the project in his blogs here. In his first blog, he explained the four configuration modes for the FPGA (in addition to JTAG), and eventually Slave Serial configuration mode was used. Slave Serial mode connections are very simple, where it needs only a clock and one data pin to be connected to send the bitstream file. DONE, PROGRAM_B, INIT_B pins in the FPGA should also be connected. The clock CCLK, data DIN and INIT_B can be reused after configuration is finished to control the microcontroller.
The SD card will be used in SPI mode and connected to both the microcontroller as well as the FPGA. Before configuration, the microcontroller will be controlling the SD card and reading its contents and then it will configure the FPGA. Afterwards, the FPGA will be the one controlling the SD card. To see these connection illustrated visually (and why we will need to flip the FPGA DI/DO pins) check Kin Wai Lee post. SD card connections and the values for the pull up resistors can be found in SD Card specifictaion.
The microcontroller we are using supports Ethernet. Hence the Ethernet jack will mainly be connected to the PIC18. Ethernet connections require four pins (TPOUT+, TPOUT-, TPIN+, and TPIN-), therefore, with standard RJ45 connector we still have 4 unused pins. We are considering using these pins for ICSP (if possible). The problem with this is that ICSP needs 5 pins. I have been searching for a solution to solve this extra pin problem, either by using one of the Ethernet pins, or by eliminating Vdd/Vss by using an external power supply for the circuit, but with no luck.. yet! For now, I have connected only the Ethernet differential transmitting and receiving pairs. The jack used currently has only 6 pins connected to the circuit (excluding the LEDs connections). Hence, later if we are abla to incorporate the ICSP connections in the Ethernet jack, I will need to change this with one that has 8 pins.
The Ethernet circuit and components values are available in the microcontroller Family Data Sheet. One part of the Ethernet circuit I did not connect yet is the oscillator. I will be working on this next week.
Mentioned above are the major parts added to the circuit. There are some additional connections as well, which are:
- Adding a JTAG port and its connections to the FPGA. If ICSP cannot be added to the Ethernet jack, then most probably it will be added to the JTAG port. So these connections might be modified slightly later on.
- Connecting power and ground pins for the microcontroller. Every pair of power and ground requires a capacitor. Also, all connections and values can be found in the microcontroller Family Data Sheet.
- Connecting power and ground pins for the microcontroller with the required capacitors. Details for these are found in Spartan-6 FPGA PCB Design and Pin Planning Guide. The circuit for these connections are shown below.
This concludes the work for this week. Next week I will be working on connecting the USB port, IO ports for the board, oscillators, and trying to solve the ICSP dilemma! A useful tool that you be seeing next week is visual diff to show you the differences in the circuit between this week (circuits above) and next week.
Talk to you next time.