SCSI2SD Schematic Notes: Difference between revisions

From code/src wiki
Jump to navigationJump to search
Line 68: Line 68:


== In-circuit programming ==
== In-circuit programming ==
Unfortunately there doesn't appear to be a standard programming header for the LPC17xx series (possibly because the JTAG port is used instead ?).
The LPC17xx micro will be programmed via JTAG using [http://openocd.sourceforge.net/doc/html/Flash-Commands.html Open OCD].


Serial programming of the LPC1751 is performed via the UART0 TX and RX pins. To enter programming mode, <span style="text-decoration: overline">P2.10</span> must be low on <span style="text-decoration: overline">RESET</span>.
The standard ARM 0.1" 20-pin JTAG header will be used (see http://www.keil.com/support/man/docs/ulink2/ulink2_hw_connectors.htm for connector and necessary pull-up/pull-down details).


Power will NOT be made available over the programming header, as it adds too many additional components and cost. "Auctioning Diodes" or opamp + MOSFET (see [http://forums.adafruit.com/viewtopic.php?f=25&t=12406] and [http://www.maxim-ic.com/app-notes/index.mvp/id/1136 App Note 1136]) could be used to allow operation from both the Molex connector and programming header power supplies, but this introduces a voltage drop.  Using schottky diodes (0.3V drop) on a 5V rail that is 5% low (4.75V) is below the 4.5V lower limit of the buck regulator to enable stable 3.3v output, and is too low to use as a 5V railTherefore, we would need to replace the buck regulator with two SEPIC regulators; one for each of the 3.3V and 5V rails.
Serial programming of the LPC1751 is performed via the UART0 TX and RX pinsTo enter programming mode, <span style="text-decoration: overline">P2.10</span> must be low on <span style="text-decoration: overline">RESET</span>. The active-low <span style="text-decoration: overline">P2.10</span> and <span style="text-decoration: overline">RESET</span> lines will be pulled up to +3.3V via a 10kΩ resistor to ensure the micro isn't reset.
''The Arduino circuit doesn't encounter this issue as the DC input voltage is much greater (> 7.1V). We could make use of the 12V supply on the MOLEX connector via a diode to create 5v, and connect the programming header straight-through via a MOSFET.''.
 
The active-low <span style="text-decoration: overline">P2.10</span> and <span style="text-decoration: overline">RESET</span> lines will be pulled up to +3.3V via a 4.7kΩ resistor to ensure the micro isn't reset when the programming cable it's attached. This should work well with DTR and RTS, which are also active-low. The pull-ups will result in low 0.7mA current on each of the <span style="text-decoration: overline">P2.10</span> and <span style="text-decoration: overline">RESET</span> lines when asserted.
 
5 lines are required (TX, RX, DTS, RTS, GND).  A [http://www.sparkfun.com/products/10877 2x3 pin shrouded header] will be used to prevent accidental reversal.
 
Ideally, the UART0 port will also be available to print debug information at runtime.
 
[http://sourceforge.net/projects/lpc21isp/ lpc21isp] will be used to program the board.
 
lpc21isp supports the use of the RS232 DTR and RTS lines to trigger <span style="text-decoration: overline">P2.10</span> and <span style="text-decoration: overline">RESET</span>.  I don't have access to a legacy RS232 port, so I'll target the use of a USB <-> TTL (3.3v) serial converter.
 
=== (Preferred) Option 1: FT232RL breakout board ===
* Reusable [http://www.sparkfun.com/products/718 Breakout board].
* Can solder on a custom cable designed to connect to SCSI2SD board.
 
=== Option 2: Pre-made USB -> TTL cable ===
Sadly, the required RTS and DTR lines are not made available by the common [http://www.ftdichip.com/Products/Cables/USBTTLSerial.htm FTDI USB<->TTL serial cables] (the cables support RTS, or DTS, but not both on the same cable).
 
=== Option 3: Pre-made USB -> DB-9 cable ===
* Would require inclusion of an RS-232 level shifter (eg. MAX3232)
* No possibility of powering the board over the DB9 connector.
 
=== Option 4: Include FT232 in SCSI2SD ===
* Additional expense per board.


== Termination ==
== Termination ==

Revision as of 11:46, 10 January 2012

Details for the circuit design of SCSI2SD.

SMT Type

  1. 0805 sized components will be used where applicable. These represent a good tradeoff between hand-solderability and PCB board space.

Crystal Oscillator

  • LCP1751 requires a 25MHz crystal, which results in a 100MHz clock with x4 PLL
  • The crystal requires 2 caps for stability. The required value is:
2 * (CL - CS)

Where CL is the crystal's load capacitance, as specified by the crystal manufacturer, and CS is the PCB's stray capacitance (around 5pF for a reasonable PCB).

TXC - 9C-25.000MEEJ-T Load capacitance 18pF. Therefore, use 2x 22pF standard ceramic capacitors.

Power Supply

Power Requirements

3.3V 5V
LPC1751 600mA

Rated at 100mA per supply pin.
Analog supply pin unused.

0
SD Card 200mA

[1]

0
UCC5617

Optionally powered by SCSI TERMPWR

0 440mA
74HCT05 0 ?

Likely to be insignificant

Total 800mA > 440mA

5V supply from a hard drive molex connector should provide more than sufficient current. A regulator will be required to convert the 5v supply to 3.3V.

Preferred Option: Switching Regulator

  • NCP3170
  • Over 90% efficiency with 5V input.
  • CHEAP $1.73
  • * Max load current without a heatsink is 2.75A

Backup Option: Linear Regulator

A LMS1585A linear LDO regulator can be used to convert the 5v supply to the required 3.3v.

  • 5A max current is more than enough
  • Easy TO-220 mounting
  • 1.3V dropout @ 3A allows for 5V supply to drop to 4.6V
  • Significantly cheaper than a switching regulator
  • Simpler than a switching regulator.
  • At an expected peak current of 800mA, the regulator will dissipate: (5-3.3)*0.8 = 1.36W
  • Thermal Resistance Junction-to-Case: 2.3C/W
  • Max load current without a heatsink is insufficient at 0.7A

In-circuit programming

The LPC17xx micro will be programmed via JTAG using Open OCD.

The standard ARM 0.1" 20-pin JTAG header will be used (see http://www.keil.com/support/man/docs/ulink2/ulink2_hw_connectors.htm for connector and necessary pull-up/pull-down details).

Serial programming of the LPC1751 is performed via the UART0 TX and RX pins. To enter programming mode, P2.10 must be low on RESET. The active-low P2.10 and RESET lines will be pulled up to +3.3V via a 10kΩ resistor to ensure the micro isn't reset.

Termination

  • The ucc5617 will be powered by the TERMPWR line of the SCSI cable.
  • A DIP Switch will be used to connect the DISCNCT pin of the ucc5617 to ground if the user wants to disable termination. The pin will be pulled-up to TERMPWR via a 10k resistor.

Switches

  • Parity and SCSI ID will be set via a set of DIP switches to ground.
  • The micro GPIO port pull-ups will be enabled (this is the default anyway).
  • Parity requires 1 bit, SCSI ID requires 3 bits, SCSI Terminator DISCNT requires 1 bit. (5-way DIP switch required)