Skip to content
Snippets Groups Projects
Commit 24ca2d49 authored by Dean Camera's avatar Dean Camera
Browse files

Bit-bang ISP in the AVRISP-MKII clone project needs to set MOSI pin to the MSB...

Bit-bang ISP in the AVRISP-MKII clone project needs to set MOSI pin to the MSB of the data byte on startup, not the LSB.
parent 70f3d8e9
No related branches found
No related tags found
No related merge requests found
...@@ -243,7 +243,8 @@ uint8_t ISPTarget_TransferSoftSPIByte(const uint8_t Byte) ...@@ -243,7 +243,8 @@ uint8_t ISPTarget_TransferSoftSPIByte(const uint8_t Byte)
SoftSPI_Data = Byte; SoftSPI_Data = Byte;
SoftSPI_BitsRemaining = 8; SoftSPI_BitsRemaining = 8;
if (SoftSPI_Data & 0x01) /* Set initial MOSI pin state according to the byte to be transferred */
if (SoftSPI_Data & (1 << 7))
PORTB |= (1 << 2); PORTB |= (1 << 2);
else else
PORTB &= ~(1 << 2); PORTB &= ~(1 << 2);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment