Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'master' of git@github.com:geekscape/Aiko

  • Loading branch information...
commit c7107afd94f2ecb7579eb340ec1ba3345793253d 2 parents c745ba5 + edf5753
@notahat notahat authored
Showing with 44 additions and 6 deletions.
  1. +22 −3 nursery/aiko_hem.pde
  2. +22 −3 nursery/aiko_test.pde
View
25 nursery/aiko_hem.pde
@@ -289,16 +289,35 @@ void relayCommand(void) {
/* LCD KS0066 4-bit data interface, 3 Arduino pins and MC14094 8-bit register
* http://www.datasheetsite.com/datasheet/KS0066
*
+ * MC14094 input: Arduino digital pin 2=Clock, pin 4=Data, pin 7=Strobe
* MC14094 output: Q8=DB4, Q7=DB5, Q6=DB6, Q5=DB7, Q4=E, Q3=RW, Q2=RS, Q1=None
* http://www.ee.mut.ac.th/datasheet/MC14094.pdf
+ *
+ * +--------------------------------------------+
+ * | Arduino (ATMega 168 or 328) |
+ * | D02 D04 D07 |
+ * +----+-------------+-------------+-----------+
+ * |4 |6 |13
+ * |3 |2 |1
+ * +----+-------------+-------------+-----------+
+ * | Clock Data Strobe |
+ * | MC14094 8-bit shift/latch register |
+ * | Q8 Q7 Q6 Q5 Q4 Q3 Q2 Q1 |
+ * +----+----+----+----+----+----+----+----+----+
+ * |11 |12 |13 |14 |7 |6 |5 |4
+ * |11 |12 |13 |14 |6 |5 |4
+ * +----+----+----+----+----+----+----+---------+
+ * | DB4 DB5 DB6 DB7 E RW RS |
+ * | LCD KS0066 |
+ * +--------------------------------------------+
*/
// LCD pin bit-patterns, output from MC14094 -> LCD KS0066 input
-#define LCD_ENABLE_HIGH 0x10 // MC14094 Q3 -> LCD E
+#define LCD_ENABLE_HIGH 0x10 // MC14094 Q4 -> LCD E
#define LCD_ENABLE_LOW 0xEF // Enable (high) / Disable (low)
-#define LCD_RW_HIGH 0x20 // MC14094 Q2 -> LCD RW
+#define LCD_RW_HIGH 0x20 // MC14094 Q3 -> LCD RW
#define LCD_RW_LOW 0xDF // Read (high) / Write (low)
-#define LCD_RS_HIGH 0x40 // MC14094 Q1 -> LCD RS
+#define LCD_RS_HIGH 0x40 // MC14094 Q2 -> LCD RS
#define LCD_RS_LOW 0xBF // Data (high) / Instruction (low) Select
// LCD Commands
View
25 nursery/aiko_test.pde
@@ -202,16 +202,35 @@ void clockHandler() {
/* LCD KS0066 4-bit data interface, 3 Arduino pins and MC14094 8-bit register
* http://www.datasheetsite.com/datasheet/KS0066
*
+ * MC14094 input: Arduino digital pin 02=Clock, 04=Data, 07=Strobe
* MC14094 output: Q8=DB4, Q7=DB5, Q6=DB6, Q5=DB7, Q4=E, Q3=RW, Q2=RS, Q1=None
* http://www.ee.mut.ac.th/datasheet/MC14094.pdf
+ *
+ * +--------------------------------------------+
+ * | Arduino (ATMega 168 or 328) |
+ * | D02 D04 D07 |
+ * +----+-------------+-------------+-----------+
+ * |4 |6 |13
+ * |3 |2 |1
+ * +----+-------------+-------------+-----------+
+ * | Clock Data Strobe |
+ * | MC14094 8-bit shift/latch register |
+ * | Q8 Q7 Q6 Q5 Q4 Q3 Q2 Q1 |
+ * +----+----+----+----+----+----+----+----+----+
+ * |11 |12 |13 |14 |7 |6 |5 |4
+ * |11 |12 |13 |14 |6 |5 |4
+ * +----+----+----+----+----+----+----+---------+
+ * | DB4 DB5 DB6 DB7 E RW RS |
+ * | LCD KS0066 |
+ * +--------------------------------------------+
*/
// LCD pin bit-patterns, output from MC14094 -> LCD KS0066 input
-#define LCD_ENABLE_HIGH 0x10 // MC14094 Q3 -> LCD E
+#define LCD_ENABLE_HIGH 0x10 // MC14094 Q4 -> LCD E
#define LCD_ENABLE_LOW 0xEF // Enable (high) / Disable (low)
-#define LCD_RW_HIGH 0x20 // MC14094 Q2 -> LCD RW
+#define LCD_RW_HIGH 0x20 // MC14094 Q3 -> LCD RW
#define LCD_RW_LOW 0xDF // Read (high) / Write (low)
-#define LCD_RS_HIGH 0x40 // MC14094 Q1 -> LCD RS
+#define LCD_RS_HIGH 0x40 // MC14094 Q2 -> LCD RS
#define LCD_RS_LOW 0xBF // Data (high) / Instruction (low) Select
// LCD Commands
Please sign in to comment.
Something went wrong with that request. Please try again.