I continues working on the schematics this week. By now, almost all the major components in the circuit are connected. Last week I connected the Ethernet jack, SD card, and some of the microcontroller connections. This week I did the connections for the USB port power pins, FPGA I/O ports, the rest of microcontroller connections, and I researched the possibility of sharing the oscillator with two ICs. If you are interesting in reading more about the problems and the configuration of sharing one oscillator, make sure that you check my other post here. Now with the updates.

Visual Diff

For schematics and other design projects, a normal diff between two versions of the project is not so useful. A better way to visualize the progress is to use one of the visual diff methods to produce a clear image of what has been changed. For more about visual diff, see this article. Below is the visual diff of the root schematics sheet for the circuit. Changes are clear to understand as additions are in red, and removals are in cyan. Let’s take these changes one at a time.
diff

Oscillators

Two oscillators are added to the circuit. First one is the main 25MHz oscillator for the circuit that is connected to the microcontroller and to the FPGA. The micrcontroller is connected in EC mode with input clock at pin OSC1, and an output FOSC/4 (the input frequency divided by 4) at pin OSC2. FPGA clock is connected at pin T7 global clock pin GCLK. The choice of this pin was made based on its position as it’s on the FPGA edge facing the microcontroller (see image below).

The second oscillator is a crystal with its capacitance circuitry connected at the microcontroller secondary oscillator input. This 32KHz oscillator is required for Timer1. All values of the capacitors and crystal frequency are available in the microcontroller family datasheet.

Connections

There are a lot of connections between the FPGA and the microcontroller, as well as connections from the FPGA to the board I/O ports. It is important to keep in mind the physical location of the pins when choosing which I/O pins of the FPGA to connect. The image below shows the I/O banks of the package we are using FTG256.

source: Spartan-6 FPGA Packaging and Pinouts

source: Spartan-6 FPGA Packaging and Pinouts


The FPGA dedicated pins that need to be connected to the microcontroller are on the bottom half. Hence, bank 2 will be facing the microcontroller, and bank3 will be connected to the I/O ports. As you can see in the visual diff above, Interrupt-on-change pins in the microcontroller (port B) are connected to FPGA bank2. Below, is the schematics for bank3 and the board I/O ports.
bank3

USB power circuit

The connections of the USB power pins were relatively simple and direct. There are 4 voltage levels in the circuit. Therefore, the power circuit will basically consist of a bunch of regulators. There are many commercial regulators that suit our need, however, I ended up with the regulators used in our previous board design; they meet the circuit requirement, and their schematic components are already available, hence I did not have to draw the components myself. Here is the power sheet.
power

Other modifications

There are, as usual, many additional modification. Those are:

  • Changing the SD card socket to microSD. Last week the socket schematic component I created was for a full-sized SD card socket. I changed it now to be a microSD card socket. The connections are slightly different but nothing major. If you look closely in the visual diff above you will see some of the names are changed.
  • Removing termination resistors for the UART clock signal. Last week I added two resistors at the end of the clock track as a Thevenin termination for the transmission line. However, as I discussed in another post, our signal frequency and rise/fall time are not fast enough to treat the PCB track as transmission lines. Hence, it should work just fine without the need for termination resistors.
  • Adding power port. As you can see in the power sheet above, there is a power port that matches the Arduino power port.

The circuit now is almost finished. One thing that is not connected yet is the ICSP. I still cannot find a way to integrate it with the Ethernet jack. Still the most viable option is  connecting it to the JTAG port. Either way, next week this problem should be settled. Also, I will be searching on the possibility of connecting the USB data pins to the PIC18 micrcontroller.

Talk to you next time.


0 Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.