ICSP on the olimex lpc2148 board

Hey guys.

I’m a beginner with digital electronics, and I just ordered an LPC2148 dev board. I’ve been looking at the schematic for the board, and I have a couple of questions:

Below an excerpt from the schematic, showing how the serial port is wired up:

http://murdock.ma.cx/lpc2148-serial.png

  • In the part I labeled “A”, I think switching the “1” switch to on, will bring the BSL pin low, presumably to enable the bootloader on reset. Is this correct? If so, why isn’t this wired to one of the serial pins (like CTS)? Does this mean that in orer to program the board, you need to turn the “1” switch on, reset the board, download the code, turn off the “1” switch off, and then reset again? Seems kind of clunky

  • In the part labeled “B”, I interpreted this to mean that if “2” is switched on, you can use the DTR line to reset the chip. This would be great for the bootloader software on the PC side, but you would still have to set the BSL switch (“1”) manually, and then unswitch it manually and reset to run your code, right?

  • In “B” how does this deal with the +12/-12v DTR signal going into the gate of the transistor? Wouldn’t this fry the transistor?

  • What is the purpose of the diodes D3/D4? I see they’re facing the “wrong way”. Is this a common digital electronics idiom for some specific task? If so, what?

  • What is the purpose of R12?

Thanks!

-sjg

For Switch B, the 10K and 22K resistor are used as a voltage divider to bring the 12V down to 5.4 volts, a much more reasonable voltage for the transistor. I’m not sure about switching B to get the board to run but taking a guess at it DTR is active low so it’s normally high. As for the A part of the circuit, switching it is required to bring the chip into ICSP mode. If you would like to work around that look into a JTAG device such as the Olimex OpenOCD Tiny.

EDIT:

DTR is set when the serial port is opened and remains that way until it is closed.