Commits

piccaso  committed 93fa478

First attempt to make it compatible to Romans circuit

  • Participants
  • Parent commits 3e90cff
  • Branches 1wire

Comments (0)

Files changed (2)

File LiquidCrystal_SR1.cpp

 	// Divide byte in two nibbles (val1 and val2), include the RS signal
 	// and format it for shiftregister output wiring to the LCD
 	mode = mode ? SR_RS_BIT : 0; // RS bit; LOW: command.  HIGH: character.
-	val1 = mode | SR_EN_BIT | ((value >> 1) & 0x78); // upper nibble
-	val2 = mode | SR_EN_BIT | ((value << 3) & 0x78); // lower nibble
+	val1 = mode | SR_EN_BIT | (value & 0xF0); // upper nibble
+	val2 = mode | SR_EN_BIT | ((value << 4) & 0xF0); // lower nibble
 
 	// unused outputs to high (faster)
-	val1 |= SR_UNUSED_BITS;
-	val2 |= SR_UNUSED_BITS;
+	//val1 |= SR_UNUSED_BITS;
+	//val2 |= SR_UNUSED_BITS;
 
 //	val1 |= SR_EN_BIT; // Enable high
 	fio_shiftOut1(_srSignalRegister,_srSignalBit,val1);

File LiquidCrystal_SR1.h

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