I recently got one of these M0216SD-162SDAR2-1 and am having a problem with the same symptoms as Mike_B back in 2016 - the display does not seem to turn on at all. I'm trying to use the display by bit-banging serial with an arduino.
I've bridged J3 and J5 and left the other jumpers alone.
I'm using pins as follows:
Pin 1: Gnd
Pin 2: +5V
Pin 3: Serial I/O
Pin 4: Strobe
Pin 5: not connected
Pin 6: Clock
I set the pins as output, and then send the following bytes (same as Mike_B was sending above)
send_byte(B11111000);
send_byte(B00111000);
send_byte(B11111000);
send_byte(B00001100);
send_byte(B11111000);
send_byte(B00000001);
my send_byte function is:
// transmit byte serially, MSB first
void send_byte(unsigned char data)
{
output_low(PORTD, 3); //begin write cycle
delay(1);
int i;
// send bits 7..0
for (i = 0; i < 8; i++)
{
// consider leftmost bit
// set line high if bit is 1, low if bit is 0
if (data & 0x80)
output_high(PORTD, 2);
else
output_low(PORTD, 2);
// pulse clock to indicate that bit value should be read
output_low(PORTD, 4);
delay(1);
output_high(PORTD, 4);
// shift byte left so next bit will be leftmost
data <<= 1;
delay(1);
}
output_high(PORTD, 3); //end write cycle
output_low(PORTD, 2); //end write cycle
output_high(PORTD, 4); //end write cycle
delay(1);
}
Anyone have any thoughts on what i might be doing wrong?