Commits

Anonymous committed 50e9341

first (slow) lifesign

Comments (0)

Files changed (3)

 		// send last bit (=LOW) and Latch command
 		fio_digitalWrite_SWITCHTO(shift1Register,shift1Bit,LOW);
 		// Hold pin low for 200us
-		delayMicroseconds(199);
+		delayMicroseconds(210);
 		fio_digitalWrite_HIGH(shift1Register,shift1Bit);
 		// Hold pin high for 300us and leave it that way - using explicit HIGH here, just in case.
-		delayMicroseconds(299);
+		delayMicroseconds(300);
 	}
 
 	// enable interrupts

LiquidCrystal_SR1.cpp

 	val1 = mode | SR_EN_BIT | ((value >> 1) & 0x78); // upper nibble
 	val2 = mode | SR_EN_BIT | ((value << 3) & 0x78); // lower nibble
 
-	//val1 &= ~SR_EN_BIT; // Enable low
+	// unused outputs to high (faster)
+	val1 |= SR_UNUSED_BITS;
+	val2 |= SR_UNUSED_BITS;
+
+//	val1 |= SR_EN_BIT; // Enable high
 	fio_shiftOut1(_srSignalRegister,_srSignalBit,val1);
-//	waitUsec(40);
-//
-//	val1 |= SR_EN_BIT; // Enable high
-//	fio_shiftOut1(_srSignalRegister,_srSignalBit,val1);
-//	waitUsec(1);
-//
-//	val1 &= ~SR_EN_BIT; // Enable low
-//	fio_shiftOut1(_srSignalRegister,_srSignalBit,val1);
-//	waitUsec(40);
+	waitUsec(1);
+//	delay(1);
 
-//	val2 &= ~SR_EN_BIT; // Enable low
+	val1 &= ~SR_EN_BIT; // Enable low
+	fio_shiftOut1(_srSignalRegister,_srSignalBit,val1);
+	waitUsec(40);
+	delay(1);
+
+//	val2 |= SR_EN_BIT; // Enable high
 	fio_shiftOut1(_srSignalRegister,_srSignalBit,val2);
-//	waitUsec(40);
-//
-//	val2 |= SR_EN_BIT; // Enable high
-//	fio_shiftOut1(_srSignalRegister,_srSignalBit,val2);
-//	waitUsec(1);
-//
-//	val2 &= ~SR_EN_BIT; // Enable low
-//	fio_shiftOut1(_srSignalRegister,_srSignalBit,val2);
-//	waitUsec(40);
+	waitUsec(1);
+//	delay(1);
+
+	val2 &= ~SR_EN_BIT; // Enable low
+	fio_shiftOut1(_srSignalRegister,_srSignalBit,val2);
+	waitUsec(40);
+	delay(1);
 }

LiquidCrystal_SR1.h

 // two-wire indicator constant
 // ---------------------------------------------------------------------------
 #define SR_RS_BIT 0x04
-#define SR_EN_BIT 0x02
+#define SR_EN_BIT 0x80
+#define SR_UNUSED_BITS 0x02
 
 class LiquidCrystal_SR1 : public LCD
 {