]> kolegite.com Git - vmks.git/commitdiff
added LCD example and one more 7-segment example
authorvl_garistov <vl_garistov@gmail.com>
Wed, 24 Feb 2021 01:28:57 +0000 (03:28 +0200)
committervl_garistov <vl_garistov@gmail.com>
Wed, 24 Feb 2021 01:28:57 +0000 (03:28 +0200)
19 files changed:
Datasheets/HD44780.pdf [new file with mode: 0644]
Examples/7-segm_raw_dynamic/7-segm_raw_dynamic.PDF [deleted file]
Examples/7-segm_raw_dynamic/7-segm_raw_dynamic.ino
Examples/7-segm_raw_dynamic/7-segm_raw_dynamic.pdsprj [deleted file]
Examples/7-segm_raw_dynamic/7-segm_raw_dynamic.pdsprj.DESKTOP-DNPR54D.Cartogan.workspace [deleted file]
Examples/7-segm_raw_dynamic/Backup Of 7-segm_raw_dynamic.pdsbak [deleted file]
Examples/7-segm_raw_dynamic/Last Loaded 7-segm_raw_dynamic.pdsbak [deleted file]
Examples/7-segm_raw_dynamic_timer/7-segm_raw_dynamic_timer.PDF [new file with mode: 0644]
Examples/7-segm_raw_dynamic_timer/7-segm_raw_dynamic_timer.ino [new file with mode: 0644]
Examples/7-segm_raw_dynamic_timer/7-segm_raw_dynamic_timer.pdsprj [new file with mode: 0644]
Examples/7-segm_raw_dynamic_timer/7-segm_raw_dynamic_timer.pdsprj.DESKTOP-DNPR54D.Cartogan.workspace [new file with mode: 0644]
Examples/7-segm_raw_dynamic_timer/7-segm_raw_dynamic_timer.png [new file with mode: 0644]
Examples/7-segm_raw_dynamic_timer/Backup Of 7-segm_raw_dynamic_timer.pdsbak [new file with mode: 0644]
Examples/7-segm_raw_dynamic_timer/Last Loaded 7-segm_raw_dynamic_timer.pdsbak [new file with mode: 0644]
Examples/LCD_scroll/LCD_scroll.ino [new file with mode: 0644]
Examples/LCD_scroll/LCD_scroll.png [new file with mode: 0644]
LCD_layers.png [new file with mode: 0644]
LCD_layers.svg [new file with mode: 0644]
TN-LCD-schematic-MS-208kB.png [new file with mode: 0644]

diff --git a/Datasheets/HD44780.pdf b/Datasheets/HD44780.pdf
new file mode 100644 (file)
index 0000000..5cd5f79
Binary files /dev/null and b/Datasheets/HD44780.pdf differ
diff --git a/Examples/7-segm_raw_dynamic/7-segm_raw_dynamic.PDF b/Examples/7-segm_raw_dynamic/7-segm_raw_dynamic.PDF
deleted file mode 100644 (file)
index dd885da..0000000
Binary files a/Examples/7-segm_raw_dynamic/7-segm_raw_dynamic.PDF and /dev/null differ
index b14da345e59dc1711e9806ffafd5f19f3c440bbf..ec349617d36b721aa2ab0b7f3ef916c237bb645d 100644 (file)
@@ -13,8 +13,7 @@
 \r
 int print_dec(uint16_t value);\r
 int print_digit(uint8_t position, uint8_t digit);\r
-void timer_init(void);\r
-void gpio_init(void);\r
+void emulate_timer_ISR(void);\r
 \r
 const uint8_t segm_pins[8] = {A_PIN, B_PIN, C_PIN, D_PIN, E_PIN, F_PIN, G_PIN, DP_PIN};\r
 const uint8_t en_pins[4] = {EN0_PIN, EN1_PIN, EN2_PIN, EN3_PIN};\r
@@ -45,8 +44,17 @@ volatile uint8_t current_digit = 0;
 \r
 void setup()\r
 {\r
-       gpio_init();\r
-       timer_init();\r
+       uint8_t i;\r
+       for (i = 0; i < 4; i++)\r
+       {\r
+               pinMode(en_pins[i], OUTPUT);\r
+               digitalWrite(en_pins[i], HIGH);\r
+       }\r
+       for (i = 0; i < 8; i++)\r
+       {\r
+               pinMode(segm_pins[i], OUTPUT);\r
+               digitalWrite(segm_pins[i], HIGH);\r
+       }\r
 }\r
 \r
 void loop()\r
@@ -54,7 +62,13 @@ void loop()
        for (uint16_t cnt = 9999; cnt > 0; cnt--)\r
        {\r
                print_dec(cnt);\r
-               delay(100);\r
+               \r
+               // This is garbage, don't use it!\r
+               for(uint8_t i = 0; i < 10; i++)\r
+               {\r
+                       delay(10);\r
+                       emulate_timer_ISR();\r
+               }\r
        }\r
        delay(3000);\r
 }\r
@@ -87,7 +101,7 @@ int print_digit(uint8_t position, uint8_t digit)
        return 0;\r
 }\r
 \r
-ISR(TIMER1_OVF_vect)\r
+void emulate_timer_ISR(void)\r
 {\r
        digitalWrite(en_pins[current_digit], HIGH);\r
 \r
@@ -104,37 +118,3 @@ ISR(TIMER1_OVF_vect)
 \r
        digitalWrite(en_pins[current_digit], LOW);\r
 }\r
-\r
-void gpio_init(void)\r
-{\r
-       uint8_t i;\r
-       for (i = 0; i < 4; i++)\r
-       {\r
-               pinMode(en_pins[i], OUTPUT);\r
-               digitalWrite(en_pins[i], HIGH);\r
-       }\r
-       for (i = 0; i < 8; i++)\r
-       {\r
-               pinMode(segm_pins[i], OUTPUT);\r
-               digitalWrite(segm_pins[i], HIGH);\r
-       }\r
-}\r
-\r
-void timer_init(void)\r
-{\r
-       noInterrupts();\r
-       \r
-       // After clearing TCCR1B the timer is stopped\r
-       TCCR1B = 0;\r
-       TCNT1  = 0;\r
-       \r
-       TCCR1A = (1 << WGM11);\r
-       TCCR1B |= (1 << WGM12) | (1 << WGM13);\r
-       TIMSK1 = (1 << TOIE1);\r
-\r
-       // Set frequency to 1kHz\r
-       ICR1 = 1999;\r
-       TCCR1B |= (1 << CS11);\r
-\r
-       interrupts();\r
-}\r
diff --git a/Examples/7-segm_raw_dynamic/7-segm_raw_dynamic.pdsprj b/Examples/7-segm_raw_dynamic/7-segm_raw_dynamic.pdsprj
deleted file mode 100644 (file)
index d482f6c..0000000
Binary files a/Examples/7-segm_raw_dynamic/7-segm_raw_dynamic.pdsprj and /dev/null differ
diff --git a/Examples/7-segm_raw_dynamic/7-segm_raw_dynamic.pdsprj.DESKTOP-DNPR54D.Cartogan.workspace b/Examples/7-segm_raw_dynamic/7-segm_raw_dynamic.pdsprj.DESKTOP-DNPR54D.Cartogan.workspace
deleted file mode 100644 (file)
index 1c21abc..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-<?xml version='1.0' encoding='UTF-8' standalone='yes'?>\r
-<WORKSPACE>\r
- <FRAME activewindow="0">\r
-  <PLACEMENT>2c0000000200000003000000ffffffffffffffffffffffffffffffffab0000000d000000d606000004040000</PLACEMENT>\r
-  <WINDOW type="default" module="ISIS"/>\r
-  <WINDOW type="device" module="LIBMAN"/>\r
- </FRAME>\r
- <MODULE name="VSMDEBUG">\r
-  <PWI>\r
-   <POPUP w="800" x="38" flags="00000002" y="129" h="200" pid="0" iid="-1">\r
-    <PROPERTIES>\r
-     <ITEM name="Message Column Width">542</ITEM>\r
-     <ITEM name="ShowGrid">No</ITEM>\r
-     <ITEM name="Source Column Width">100</ITEM>\r
-     <ITEM name="Time Column Width">120</ITEM>\r
-     <ITEM name="Version">100</ITEM>\r
-    </PROPERTIES>\r
-   </POPUP>\r
-   <POPUP w="350" x="58" flags="00000032" y="149" h="200" pid="1" iid="-1">\r
-    <PROPERTIES>\r
-     <ITEM name="Address Column Width">83</ITEM>\r
-     <ITEM name="AutoResize">No</ITEM>\r
-     <ITEM name="Gridlines">Yes</ITEM>\r
-     <ITEM name="Name Column Width">83</ITEM>\r
-     <ITEM name="ShowAddresses">Yes</ITEM>\r
-     <ITEM name="ShowPreviousValues">No</ITEM>\r
-     <ITEM name="ShowTypes">No</ITEM>\r
-     <ITEM name="ShowWatchPoint">Yes</ITEM>\r
-     <ITEM name="TriggerMode">0</ITEM>\r
-     <ITEM name="Value Column Width">83</ITEM>\r
-     <ITEM name="Version">100</ITEM>\r
-     <ITEM name="Watch Expression Column Width">83</ITEM>\r
-     <ITEM name="nItems">0</ITEM>\r
-    </PROPERTIES>\r
-   </POPUP>\r
-   <POPUP w="226" x="78" flags="00000008" y="169" h="215" pid="3" iid="1">\r
-    <PROPERTIES/>\r
-   </POPUP>\r
-   <POPUP w="8" x="98" flags="0000000a" y="189" h="1" pid="10" iid="1">\r
-    <PROPERTIES>\r
-     <ITEM name="DataType">2</ITEM>\r
-     <ITEM name="DispChars">Yes</ITEM>\r
-     <ITEM name="DispFormat">2</ITEM>\r
-     <ITEM name="ShowChanges">Yes</ITEM>\r
-     <ITEM name="ShowToolTips">Yes</ITEM>\r
-     <ITEM name="TopLineAddress">00000000</ITEM>\r
-    </PROPERTIES>\r
-   </POPUP>\r
-   <POPUP w="8" x="118" flags="0000000a" y="209" h="32" pid="6" iid="1">\r
-    <PROPERTIES>\r
-     <ITEM name="DataType">2</ITEM>\r
-     <ITEM name="DispChars">Yes</ITEM>\r
-     <ITEM name="DispFormat">2</ITEM>\r
-     <ITEM name="ShowChanges">Yes</ITEM>\r
-     <ITEM name="ShowToolTips">Yes</ITEM>\r
-     <ITEM name="TopLineAddress">00000000</ITEM>\r
-    </PROPERTIES>\r
-   </POPUP>\r
-   <POPUP w="16" x="138" flags="0000000a" y="229" h="32" pid="7" iid="1">\r
-    <PROPERTIES>\r
-     <ITEM name="DataType">2</ITEM>\r
-     <ITEM name="DispChars">Yes</ITEM>\r
-     <ITEM name="DispFormat">2</ITEM>\r
-     <ITEM name="ShowChanges">Yes</ITEM>\r
-     <ITEM name="ShowToolTips">Yes</ITEM>\r
-     <ITEM name="TopLineAddress">00000000</ITEM>\r
-    </PROPERTIES>\r
-   </POPUP>\r
-   <POPUP w="16" x="158" flags="80000000" y="249" h="32" pid="14" iid="1">\r
-    <PROPERTIES>\r
-     <ITEM name="DataType">2</ITEM>\r
-     <ITEM name="DispChars">Yes</ITEM>\r
-     <ITEM name="DispFormat">2</ITEM>\r
-     <ITEM name="ShowChanges">Yes</ITEM>\r
-     <ITEM name="ShowToolTips">Yes</ITEM>\r
-     <ITEM name="TopLineAddress">00000000</ITEM>\r
-    </PROPERTIES>\r
-   </POPUP>\r
-   <POPUP w="16" x="178" flags="0000000a" y="269" h="32" pid="4" iid="1">\r
-    <PROPERTIES>\r
-     <ITEM name="DataType">2</ITEM>\r
-     <ITEM name="DispChars">Yes</ITEM>\r
-     <ITEM name="DispFormat">2</ITEM>\r
-     <ITEM name="ShowChanges">Yes</ITEM>\r
-     <ITEM name="ShowToolTips">Yes</ITEM>\r
-     <ITEM name="TopLineAddress">00000100</ITEM>\r
-    </PROPERTIES>\r
-   </POPUP>\r
-   <POPUP w="16" x="198" flags="0000000a" y="289" h="8" pid="13" iid="1">\r
-    <PROPERTIES>\r
-     <ITEM name="DataType">2</ITEM>\r
-     <ITEM name="DispChars">Yes</ITEM>\r
-     <ITEM name="DispFormat">2</ITEM>\r
-     <ITEM name="ShowChanges">Yes</ITEM>\r
-     <ITEM name="ShowToolTips">Yes</ITEM>\r
-     <ITEM name="TopLineAddress">00000020</ITEM>\r
-    </PROPERTIES>\r
-   </POPUP>\r
-  </PWI>\r
- </MODULE>\r
-</WORKSPACE>\r
diff --git a/Examples/7-segm_raw_dynamic/Backup Of 7-segm_raw_dynamic.pdsbak b/Examples/7-segm_raw_dynamic/Backup Of 7-segm_raw_dynamic.pdsbak
deleted file mode 100644 (file)
index 9bed130..0000000
Binary files a/Examples/7-segm_raw_dynamic/Backup Of 7-segm_raw_dynamic.pdsbak and /dev/null differ
diff --git a/Examples/7-segm_raw_dynamic/Last Loaded 7-segm_raw_dynamic.pdsbak b/Examples/7-segm_raw_dynamic/Last Loaded 7-segm_raw_dynamic.pdsbak
deleted file mode 100644 (file)
index 8acc458..0000000
Binary files a/Examples/7-segm_raw_dynamic/Last Loaded 7-segm_raw_dynamic.pdsbak and /dev/null differ
diff --git a/Examples/7-segm_raw_dynamic_timer/7-segm_raw_dynamic_timer.PDF b/Examples/7-segm_raw_dynamic_timer/7-segm_raw_dynamic_timer.PDF
new file mode 100644 (file)
index 0000000..dd885da
Binary files /dev/null and b/Examples/7-segm_raw_dynamic_timer/7-segm_raw_dynamic_timer.PDF differ
diff --git a/Examples/7-segm_raw_dynamic_timer/7-segm_raw_dynamic_timer.ino b/Examples/7-segm_raw_dynamic_timer/7-segm_raw_dynamic_timer.ino
new file mode 100644 (file)
index 0000000..b14da34
--- /dev/null
@@ -0,0 +1,140 @@
+#define A_PIN  12\r
+#define B_PIN  13\r
+#define C_PIN  7\r
+#define D_PIN  8\r
+#define E_PIN  9\r
+#define F_PIN  11\r
+#define G_PIN  10\r
+#define DP_PIN 6\r
+#define EN0_PIN        5\r
+#define EN1_PIN        4\r
+#define EN2_PIN        3\r
+#define EN3_PIN        2\r
+\r
+int print_dec(uint16_t value);\r
+int print_digit(uint8_t position, uint8_t digit);\r
+void timer_init(void);\r
+void gpio_init(void);\r
+\r
+const uint8_t segm_pins[8] = {A_PIN, B_PIN, C_PIN, D_PIN, E_PIN, F_PIN, G_PIN, DP_PIN};\r
+const uint8_t en_pins[4] = {EN0_PIN, EN1_PIN, EN2_PIN, EN3_PIN};\r
+\r
+const uint8_t segment_map[16] =\r
+{\r
+       // A B C D E F G DP\r
+       0b00000011,     // 0\r
+       0b10011111,     // 1\r
+       0b00100101,     // 2\r
+       0b00001101,     // 3\r
+       0b10011001,     // 4\r
+       0b01001001,     // 5\r
+       0b01000001,     // 6\r
+       0b00011111,     // 7\r
+       0b00000001,     // 8\r
+       0b00001001,     // 9\r
+       0b00010001,     // A\r
+       0b11000001,     // b\r
+       0b01100011,     // C\r
+       0b10000101,     // d\r
+       0b01100001,     // E\r
+       0b01110001      // F\r
+};\r
+\r
+volatile uint8_t display_value[4] = {0};\r
+volatile uint8_t current_digit = 0;\r
+\r
+void setup()\r
+{\r
+       gpio_init();\r
+       timer_init();\r
+}\r
+\r
+void loop()\r
+{\r
+       for (uint16_t cnt = 9999; cnt > 0; cnt--)\r
+       {\r
+               print_dec(cnt);\r
+               delay(100);\r
+       }\r
+       delay(3000);\r
+}\r
+\r
+int print_dec(uint16_t value)\r
+{\r
+       if (value > 9999)\r
+       {\r
+               return -1;\r
+       }\r
+\r
+       for (uint8_t i = 0; i < 4; i++)\r
+       {\r
+               print_digit(3 - i, value % 10);\r
+               value /= 10;\r
+       }\r
+\r
+       return 0;\r
+}\r
+\r
+int print_digit(uint8_t position, uint8_t digit)\r
+{\r
+       if (position > 4 || digit > 15)\r
+       {\r
+               return -1;\r
+       }\r
+\r
+       display_value[position] = digit;\r
+\r
+       return 0;\r
+}\r
+\r
+ISR(TIMER1_OVF_vect)\r
+{\r
+       digitalWrite(en_pins[current_digit], HIGH);\r
+\r
+       current_digit++;\r
+       if (current_digit > 3)\r
+       {\r
+               current_digit = 0;\r
+       }\r
+\r
+       for (uint8_t i = 0; i < 8; i++)\r
+       {\r
+               digitalWrite(segm_pins[i], segment_map[display_value[current_digit]] & (128 >> i));\r
+       }\r
+\r
+       digitalWrite(en_pins[current_digit], LOW);\r
+}\r
+\r
+void gpio_init(void)\r
+{\r
+       uint8_t i;\r
+       for (i = 0; i < 4; i++)\r
+       {\r
+               pinMode(en_pins[i], OUTPUT);\r
+               digitalWrite(en_pins[i], HIGH);\r
+       }\r
+       for (i = 0; i < 8; i++)\r
+       {\r
+               pinMode(segm_pins[i], OUTPUT);\r
+               digitalWrite(segm_pins[i], HIGH);\r
+       }\r
+}\r
+\r
+void timer_init(void)\r
+{\r
+       noInterrupts();\r
+       \r
+       // After clearing TCCR1B the timer is stopped\r
+       TCCR1B = 0;\r
+       TCNT1  = 0;\r
+       \r
+       TCCR1A = (1 << WGM11);\r
+       TCCR1B |= (1 << WGM12) | (1 << WGM13);\r
+       TIMSK1 = (1 << TOIE1);\r
+\r
+       // Set frequency to 1kHz\r
+       ICR1 = 1999;\r
+       TCCR1B |= (1 << CS11);\r
+\r
+       interrupts();\r
+}\r
diff --git a/Examples/7-segm_raw_dynamic_timer/7-segm_raw_dynamic_timer.pdsprj b/Examples/7-segm_raw_dynamic_timer/7-segm_raw_dynamic_timer.pdsprj
new file mode 100644 (file)
index 0000000..d482f6c
Binary files /dev/null and b/Examples/7-segm_raw_dynamic_timer/7-segm_raw_dynamic_timer.pdsprj differ
diff --git a/Examples/7-segm_raw_dynamic_timer/7-segm_raw_dynamic_timer.pdsprj.DESKTOP-DNPR54D.Cartogan.workspace b/Examples/7-segm_raw_dynamic_timer/7-segm_raw_dynamic_timer.pdsprj.DESKTOP-DNPR54D.Cartogan.workspace
new file mode 100644 (file)
index 0000000..1c21abc
--- /dev/null
@@ -0,0 +1,101 @@
+<?xml version='1.0' encoding='UTF-8' standalone='yes'?>\r
+<WORKSPACE>\r
+ <FRAME activewindow="0">\r
+  <PLACEMENT>2c0000000200000003000000ffffffffffffffffffffffffffffffffab0000000d000000d606000004040000</PLACEMENT>\r
+  <WINDOW type="default" module="ISIS"/>\r
+  <WINDOW type="device" module="LIBMAN"/>\r
+ </FRAME>\r
+ <MODULE name="VSMDEBUG">\r
+  <PWI>\r
+   <POPUP w="800" x="38" flags="00000002" y="129" h="200" pid="0" iid="-1">\r
+    <PROPERTIES>\r
+     <ITEM name="Message Column Width">542</ITEM>\r
+     <ITEM name="ShowGrid">No</ITEM>\r
+     <ITEM name="Source Column Width">100</ITEM>\r
+     <ITEM name="Time Column Width">120</ITEM>\r
+     <ITEM name="Version">100</ITEM>\r
+    </PROPERTIES>\r
+   </POPUP>\r
+   <POPUP w="350" x="58" flags="00000032" y="149" h="200" pid="1" iid="-1">\r
+    <PROPERTIES>\r
+     <ITEM name="Address Column Width">83</ITEM>\r
+     <ITEM name="AutoResize">No</ITEM>\r
+     <ITEM name="Gridlines">Yes</ITEM>\r
+     <ITEM name="Name Column Width">83</ITEM>\r
+     <ITEM name="ShowAddresses">Yes</ITEM>\r
+     <ITEM name="ShowPreviousValues">No</ITEM>\r
+     <ITEM name="ShowTypes">No</ITEM>\r
+     <ITEM name="ShowWatchPoint">Yes</ITEM>\r
+     <ITEM name="TriggerMode">0</ITEM>\r
+     <ITEM name="Value Column Width">83</ITEM>\r
+     <ITEM name="Version">100</ITEM>\r
+     <ITEM name="Watch Expression Column Width">83</ITEM>\r
+     <ITEM name="nItems">0</ITEM>\r
+    </PROPERTIES>\r
+   </POPUP>\r
+   <POPUP w="226" x="78" flags="00000008" y="169" h="215" pid="3" iid="1">\r
+    <PROPERTIES/>\r
+   </POPUP>\r
+   <POPUP w="8" x="98" flags="0000000a" y="189" h="1" pid="10" iid="1">\r
+    <PROPERTIES>\r
+     <ITEM name="DataType">2</ITEM>\r
+     <ITEM name="DispChars">Yes</ITEM>\r
+     <ITEM name="DispFormat">2</ITEM>\r
+     <ITEM name="ShowChanges">Yes</ITEM>\r
+     <ITEM name="ShowToolTips">Yes</ITEM>\r
+     <ITEM name="TopLineAddress">00000000</ITEM>\r
+    </PROPERTIES>\r
+   </POPUP>\r
+   <POPUP w="8" x="118" flags="0000000a" y="209" h="32" pid="6" iid="1">\r
+    <PROPERTIES>\r
+     <ITEM name="DataType">2</ITEM>\r
+     <ITEM name="DispChars">Yes</ITEM>\r
+     <ITEM name="DispFormat">2</ITEM>\r
+     <ITEM name="ShowChanges">Yes</ITEM>\r
+     <ITEM name="ShowToolTips">Yes</ITEM>\r
+     <ITEM name="TopLineAddress">00000000</ITEM>\r
+    </PROPERTIES>\r
+   </POPUP>\r
+   <POPUP w="16" x="138" flags="0000000a" y="229" h="32" pid="7" iid="1">\r
+    <PROPERTIES>\r
+     <ITEM name="DataType">2</ITEM>\r
+     <ITEM name="DispChars">Yes</ITEM>\r
+     <ITEM name="DispFormat">2</ITEM>\r
+     <ITEM name="ShowChanges">Yes</ITEM>\r
+     <ITEM name="ShowToolTips">Yes</ITEM>\r
+     <ITEM name="TopLineAddress">00000000</ITEM>\r
+    </PROPERTIES>\r
+   </POPUP>\r
+   <POPUP w="16" x="158" flags="80000000" y="249" h="32" pid="14" iid="1">\r
+    <PROPERTIES>\r
+     <ITEM name="DataType">2</ITEM>\r
+     <ITEM name="DispChars">Yes</ITEM>\r
+     <ITEM name="DispFormat">2</ITEM>\r
+     <ITEM name="ShowChanges">Yes</ITEM>\r
+     <ITEM name="ShowToolTips">Yes</ITEM>\r
+     <ITEM name="TopLineAddress">00000000</ITEM>\r
+    </PROPERTIES>\r
+   </POPUP>\r
+   <POPUP w="16" x="178" flags="0000000a" y="269" h="32" pid="4" iid="1">\r
+    <PROPERTIES>\r
+     <ITEM name="DataType">2</ITEM>\r
+     <ITEM name="DispChars">Yes</ITEM>\r
+     <ITEM name="DispFormat">2</ITEM>\r
+     <ITEM name="ShowChanges">Yes</ITEM>\r
+     <ITEM name="ShowToolTips">Yes</ITEM>\r
+     <ITEM name="TopLineAddress">00000100</ITEM>\r
+    </PROPERTIES>\r
+   </POPUP>\r
+   <POPUP w="16" x="198" flags="0000000a" y="289" h="8" pid="13" iid="1">\r
+    <PROPERTIES>\r
+     <ITEM name="DataType">2</ITEM>\r
+     <ITEM name="DispChars">Yes</ITEM>\r
+     <ITEM name="DispFormat">2</ITEM>\r
+     <ITEM name="ShowChanges">Yes</ITEM>\r
+     <ITEM name="ShowToolTips">Yes</ITEM>\r
+     <ITEM name="TopLineAddress">00000020</ITEM>\r
+    </PROPERTIES>\r
+   </POPUP>\r
+  </PWI>\r
+ </MODULE>\r
+</WORKSPACE>\r
diff --git a/Examples/7-segm_raw_dynamic_timer/7-segm_raw_dynamic_timer.png b/Examples/7-segm_raw_dynamic_timer/7-segm_raw_dynamic_timer.png
new file mode 100644 (file)
index 0000000..26fb620
Binary files /dev/null and b/Examples/7-segm_raw_dynamic_timer/7-segm_raw_dynamic_timer.png differ
diff --git a/Examples/7-segm_raw_dynamic_timer/Backup Of 7-segm_raw_dynamic_timer.pdsbak b/Examples/7-segm_raw_dynamic_timer/Backup Of 7-segm_raw_dynamic_timer.pdsbak
new file mode 100644 (file)
index 0000000..9bed130
Binary files /dev/null and b/Examples/7-segm_raw_dynamic_timer/Backup Of 7-segm_raw_dynamic_timer.pdsbak differ
diff --git a/Examples/7-segm_raw_dynamic_timer/Last Loaded 7-segm_raw_dynamic_timer.pdsbak b/Examples/7-segm_raw_dynamic_timer/Last Loaded 7-segm_raw_dynamic_timer.pdsbak
new file mode 100644 (file)
index 0000000..8acc458
Binary files /dev/null and b/Examples/7-segm_raw_dynamic_timer/Last Loaded 7-segm_raw_dynamic_timer.pdsbak differ
diff --git a/Examples/LCD_scroll/LCD_scroll.ino b/Examples/LCD_scroll/LCD_scroll.ino
new file mode 100644 (file)
index 0000000..c84426d
--- /dev/null
@@ -0,0 +1,98 @@
+/*
+  LiquidCrystal Library - scrollDisplayLeft() and scrollDisplayRight()
+
+ Demonstrates the use a 16x2 LCD display.  The LiquidCrystal
+ library works with all LCD displays that are compatible with the
+ Hitachi HD44780 driver. There are many of them out there, and you
+ can usually tell them by the 16-pin interface.
+
+ This sketch prints "Hello World!" to the LCD and uses the
+ scrollDisplayLeft() and scrollDisplayRight() methods to scroll
+ the text.
+
+  The circuit:
+ * LCD RS pin to digital pin 12
+ * LCD Enable pin to digital pin 11
+ * LCD D4 pin to digital pin 5
+ * LCD D5 pin to digital pin 4
+ * LCD D6 pin to digital pin 3
+ * LCD D7 pin to digital pin 2
+ * LCD R/W pin to ground
+ * 10K resistor:
+ * ends to +5V and ground
+ * wiper to LCD VO pin (pin 3)
+
+ Library originally added 18 Apr 2008
+ by David A. Mellis
+ library modified 5 Jul 2009
+ by Limor Fried (http://www.ladyada.net)
+ example added 9 Jul 2009
+ by Tom Igoe
+ modified 22 Nov 2010
+ by Tom Igoe
+ modified 7 Nov 2016
+ by Arturo Guadalupi
+ modified 24 Feb 2021
+ by Vladimir Garistov
+
+ This example code is in the public domain.
+
+ http://www.arduino.cc/en/Tutorial/LiquidCrystalScroll
+
+*/
+
+#include <LiquidCrystal.h>
+
+#define RS     12
+#define EN     11
+#define D4     5
+#define D5     4
+#define D6     3
+#define D7     2
+
+#define COLS 16
+#define ROWS 2
+
+// initialize the library by associating any needed LCD interface pin
+// with the arduino pin number it is connected to
+LiquidCrystal lcd(RS, EN, D4, D5, D6, D7);
+
+void setup()
+{
+       // set up the LCD's number of columns and rows:
+       lcd.begin(COLS, ROWS);
+       lcd.print("hello, world!");
+       delay(1000);
+}
+
+void loop()
+{
+       // scroll 13 positions (string length) to the left
+       // to move it offscreen left:
+       for (uint8_t positionCounter = 0; positionCounter < 13; positionCounter++)
+       {
+               // scroll one position left:
+               lcd.scrollDisplayLeft();
+               delay(150);
+       }
+
+       // scroll 29 positions (string length + display length) to the right
+       // to move it offscreen right:
+       for (uint8_t positionCounter = 0; positionCounter < 29; positionCounter++)
+       {
+               // scroll one position right:
+               lcd.scrollDisplayRight();
+               delay(150);
+       }
+
+       // scroll 16 positions (display length + string length) to the left
+       // to move it back to center:
+       for (uint8_t positionCounter = 0; positionCounter < 16; positionCounter++)
+       {
+               // scroll one position left:
+               lcd.scrollDisplayLeft();
+               delay(150);
+       }
+
+       delay(1000);
+}
diff --git a/Examples/LCD_scroll/LCD_scroll.png b/Examples/LCD_scroll/LCD_scroll.png
new file mode 100644 (file)
index 0000000..9d12da2
Binary files /dev/null and b/Examples/LCD_scroll/LCD_scroll.png differ
diff --git a/LCD_layers.png b/LCD_layers.png
new file mode 100644 (file)
index 0000000..b35d7b3
Binary files /dev/null and b/LCD_layers.png differ
diff --git a/LCD_layers.svg b/LCD_layers.svg
new file mode 100644 (file)
index 0000000..ac636af
--- /dev/null
@@ -0,0 +1,401 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg:svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://web.resource.org/cc/"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   version="1.0"
+   width="800"
+   height="600"
+   id="svg2"
+   sodipodi:version="0.32"
+   inkscape:version="0.44.1"
+   sodipodi:docname="LCD layers.svg"
+   sodipodi:docbase="C:\Documents and Settings\Administrator\Desktop\Wiki">
+  <sodipodi:namedview
+     inkscape:window-height="573"
+     inkscape:window-width="853"
+     inkscape:pageshadow="2"
+     inkscape:pageopacity="0.0"
+     guidetolerance="10.0"
+     gridtolerance="10.0"
+     objecttolerance="10.0"
+     borderopacity="1.0"
+     bordercolor="#666666"
+     pagecolor="#ffffff"
+     id="base"
+     inkscape:zoom="0.63"
+     inkscape:cx="400"
+     inkscape:cy="300"
+     inkscape:window-x="244"
+     inkscape:window-y="185"
+     inkscape:current-layer="layer1" />
+  <svg:metadata
+     id="metadata">
+    <RDF>
+      <Work
+         about="">
+        <format>image/svg+xml</format>
+        <type
+           resource="http://purl.org/dc/dcmitype/StillImage" />
+        <license
+           resource="http://creativecommons.org/licenses/by-sa/2.0/" />
+        <title>Layer of an LCD display</title>
+        <creator>
+          <Agent>
+            <title>Ed Sanders</title>
+          </Agent>
+        </creator>
+        <description>1. Vertical filter film to polarize the light as it enters.
+2. Glass substrate with ITO electrodes. The shapes of these electrodes will determine the dark shapes that will appear when the LCD is turned on. Vertical ridges are etched on the surface so the liquid crystals are in line with the polarized light.
+3. Twisted nematic liquid crystals.
+4. Glass substrate with common electrode film (ITO) with horizontal ridges to line up with the horizontal filter.
+5. Horizontal filter film to block/allow through light.
+6. Reflective surface to send light back to viewer.</description>
+      </Work>
+      <License
+         about="http://creativecommons.org/licenses/by-sa/2.0/">
+        <permits
+           resource="http://web.resource.org/cc/Reproduction" />
+        <permits
+           resource="http://web.resource.org/cc/Distribution" />
+        <requires
+           resource="http://web.resource.org/cc/Notice" />
+        <requires
+           resource="http://web.resource.org/cc/Attribution" />
+        <permits
+           resource="http://web.resource.org/cc/DerivativeWorks" />
+        <requires
+           resource="http://web.resource.org/cc/ShareAlike" />
+      </License>
+    </RDF>
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+      </cc:Work>
+    </rdf:RDF>
+  </svg:metadata>
+  <svg:defs
+     id="defs4">
+    <svg:linearGradient
+       id="linearGradient5215">
+      <svg:stop
+         style="stop-color:#808080;stop-opacity:1"
+         offset="0"
+         id="stop5217" />
+      <svg:stop
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="0.5"
+         id="stop5223" />
+      <svg:stop
+         style="stop-color:#808080;stop-opacity:1"
+         offset="1"
+         id="stop5219" />
+    </svg:linearGradient>
+    <svg:linearGradient
+       id="linearGradient5189">
+      <svg:stop
+         style="stop-color:#007e80;stop-opacity:0.5"
+         offset="0"
+         id="stop5191" />
+      <svg:stop
+         style="stop-color:#00ffff;stop-opacity:0"
+         offset="0.16894737"
+         id="stop5193" />
+      <svg:stop
+         style="stop-color:#008080;stop-opacity:0.5"
+         offset="0.32500002"
+         id="stop5195" />
+      <svg:stop
+         style="stop-color:#00ffff;stop-opacity:0"
+         offset="0.49875"
+         id="stop5197" />
+      <svg:stop
+         style="stop-color:#008080;stop-opacity:0.5"
+         offset="0.66874999"
+         id="stop5199" />
+      <svg:stop
+         style="stop-color:#00ffff;stop-opacity:0"
+         offset="0.82999998"
+         id="stop5201" />
+      <svg:stop
+         style="stop-color:#008080;stop-opacity:0.5"
+         offset="1"
+         id="stop5203" />
+    </svg:linearGradient>
+    <svg:linearGradient
+       id="linearGradient4292">
+      <svg:stop
+         style="stop-color:#000000;stop-opacity:0.5"
+         offset="0"
+         id="stop4294" />
+      <svg:stop
+         style="stop-color:#000000;stop-opacity:0"
+         offset="0.16894737"
+         id="stop4302" />
+      <svg:stop
+         style="stop-color:#000000;stop-opacity:0.5"
+         offset="0.33500001"
+         id="stop4304" />
+      <svg:stop
+         style="stop-color:#000000;stop-opacity:0"
+         offset="0.49875"
+         id="stop4306" />
+      <svg:stop
+         style="stop-color:#000000;stop-opacity:0.5"
+         offset="0.65875"
+         id="stop4308" />
+      <svg:stop
+         style="stop-color:#000000;stop-opacity:0"
+         offset="0.82999998"
+         id="stop4300" />
+      <svg:stop
+         style="stop-color:#000000;stop-opacity:0.5"
+         offset="1"
+         id="stop4296" />
+    </svg:linearGradient>
+    <svg:linearGradient
+       x1="529.52014"
+       y1="39.520123"
+       x2="730.47986"
+       y2="170.47987"
+       id="linearGradient5253"
+       xlink:href="#linearGradient5215"
+       gradientUnits="userSpaceOnUse" />
+    <svg:linearGradient
+       x1="270.47989"
+       y1="299.52011"
+       x2="270.47989"
+       y2="430.47989"
+       id="linearGradient5255"
+       xlink:href="#linearGradient4292"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(360,-180)" />
+    <svg:radialGradient
+       cx="250"
+       cy="285"
+       r="100.47988"
+       fx="250"
+       fy="285"
+       id="radialGradient5257"
+       xlink:href="#linearGradient5189"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.238757,1.844065e-2,-1.814531e-2,1.218917,25.48229,-7.0013)" />
+    <svg:linearGradient
+       x1="69.520126"
+       y1="365"
+       x2="270.47989"
+       y2="365"
+       id="linearGradient5259"
+       xlink:href="#linearGradient4292"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-40,140)" />
+    <svg:linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5215"
+       id="linearGradient1942"
+       gradientUnits="userSpaceOnUse"
+       x1="529.52014"
+       y1="39.520123"
+       x2="730.47986"
+       y2="170.47987"
+       gradientTransform="matrix(0.809839,0,0,0.809839,105.3918,32.63521)" />
+    <svg:linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4292"
+       id="linearGradient1944"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.871795,0,0,0.871795,380.206,-131.1649)"
+       x1="270.47989"
+       y1="299.52011"
+       x2="270.47989"
+       y2="430.47989" />
+    <svg:radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5189"
+       id="radialGradient1946"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.173815,1.74739e-2,-1.719404e-2,1.155016,48.26072,6.315477)"
+       cx="250"
+       cy="285"
+       fx="250"
+       fy="285"
+       r="100.47988" />
+  </svg:defs>
+  <svg:g
+     id="layer1">
+    <svg:g
+       transform="matrix(1,0.199726,0,1,20,-80.89588)"
+       id="g5225">
+      <svg:path
+         style="color:black;fill:url(#linearGradient1942);fill-opacity:1;fill-rule:nonzero;stroke:black;stroke-width:0.77724475;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+         d="M 532.98711,75.070368 L 698.19438,64.705308 L 696.5747,170.30795 L 534.60678,170.30795 L 532.98711,75.070368 z "
+         id="rect5211"
+         sodipodi:nodetypes="ccccc" />
+      <svg:path
+         style="color:black;fill:url(#linearGradient1944);fill-opacity:1;fill-rule:nonzero;stroke:black;stroke-width:0.83670676;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+         d="M 439.48811,139.43976 L 617.33433,130.02533 L 615.59075,243.70694 L 441.2317,243.70694 L 439.48811,139.43976 z "
+         id="rect5207"
+         sodipodi:nodetypes="ccccc" />
+      <svg:path
+         style="color:black;fill:navy;fill-opacity:0.15686275;fill-rule:nonzero;stroke:black;stroke-width:0.87667048;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+         d="M 341.8154,209.82988 L 528.15611,201.79265 L 526.32924,320.90406 L 343.64227,320.90406 L 341.8154,209.82988 z "
+         id="rect5205"
+         sodipodi:nodetypes="ccccc" />
+      <svg:path
+         style="color:black;fill:url(#radialGradient1946);fill-opacity:1;fill-rule:nonzero;stroke:black;stroke-width:0.90967226;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+         d="M 240.1615,284.33477 L 433.46686,277.8923 L 431.57171,401.4556 L 242.05665,401.4556 L 240.1615,284.33477 z "
+         id="rect4310"
+         sodipodi:nodetypes="ccccc" />
+      <svg:g
+         transform="matrix(0.979009,0,0,0.979009,-49.71465,299.3913)"
+         id="g4251">
+        <svg:path
+           style="color:black;fill:black;fill-opacity:0.1570513;fill-rule:nonzero;stroke:black;stroke-width:0.95975149;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+           d="M 188,64.399452 L 392,59.600548 L 390,190 L 190,190 L 188,64.399452 z "
+           id="rect3323"
+           sodipodi:nodetypes="ccccc" />
+        <svg:g
+           transform="matrix(0.4,0,0,0.4,211.5,80.5)"
+           id="g3310">
+          <svg:g
+             id="g3149">
+            <svg:path
+               d="M 25,0 L 95,0 L 105,10 L 95,20 L 25,20 L 15,10 L 25,0 z "
+               style="opacity:0.3;color:black;fill:black;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+               id="segment" />
+            <svg:use
+               transform="translate(0,101)"
+               id="use3298"
+               x="0"
+               y="0"
+               width="800"
+               height="1052.3622"
+               xlink:href="#segment" />
+            <svg:use
+               transform="translate(0,202)"
+               id="use3300"
+               x="0"
+               y="0"
+               width="800"
+               height="1052.3622"
+               xlink:href="#segment" />
+            <svg:use
+               transform="matrix(0,1,-1,0,121,0)"
+               id="use3302"
+               x="0"
+               y="0"
+               width="800"
+               height="1052.3622"
+               xlink:href="#segment" />
+            <svg:use
+               transform="matrix(0,1,-1,0,20,0)"
+               id="use3304"
+               x="0"
+               y="0"
+               width="800"
+               height="1052.3622"
+               xlink:href="#segment" />
+            <svg:use
+               transform="matrix(0,1,-1,0,121,101)"
+               id="use3306"
+               x="0"
+               y="0"
+               width="800"
+               height="1052.3622"
+               xlink:href="#segment" />
+            <svg:use
+               transform="matrix(0,1,-1,0,20,101)"
+               id="use3308"
+               x="0"
+               y="0"
+               width="800"
+               height="1052.3622"
+               xlink:href="#segment" />
+          </svg:g>
+          <svg:use
+             transform="translate(136,0)"
+             id="use3258"
+             x="0"
+             y="0"
+             width="800"
+             height="1052.3622"
+             xlink:href="#g3149" />
+          <svg:use
+             transform="translate(272,0)"
+             id="use3260"
+             x="0"
+             y="0"
+             width="800"
+             height="1052.3622"
+             xlink:href="#g3149" />
+        </svg:g>
+      </svg:g>
+      <svg:path
+         style="color:black;fill:url(#linearGradient5259);fill-opacity:1;fill-rule:nonzero;stroke:black;stroke-width:0.95975149;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:inline;overflow:visible"
+         d="M 28,442.39945 L 232,439.60055 L 230,570 L 30,570 L 28,442.39945 z "
+         id="rect4290"
+         sodipodi:nodetypes="ccccc" />
+    </svg:g>
+    <svg:text
+       x="255"
+       y="535"
+       style="font-size:24px;font-weight:bold;font-stretch:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;font-family:Arial"
+       id="text5261"
+       xml:space="preserve"><svg:tspan
+         x="255"
+         y="535"
+         id="tspan5263">1</svg:tspan></svg:text>
+    <svg:text
+       x="357"
+       y="473"
+       style="font-size:24px;font-weight:bold;font-stretch:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:black;fill-opacity:1;font-family:Arial"
+       id="text5265"
+       xml:space="preserve"><svg:tspan
+         x="357"
+         y="473"
+         id="tspan5267">2</svg:tspan></svg:text>
+    <svg:text
+       x="457"
+       y="407"
+       style="font-size:24px;font-weight:bold;font-stretch:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:black;fill-opacity:1;font-family:Arial"
+       id="text5269"
+       xml:space="preserve"><svg:tspan
+         x="457"
+         y="407"
+         id="tspan5271">3</svg:tspan></svg:text>
+    <svg:text
+       x="553"
+       y="345"
+       style="font-size:24px;font-weight:bold;font-stretch:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:black;fill-opacity:1;font-family:Arial"
+       id="text5273"
+       xml:space="preserve"><svg:tspan
+         x="553"
+         y="345"
+         id="tspan5275">4</svg:tspan></svg:text>
+    <svg:text
+       x="641"
+       y="287"
+       style="font-size:24px;font-weight:bold;font-stretch:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:black;fill-opacity:1;font-family:Arial"
+       id="text5277"
+       xml:space="preserve"><svg:tspan
+         x="641"
+         y="287"
+         id="tspan5279">5</svg:tspan></svg:text>
+    <svg:text
+       x="723"
+       y="229"
+       style="font-size:24px;font-weight:bold;font-stretch:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:black;fill-opacity:1;font-family:Arial"
+       id="text5281"
+       xml:space="preserve"><svg:tspan
+         x="723"
+         y="229"
+         id="tspan5283">6</svg:tspan></svg:text>
+  </svg:g>
+</svg:svg>
diff --git a/TN-LCD-schematic-MS-208kB.png b/TN-LCD-schematic-MS-208kB.png
new file mode 100644 (file)
index 0000000..c15c1ff
Binary files /dev/null and b/TN-LCD-schematic-MS-208kB.png differ