diff --git a/LUFA.pnproj b/LUFA.pnproj
index de99627e51..41d460eebd 100644
--- a/LUFA.pnproj
+++ b/LUFA.pnproj
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/LUFA/ManPages/FutureChanges.txt b/LUFA/ManPages/FutureChanges.txt
index 6aa29d6817..5b04282b90 100644
--- a/LUFA/ManPages/FutureChanges.txt
+++ b/LUFA/ManPages/FutureChanges.txt
@@ -31,6 +31,7 @@
* -# Keyboard/Mouse Dual Class Host
* -# Multiple-Report HID device
* -# Device/Host bridge
+ * -# PDI Programming Support in the AVRISP Project
* - Ports
* -# AVR32 UC3B series microcontrollers
* -# Atmel ARM7 series microcontrollers
diff --git a/Projects/XPLAINBridge/Lib/SoftUART.S b/Projects/XPLAINBridge/Lib/SoftUART.S
index 8951387e9f..f9a89d9f97 100644
--- a/Projects/XPLAINBridge/Lib/SoftUART.S
+++ b/Projects/XPLAINBridge/Lib/SoftUART.S
@@ -2,6 +2,8 @@
uart_soft
+ v0.2
+
copyright John Steggall 2009
*/
@@ -30,10 +32,8 @@
*/
#include
+#include "SoftUARTConf.h"
-/* BITLENGTH is the time for a bit cycle worked out at F_CPU / BAUD. Gives a rough but usable figure. Wouldn't like to try
- * anything faster than 9600! */
-#define BITLENGTH 833
#define SFT_TX_EN 7
@@ -52,43 +52,59 @@ rxShifter:
.byte 0
rxBitcount:
.byte 0
+
+ .global status
status:
.byte 0
.section .text
+
+ .global RX_PIN_INT
+
/*********************************************
* External interrupt
*
* RX pin has gone low.
*/
- .global INT0_vect
-
-INT0_vect:
+RX_PIN_INT:
push r16
lds r16,SREG
push r16
- lds r16,PIND
+#if (RXPORT>=32)
+ lds r16,RXPORT
sbrc r16,0 // anti glitch
+
+#else
+ sbic RXPORT,0
+#endif
+
rjmp ignore
nop
nop
nop
nop
- lds r16,PIND
- sbrc r16,0 // just make sure
+
+#if (RXPORT>=32)
+ lds r16,RXPORT
+ sbrc r16,0 // anti glitch
+
+#else
+ sbic RXPORT,0
+#endif
+
rjmp ignore
push r17
// grab timer value
- lds r16,TCNT3L
- lds r17,TCNT3H
+ lds r16,TC_COUNTL
+ lds r17,TC_COUNTH
// set trigger for RX timer (will need to add a little more though)
- sts OCR3CH,r17
- sts OCR3CL,r16
+ sts TC_RX_COMPH,r17
+ sts TC_RX_COMPL,r16
pop r17
@@ -98,13 +114,15 @@ INT0_vect:
// turn off interrupt, will get annoying.
- cbi 0x1D,0
+ cbi EXTI_MASK_REG,EXTI_MASK_BIT
// turn on interrupt on compare match
- sbi 0x18,OCF3C
- lds r16,TIMSK3
- ori r16,(1<=32)
+ lds r17, TXPORT
sbrs r16,0
- andi r17,0xFD
+ andi r17,~(1<64
+ lds r16,RXPORT
+ andi r16,~(1<=32)
+ lds r16,RXPORT
+ sbrs r16,RXPIN
+#else
+ sbic RXPORT,RXPIN
+
+#endif
+
inc r17
dec r18
nop
@@ -212,7 +252,19 @@ loopGetBit:
nop
brne loopGetBit
-// sbi 0x0B,1 // marker
+#ifdef DEBUG
+
+#if RXPORT>64
+ lds r16,RXPORT
+ ori r16,1<=32)
+ lds r16,RXPORT
+ sbrc r16,RXPIN
+
+#else
+ sbic RXPORT,RXPIN
+
+#endif
+
ori r17,0x02 // set flag if stop bit was high
sts status,r17
@@ -237,19 +297,19 @@ lastBitRX:
// switch interrupt back on to get another go
- sbi 0x1C,0 // clear interrupt flag
- sbi 0x1D,0 // enable external interrupt 0 (RX)
+ sbi EXTI_FLAG_REG,EXTI_MASK_BIT // clear interrupt flag
+ sbi EXTI_MASK_REG,EXTI_MASK_BIT // enable external interrupt 0 (RX)
// switch off rx bit timer
- lds r16,TIMSK3
- andi r16,~(1<=32)
+ lds r18,TXPORT
ori r18,0x02
- sts PORTD,r18
- lds r18,DDRD
+ sts TXPORT,r18
+
+ lds r18,TXDIR_REG
ori r18,0x02
- sts DDRD,r18
+ sts TXDIR_REG,r18
+
+#else
+ sbi TXPORT,TXPIN
+ sbi TXDIR_REG,TXPIN
+
+#endif
ldi r18,(1<=32)
+ lds r20, TXPORT
+ andi r20,~(1<