aboutsummaryrefslogtreecommitdiff
path: root/Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.c
diff options
context:
space:
mode:
authorDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2010-01-29 05:31:25 +0000
committerDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2010-01-29 05:31:25 +0000
commit871a827b0ff99d4d6e3b5744271d66e987d8c350 (patch)
tree2301dd28cac80f9717d839c49b487f88e4b33a60 /Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.c
parentf88ddd53cf1fa5be53f2ea981044c9f7a5e4e4eb (diff)
Fix TPI communications in the AVRISP project when bit-banged USART mode is selected.
git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1081 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.c')
-rw-r--r--Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.c b/Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.c
index 14064286..0f590c71 100644
--- a/Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.c
+++ b/Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.c
@@ -96,7 +96,7 @@ ISR(TIMER1_COMPA_vect, ISR_BLOCK)
}
/** ISR to manage the TPI software USART when bit-banged TPI USART mode is selected. */
-ISR(TIMER1_COMPB_vect, ISR_BLOCK)
+ISR(TIMER1_CAPT_vect, ISR_BLOCK)
{
/* Toggle CLOCK pin in a single cycle (see AVR datasheet) */
BITBANG_TPICLOCK_PIN |= BITBANG_TPICLOCK_MASK;
@@ -209,10 +209,10 @@ void XPROGTarget_EnableTargetTPI(void)
/* Set DATA line high for idle state */
BITBANG_TPIDATA_PORT |= BITBANG_TPIDATA_MASK;
- /* Fire timer capture channel B ISR to manage the software USART */
- OCR1B = BITS_BETWEEN_USART_CLOCKS;
- TCCR1B = (1 << WGM12) | (1 << CS10);
- TIMSK1 = (1 << OCIE1B);
+ /* Fire timer capture channel ISR to manage the software USART */
+ ICR1 = BITS_BETWEEN_USART_CLOCKS;
+ TCCR1B = (1 << WGM13) | (1 << WGM12) | (1 << CS10);
+ TIMSK1 = (1 << ICIE1);
#endif
/* Send two BREAKs of 12 bits each to enable TPI interface (need at least 16 idle bits) */