#include <avr/io.h>
Now is the data sent out? LSB or MSB? Define serPin as 3 first.
int main(void) {
// Rewrite the program such that it sends out the data from the opposite end.
unsigned char conbyte = 0x44;
unsigned char reg;
reg = conbyte;
DDRC = 1 << serPin;
for (unsigned char x = 0; x < 8; x++) {
if (reg & 0x01)
PORTC = 1 << serPin;
else
PORTC = 0 << serPin;
reg = reg >> 1;
}
return 0;
}