diff -x .svn -Nuar avrdude-5.11/avrdude.conf.in avrdude-5.11-FT232HPatch/avrdude.conf.in
--- avrdude-5.11/avrdude.conf.in	2011-08-27 06:50:33.000000000 +1000
+++ avrdude-5.11-FT232HPatch/avrdude.conf.in	2011-08-30 14:34:13.512229500 +1000
@@ -337,7 +337,7 @@
   desc  = "Arduino";
   type  = arduino;
 ;
-# this will interface with the chips on these programmers:
+# The avrftdi driver type will interface with the chips on these programmers:
 #
 # http://real.kiev.ua/old/avreal/en/adapters
 # http://www.amontec.com/jtagkey.shtml, jtagkey-tiny.shtml
@@ -347,6 +347,7 @@
 # http://dangerousprototypes.com/docs/FT2232_breakout_board
 # http://www.ftdichip.com/Products/Modules/DLPModules.htm,DLP-2232*,DLP-USB1232H
 # http://flashrom.org/FT2232SPI_Programmer
+# http://www.glynstore.com/products/FTDI-UM232H-High%252dSpeed-USB-to-UART-Development-Module.html
 # 
 # The drivers will look for a specific device and use the first one found.
 # If you have mulitple devices, then look for unique information (like SN)
@@ -405,6 +406,35 @@
   vfyled = ~ 13;
 ;
 
+# UM232H module from FTDI and Glyn.com.au
+# J1: Connect pin 2 and 3 for USB power.
+# J2: Connect pin 2 and 3 for USB power.
+# J2: Pin 7 is SCK
+#   : Pin 8 is MOSI
+#   : Pin 9 is MISO
+#	: Pin 11 is RST
+#   : Pin 6 in ground
+# Use the -b flag to set the SPI clock rate eg -b 3750000 is the fastest I could get
+# a 16MHz Atmega1280 to program reliably.  The 232H is conveniently 5V tolerant.
+programmer
+  id	= "UM232H";
+  desc	= "FT232H based module from FTDI and Glyn.com.au";
+  type	= avrftdi;
+  usbvid     = 0x0403;
+# Note: This PID is reserved for generic 232H devices and 
+# should be programmed into the EEPROM
+   usbpid    = 0x6014;
+  usbdev = "A";
+  usbvendor  = "";
+  usbproduct = "";
+  usbsn      = "";
+#ISP-signals 
+  sck    = 1;
+  mosi   = 2;
+  miso   = 3;
+  reset  = 5;
+;
+
 programmer
   id    = "jtagkey";
   desc  = "Amontec JTAGKey, JTAGKey-Tiny and JTAGKey2";
diff -x .svn -Nuar avrdude-5.11/avrftdi.c avrdude-5.11-FT232HPatch/avrftdi.c
--- avrdude-5.11/avrftdi.c	2011-08-26 02:12:30.000000000 +1000
+++ avrdude-5.11-FT232HPatch/avrftdi.c	2011-08-30 09:38:51.310577500 +1000
@@ -54,8 +54,8 @@
 
 static struct ftdi_context ftdic;
 static uint16_t pin_value, pin_direction, pin_inversion, led_mask;
-static int type; /**type is  bcdDevice. C/D is 0x500 H is 0x700 4H is 0x800*/
-static int ftype; /** is from FTDI. Use TYPE_2232C, TYPE_2232H, or TYPE_4232H*/
+static int type; /**type is  bcdDevice. C/D is 0x500 H is 0x700 4H is 0x800, 232H is 0x900*/
+static int ftype; /** is from FTDI. Use TYPE_2232C, TYPE_232H, TYPE_2232H, or TYPE_4232H*/
 
 static void buf_dump(unsigned char *buf, int len, char *desc,
 		     int offset, int width)
@@ -73,37 +73,45 @@
 	fprintf(stderr, "%s end\n", desc);
 }
 
+/*
+ * The *232H series can clock up to 30MHz.  Older chips like the 232C clock up to 6MHz.
+ * This function will select which mode is appropriate based on the device.
+ * It won't neccessrily mean you can program the chip any faster - it just means the
+ * SPI frequency can be tuned a bit finer.
+ */
 static int set_frequency(uint32_t freq)
 {
 	uint32_t divisor;
 	uint8_t buf[3];
+	uint32_t clkfreq;
+
+	if(ftype == TYPE_2232C)	{
+		clkfreq = SPICLK6MHZ;
+	}
+	else {
+		clkfreq = SPICLK30MHZ;
+		buf[0] = DIS_DIV_5;
+		E(ftdi_write_data(&ftdic, buf, 1) < 0);
+	}
+
 
-	/* divisor on 6000000 / freq - 1 */
-	divisor = (6000000 / freq) - 1;
+	divisor = (clkfreq / freq) - 1;
 	if (divisor < 0) {
-		fprintf(stderr,
-			"%s failure: Frequency too high (%u > 6 MHz)\n",
-			progname, freq);
-		fprintf(stderr,
-			"resetting Frequency to 6MHz\n");
+		fprintf(stderr, "%s failure: Frequency too high (%u > %dHz)\n", progname, freq, clkfreq);
+		fprintf(stderr, "resetting Frequency to %dHz\n",clkfreq);
 		divisor = 0;
 	}
 
-	if (divisor > 65535) {
-		fprintf(stderr,
-			"%s failure: Frequency too low (%u < 91.553 Hz)\n",
-			progname, freq);
-		fprintf(stderr,
-			"resetting Frequency to 91.553Hz\n");
-		divisor = 65535;
+	if (divisor > MAXDIVISOR) {
+		fprintf(stderr, "%s failure: Frequency too low (%u < %dHz)\n", progname, freq, clkfreq/MAXDIVISOR);
+		fprintf(stderr, "resetting Frequency to %dHz\n",clkfreq/MAXDIVISOR);
+		divisor = MAXDIVISOR;
 	}
 
 	if(verbose)
-		fprintf(stderr,
-			"%s info: clock divisor: 0x%04x\n",
-			progname, divisor);
+		fprintf(stderr, "%s info: clock divisor: 0x%04x Actual SPI ClK freq: %.0fHz\n", progname, divisor, clkfreq/(float)(divisor+1));
 
-	buf[0] = 0x86;
+	buf[0] = TCK_DIVISOR;
 	buf[1] = (uint8_t)(divisor & 0xff);
 	buf[2] = (uint8_t)((divisor >> 8) & 0xff);
 
@@ -144,6 +152,8 @@
 		mlim=11;
 	else if(TYPE_2232H == ftype)
 		mlim=15;
+	else if(TYPE_232H == ftype)
+		mlim=15;
 	else{
 		printf("Unknown type %d (0x%x)\n",ftype,ftype);
 		mlim=15;
@@ -198,12 +208,14 @@
 			"add_pins: %d: 0x%04x, inv=0x%04x\n",
 			pinfunc, pin, inversion_mask);
 	mask = pin;
-	if (TYPE_4232H == ftype)
-		mlim = 8;
-	else if (TYPE_2232C == ftype)
-		mlim = 12;
-	else if (TYPE_2232H == ftype)
-		mlim = 16;
+	if(TYPE_4232H == ftype)
+		mlim=8;
+	else if(TYPE_2232C==ftype)
+		mlim=12;
+	else if(TYPE_2232H == ftype)
+		mlim=16;
+	else if(TYPE_232H == ftype)
+		mlim=16;
 	else{
 		printf("Unknown type %d (0x%x)\n",
 		       ftype, ftype);
@@ -249,10 +261,10 @@
 			"%s info: direction: 0x%04x, value: 0x%04x, inversion: 0x%04x\n",
 			progname, pin_direction, pin_value, pin_inversion);
 
-	buf[0] = 0x80;
+	buf[0] = SET_BITS_LOW;
 	buf[1] = pin_value & 0xff;
 	buf[2] = pin_direction & 0xff;
-	buf[3] = 0x82;
+	buf[3] = SET_BITS_HIGH;
 	buf[4] = (pin_value >> 8) & 0xff;
 	buf[5] = (pin_direction >> 8) & 0xff;
 
@@ -270,7 +282,12 @@
 	 * avr has got the reset signal when we start sleeping.
 	 * (it may be stuck in the USB stack or some USB hub)
 	 */
-	E(ftdi_usb_purge_buffers(&ftdic));
+	
+	/* This works with libftdi 0.19(git) */
+	 E(ftdi_usb_purge_tx_buffer(&ftdic));
+
+	/* This works with libftdi and libusb-1.0 - something for the future*/
+	/* E(ftdi_usb_purge_buffers(&ftdic)); */
 
 	return 0;
 
@@ -373,7 +390,7 @@
 		buf[2] = (((buf_size - 1) >> 8) & 0xff);
 
 		memcpy(buf + 3, cmd, buf_size);
-		buf[buf_size + 3] = 0x87;
+		buf[buf_size + 3] = SEND_IMMEDIATE;
 
 #ifndef DRYRUN
 		E(ftdi_write_data(&ftdic, buf, buf_size + 4) != buf_size + 4);
@@ -414,12 +431,12 @@
 	if (pgm->usbvid)
 		vid = pgm->usbvid;
 	else
-		vid = 0x0403;
+		vid = FTDIVID;
 
 	if (pgm->usbpid)
 		pid = pgm->usbpid;
 	else
-		pid = 0x6010;
+		pid = FTDI232CPID;
 
 	if (0 == pgm->usbsn[0]) /* we don't care about SN. Use first avail. */
 		snfound = 1;
@@ -487,36 +504,38 @@
 			progname, vid, pid, type);
 		switch (type) {
 			case TYPE_C_D:
-			    fprintf(stderr,"C/D"); break;
-			case TYPE_H:
-			    fprintf(stderr,"H"); break;
+			    fprintf(stderr,"232C/D"); break;
+			case TYPE_2H:
+			    fprintf(stderr,"2232H"); break;
 			case TYPE_4H:
-			    fprintf(stderr,"4H"); break;
+			    fprintf(stderr,"4232H"); break;
+			case TYPE_H:
+			    fprintf(stderr,"232H"); break;
 			default:
 			    fprintf(stderr,"unknown %04x",type); break;
 		}
 
 		fprintf(stderr,") and SN '%s'.\n", foundsn);
 	}
-	if (type == TYPE_C_D && INTERFACE_B == interface){
+	if ((type == TYPE_C_D || type == TYPE_H) && INTERFACE_B == interface){
 		fprintf(stderr,
-			"%s: Type C/D found. Setting interface to A\n",
+			"%s: Type C/D/H found. Setting interface to A\n",
 			progname);
 		interface = INTERFACE_A;
 	}
-	/*must be A for mpsse if C/D, can be A/B for H */
+	/*must be A for mpsse if C/D/H, can be A/B for 2H/4H */
 	if (verbose)
 		fprintf(stderr,
 			"%s: Using USB Interface %c\n",
 			progname, INTERFACE_A == interface? 'A': 'B');
 	free(foundsn);
-	E(ftdi_set_interface(&ftdic, interface) < 0);
+
 	E(ftdi_usb_open_dev(&ftdic,found_dev) <0);
-/*	E(ftdi_usb_open_desc(&ftdic, vid,pid,NULL,0==pgm->usbsn[0]?NULL:pgm->usbsn) < 0);  */
+	E(ftdi_set_interface(&ftdic, interface) < 0);
+
 	ftype=ftdic.type;
 #endif
 
-
 	if (SCK != (1 << (pgm->pinno[PIN_AVR_SCK] - 1))
 		|| SDO != (1 << (pgm->pinno[PIN_AVR_MOSI] - 1))
 		|| SDI != (1 << (pgm->pinno[PIN_AVR_MISO] - 1))) {
@@ -537,7 +556,7 @@
 		fprintf(stderr,
 			"%s info: reset pin value: %x\n",
 			progname, pgm->pinno[PIN_AVR_RESET]-1);
-	if (pgm->pinno[PIN_AVR_RESET] < 4 || pgm->pinno[PIN_AVR_RESET] == 0) {
+	if (pgm->pinno[PIN_AVR_RESET] < 5 || pgm->pinno[PIN_AVR_RESET] == 0) {
 		fprintf(stderr,
 			"%s failure: RESET pin clashes with data pin or is not set.\n",
 			progname);
diff -x .svn -Nuar avrdude-5.11/avrftdi.h avrdude-5.11-FT232HPatch/avrftdi.h
--- avrdude-5.11/avrftdi.h	2011-08-26 02:12:30.000000000 +1000
+++ avrdude-5.11-FT232HPatch/avrftdi.h	2011-08-30 08:40:52.197583600 +1000
@@ -26,6 +26,12 @@
 extern "C" {
 #endif
 
+#define SPICLK30MHZ 30000000
+#define SPICLK6MHZ 6000000
+#define MAXDIVISOR 65535
+#define FTDIVID 0x0403
+#define FTDI232CPID 0x6010
+
 #define SCK 0x01
 #define SDO 0x02
 #define SDI 0x04
@@ -36,8 +42,9 @@
 #define TRX (RX | TX)
 
 #define TYPE_C_D 0x500
-#define TYPE_H   0x700
+#define TYPE_2H  0x700
 #define TYPE_4H  0x800
+#define TYPE_H	 0x900
 
 #define E(x) if ((x)) { fprintf(stdout, "%s:%d %s() %s: %s (%d)\n\t%s\n", __FILE__, __LINE__, __FUNCTION__, \
 	#x, strerror(errno), errno, ftdi_get_error_string(&ftdic)); return -1; }
diff -x .svn -Nuar avrdude-5.11/doc/avrdude.texi avrdude-5.11-FT232HPatch/doc/avrdude.texi
--- avrdude-5.11/doc/avrdude.texi	2011-08-27 07:12:33.000000000 +1000
+++ avrdude-5.11-FT232HPatch/doc/avrdude.texi	2011-08-30 14:28:56.027070300 +1000
@@ -172,10 +172,10 @@
 The STK600, JTAG ICE mkII, AVRISP mkII, USBasp, avrftdi (and derivitives), and USBtinyISP
 programmers communicate through the USB, using @code{libusb} as a
 platform abstraction layer.
-The avrftdi adds support for the FT2232C/D, FT2232H, and FT4232H devices. These all use 
-the MPSSE mode, which has a specific pin mapping. Bit 1 (the lsb of the byte in the config
-file) is SCK. Bit 2 is MOSI, and Bit 3 is MISO. Bit 4 usually reset. The 2232C/D parts
-are only supported on interface A, but the H parts can be either A or B (specified by the
+The avrftdi driver adds support for the FT2232C/D, FT232H, FT2232H, and FT4232H devices. These all use 
+the high speed MPSSE SPI mode, which has a specific pin mapping. Bit 1 (the lsb of the byte in the config
+file) is SCK. Bit 2 is MOSI, and Bit 3 is MISO. Bit 4 usually reset. The 2232C/D and 232H parts
+are only supported on interface A, but the 2232H and 4232H parts can be either A or B (specified by the
 usbdev config parameter).
 The STK500, STK600, JTAG ICE, and avr910 contain on-board logic to control the programming of the target
 device.
