aboutsummaryrefslogtreecommitdiffstats
path: root/Projects/AVRISP/Lib/PDITarget.c
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2009-12-09 12:01:01 +0000
committerDean Camera <dean@fourwalledcubicle.com>2009-12-09 12:01:01 +0000
commit9c8ed168e5805059db7978e6a9a4ad24347c7a6e (patch)
tree335ca20c5911c30724585c42f78e7ade01379646 /Projects/AVRISP/Lib/PDITarget.c
parente4cfd5208fdb51942ad8857dd5e1d96f5216f73b (diff)
downloadlufa-9c8ed168e5805059db7978e6a9a4ad24347c7a6e.tar.gz
lufa-9c8ed168e5805059db7978e6a9a4ad24347c7a6e.tar.bz2
lufa-9c8ed168e5805059db7978e6a9a4ad24347c7a6e.zip
Fix inverted bit-banged USART logic in the AVRISP project for PDI programming. Add a delay to the clock toggling in the AVRISP project to ensure that the programming speed does not exceed 10MHz under any conditions to satisfy the limits in the datasheet for all target voltages. Fix incorrect pin being used as the DATA in in PDI programming mode.
Diffstat (limited to 'Projects/AVRISP/Lib/PDITarget.c')
-rw-r--r--Projects/AVRISP/Lib/PDITarget.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Projects/AVRISP/Lib/PDITarget.c b/Projects/AVRISP/Lib/PDITarget.c
index 98d4bded4..03dd77998 100644
--- a/Projects/AVRISP/Lib/PDITarget.c
+++ b/Projects/AVRISP/Lib/PDITarget.c
@@ -52,9 +52,9 @@ void PDITarget_SendByte(uint8_t Byte)
for (uint8_t i = 0; i < 8; i++)
{
if (Byte & 0x01)
- PDIDATA_LINE_PORT |= PDIDATA_LINE_MASK;
- else
PDIDATA_LINE_PORT &= ~PDIDATA_LINE_MASK;
+ else
+ PDIDATA_LINE_PORT |= PDIDATA_LINE_MASK;
Byte >>= 1;