{"id":365,"date":"2007-10-11T20:01:41","date_gmt":"2007-10-11T19:01:41","guid":{"rendered":"http:\/\/www.evertdekker.com\/wp\/?p=365"},"modified":"2023-01-07T16:17:58","modified_gmt":"2023-01-07T15:17:58","slug":"5-touchscreen","status":"publish","type":"post","link":"https:\/\/evertdekker.com\/wp\/?p=365","title":{"rendered":"5&#8243; Touchscreen"},"content":{"rendered":"<hr \/>\n<div class=\"n2_ss_slider_publish__option_code\" dir=\"ltr\" data-mode=\"id\"><\/div>\n<p>Here is the code in <a href=\"http:\/\/www.mcselec.com\">Bascom<\/a> for my 5&#8243; touchscreen. The schematic and code are adapted for the <a href=\"http:\/\/ledsee.com\">ledsee.com<\/a> 240&#215;128 touchscreen.<br \/>\nThis code is not very well documentated, for a better explanation of the code check my <a href=\"http:\/\/www.mcselec.com\/index.php?option=com_content&amp;task=view&amp;id=189&amp;Itemid=57\">3&#8243; application note<\/a> at the Bascom web site.<\/p>\n<p><a href=\"http:\/\/evertdekker.com\/Joomla\/images\/stories\/CodeVault\/5Inchtouchscreen\/5inchTouchscreen.zip\">Download code, schematic and buttons<\/a><\/p>\n<pre class=\"brush: vb; gutter: true\">$regfile = &quot;m128def.DAT&quot;\r\n$crystal = 7372800\r\n$baud = 19200\r\n$eepleave\r\n$loadersize = 512\r\n$hwstack = 100\r\n$swstack = 75\r\n$framesize = 40\r\n\r\n\r\nConfig Graphlcd = 240 * 128 , Dataport = Porta , Controlport = Portc , Ce = 3 , Cd = 0 , Wr = 2 , Rd = 1 , Reset = 4 , Fs = 5 , Mode = 6\r\nConfig Adc = Single , Prescaler = Auto , Reference = Internal\r\nConfig Timer1 = Timer , Prescale = 1024\r\nConst Timer1preload = 58336\r\nConfig Pinb.4 = Output\r\nRxtx Alias Porte.2\r\nSpeaker Alias Portf.7\r\nBacklight Alias Portb.4\r\nConst Buttonreturndelay = 20                                &#039;Buttonreturndelay in ms\r\nDim Temp As Byte , X As Word , Y As Word\r\nDim Hoofdmenutijdrun As Bit\r\nDim Row As Byte , Keyarray(3) As Byte , Col As Byte , Key As Byte , Keylus As Byte\r\nDim Keypressed As Byte , Menu As Byte , Holdmenu As Bit\r\nDim Tijdcount As Byte\r\nEnable Ovf1\r\nEnable Interrupts\r\nOn Timer1 1secint\r\nStart Adc\r\nStart Timer1\r\nReset Hoofdmenutijdrun\r\n\r\n\r\n\r\n&#039; Main\r\nReset Backlight                                             &#039;switch backlight on\r\n Cls\r\nCursor Off\r\nTemp = 0\r\nGosub Showbasisknoppen\r\nGosub Showhoofdmenu\r\nDo\r\n&#039;Your main prog here\r\n   Gosub Readtouch\r\n   Gosub Bepaaltoets\r\nIf Menu &gt; 1 Then\r\n    Hoofdmenutijdrun = 1\r\nElse\r\n   Hoofdmenutijdrun = 0\r\nEnd If\r\n\r\nIf Keypressed &gt; 0 Then\r\n Select Case Menu\r\n  Case 1 : Select Case Keypressed                           &#039;Hoofdmenu\r\n                  Case 11 : Gosub Foutje                    &#039;Key not used, so beep\r\n                  Case 12 : Print &quot;you pressed key &quot; ; Keypressed ; &quot; in menu &quot; ; Menu\r\n                            Gosub Showhoofdmenu             &#039;Current menu must be reload to refill the buttons\r\n                  Case 13 : Print &quot;you pressed key &quot; ; Keypressed ; &quot; in menu &quot; ; Menu\r\n                            Gosub Showhoofdmenu             &#039;Current menu must be reload to refill the buttons\r\n                  Case 14 : Gosub Showwandmeubelmenu\r\n                  Case 21 : Gosub Foutje\r\n                  Case 22 : Print &quot;you pressed key &quot; ; Keypressed ; &quot; in menu &quot; ; Menu\r\n                            Gosub Showhoofdmenu             &#039;Current menu must be reload to refill the buttons\r\n                  Case 23 : Print &quot;you pressed key &quot; ; Keypressed ; &quot; in menu &quot; ; Menu\r\n                            Gosub Showhoofdmenu             &#039;Current menu must be reload to refill the buttons\r\n                  Case 24 : Print &quot;you pressed key &quot; ; Keypressed ; &quot; in menu &quot; ; Menu\r\n                            Gosub Showhoofdmenu             &#039;Current menu must be reload to refill the buttons\r\n                  Case 31 : Gosub Foutje\r\n                  Case 32 : Print &quot;you pressed key &quot; ; Keypressed ; &quot; in menu &quot; ; Menu\r\n                            Gosub Showhoofdmenu             &#039;Current menu must be reload to refill the buttons\r\n                  Case 33 : Gosub Showjaloezvoormenu\r\n                  Case 34 : Print &quot;you pressed key &quot; ; Keypressed ; &quot; in menu &quot; ; Menu\r\n                            Gosub Showhoofdmenu             &#039;Current menu must be reload to refill the buttons\r\n                  Case 41 : Gosub Foutje\r\n                  Case 42 : Print &quot;you pressed key &quot; ; Keypressed ; &quot; in menu &quot; ; Menu\r\n                            Gosub Showhoofdmenu             &#039;Current menu must be reload to refill the buttons\r\n                  Case 43 : Print &quot;you pressed key &quot; ; Keypressed ; &quot; in menu &quot; ; Menu\r\n                            Gosub Showhoofdmenu             &#039;Current menu must be reload to refill the buttons\r\n                  Case 44 : Gosub Showhoofdmenu2\r\n                  End Select\r\n  Case 2 : Select Case Keypressed                           &#039;Jaloezieen voor menu\r\n                  Case 11 : Gosub Foutje\r\n                  Case 12 : Print &quot;you pressed key &quot; ; Keypressed ; &quot; in menu &quot; ; Menu\r\n                            Gosub Showjaloezvoormenu        &#039;Current menu must be reload to refill the buttons\r\n                  Case 13 : Print &quot;you pressed key &quot; ; Keypressed ; &quot; in menu &quot; ; Menu\r\n                            Gosub Showjaloezvoormenu        &#039;Current menu must be reload to refill the buttons\r\n                  Case 14 : Print &quot;you pressed key &quot; ; Keypressed ; &quot; in menu &quot; ; Menu\r\n                            Gosub Showjaloezvoormenu        &#039;Current menu must be reload to refill the buttons\r\n                  Case 21 : Gosub Foutje\r\n                  Case 22 : Print &quot;you pressed key &quot; ; Keypressed ; &quot; in menu &quot; ; Menu\r\n                            Gosub Showjaloezvoormenu        &#039;Current menu must be reload to refill the buttons\r\n                  Case 23 : Print &quot;you pressed key &quot; ; Keypressed ; &quot; in menu &quot; ; Menu\r\n                            Gosub Showjaloezvoormenu        &#039;Current menu must be reload to refill the buttons\r\n                  Case 24 : Gosub Foutje\r\n                  Case 31 : Gosub Foutje\r\n                  Case 32 : Print &quot;you pressed key &quot; ; Keypressed ; &quot; in menu &quot; ; Menu\r\n                            Gosub Showjaloezvoormenu        &#039;Current menu must be reload to refill the buttons\r\n                  Case 33 : Print &quot;you pressed key &quot; ; Keypressed ; &quot; in menu &quot; ; Menu\r\n                            Gosub Showjaloezvoormenu        &#039;Current menu must be reload to refill the buttons\r\n                  Case 34 : Gosub Foutje\r\n                  Case 41 : Gosub Foutje\r\n                  Case 42 : Gosub Foutje\r\n                  Case 43 : Gosub Foutje\r\n                  Case 44 : Gosub Showhoofdmenu\r\n                  End Select\r\n\r\n Case 12 : Select Case Keypressed                           &#039;Wandmeubel\r\n                  Case 11 : Gosub Foutje\r\n                  Case 12 : Print &quot;you pressed key &quot; ; Keypressed ; &quot; in menu &quot; ; Menu\r\n                            Gosub Showwandmeubelmenu        &#039;Current menu must be reload to refill the buttons\r\n                  Case 13 : Print &quot;you pressed key &quot; ; Keypressed ; &quot; in menu &quot; ; Menu\r\n                            Gosub Showwandmeubelmenu        &#039;Current menu must be reload to refill the buttons\r\n                  Case 14 : Gosub Foutje\r\n                  Case 21 : Gosub Foutje\r\n                  Case 22 : Print &quot;you pressed key &quot; ; Keypressed ; &quot; in menu &quot; ; Menu\r\n                            Gosub Showwandmeubelmenu        &#039;Current menu must be reload to refill the buttons\r\n                  Case 23 : Print &quot;you pressed key &quot; ; Keypressed ; &quot; in menu &quot; ; Menu\r\n                            Gosub Showwandmeubelmenu        &#039;Current menu must be reload to refill the buttons\r\n                  Case 24 : Gosub Foutje\r\n                  Case 31 : Gosub Foutje\r\n                  Case 32 : Print &quot;you pressed key &quot; ; Keypressed ; &quot; in menu &quot; ; Menu\r\n                            Gosub Showwandmeubelmenu        &#039;Current menu must be reload to refill the buttons\r\n                  Case 33 : Print &quot;you pressed key &quot; ; Keypressed ; &quot; in menu &quot; ; Menu\r\n                            Gosub Showwandmeubelmenu        &#039;Current menu must be reload to refill the buttons\r\n                  Case 34 : Gosub Foutje\r\n                  Case 41 : Gosub Foutje\r\n                  Case 42 : Print &quot;you pressed key &quot; ; Keypressed ; &quot; in menu &quot; ; Menu\r\n                            Gosub Showwandmeubelmenu        &#039;Current menu must be reload to refill the buttons\r\n                  Case 43 : Print &quot;you pressed key &quot; ; Keypressed ; &quot; in menu &quot; ; Menu\r\n                            Gosub Showwandmeubelmenu        &#039;Current menu must be reload to refill the buttons\r\n                  Case 44 : Gosub Showhoofdmenu             &#039; esc knop\r\n                  End Select\r\n\r\n  Case 21 : Select Case Keypressed                          &#039;Hoofdmenu 2\r\n                  Case 11 : Gosub Foutje\r\n                  Case 12 : Print &quot;you pressed key &quot; ; Keypressed ; &quot; in menu &quot; ; Menu\r\n                            Gosub Showhoofdmenu2            &#039;Current menu must be reload to refill the buttons\r\n                  Case 13 : Gosub Foutje\r\n                  Case 14 : Gosub Showhoofdmenu             &#039;Back to hoofdmenu1\r\n                  Case 21 : Gosub Foutje\r\n                  Case 22 : Gosub Foutje\r\n                  Case 23 : Gosub Foutje\r\n                  Case 24 : Gosub Foutje\r\n                  Case 31 : Gosub Foutje\r\n                  Case 32 : Gosub Foutje\r\n                  Case 33 : Gosub Foutje\r\n                  Case 34 : Gosub Foutje\r\n                  Case 41 : Gosub Foutje\r\n                  Case 42 : Gosub Foutje\r\n                  Case 43 : Gosub Foutje\r\n                  Case 44 : Gosub Foutje\r\n                  End Select\r\n\r\nEnd Select\r\n\r\n Keypressed = 0\r\nEnd If\r\nLoop\r\n\r\n\r\n&#039;=== Subroutines===\r\n\r\n\r\n1secint:\r\nIf Hoofdmenutijdrun = 1 Then\r\n   Incr Tijdcount\r\n        If Tijdcount =&gt; 10 Then                             &#039;Time delay return to hoofdmenu (mainmenu)\r\n        Hoofdmenutijdrun = 0 : Tijdcount = 0\r\n         If Holdmenu = 0 Then\r\n          Gosub Showhoofdmenu\r\n         End If\r\n         Else\r\n        End If\r\nEnd If\r\nTimer1 = Timer1preload\r\nReturn\r\n\r\n\r\n\r\nShowwandmeubelmenu:\r\nMenu = 12 : Holdmenu = 0\r\nShowpic 0 , 0 , Hwandmeubel                                 &#039;show a comnpressed picture\r\nShowpic 6 , 36 , Ledsaan\r\nShowpic 6 , 68 , Ledsuit\r\nShowpic 6 , 100 , Leeg\r\nShowpic 66 , 36 , Beidedeurenup\r\nShowpic 66 , 68 , Beidedeurendown\r\nShowpic 66 , 100 , Leeg\r\nShowpic 126 , 36 , Linkerdeurup\r\nShowpic 126 , 68 , Linkerdeurdown\r\nShowpic 126 , 100 , Leeg\r\nShowpic 186 , 36 , Rechterdeurup\r\nShowpic 186 , 68 , Rechterdeurdown\r\nShowpic 186 , 100 , Esc\r\nReturn\r\n\r\n\r\nShowjaloezvoormenu:\r\nMenu = 2 : Holdmenu = 0\r\nShowpic 0 , 0 , Hjalvoor                                    &#039;show a comnpressed picture\r\nShowpic 6 , 36 , Pijlomhoog\r\nShowpic 6 , 68 , Stopbutton\r\nShowpic 6 , 100 , Pijlomlaag\r\nShowpic 66 , 36 , Jalvf1\r\nShowpic 66 , 68 , Jalvf3\r\nShowpic 66 , 100 , Leeg\r\nShowpic 126 , 36 , Jalvf2\r\nShowpic 126 , 68 , Jalvf4\r\nShowpic 126 , 100 , Leeg\r\nShowpic 186 , 36 , Leeg\r\nShowpic 186 , 68 , Leeg\r\nShowpic 186 , 100 , Esc\r\nReturn\r\n\r\n\r\nShowhoofdmenu:\r\nMenu = 1 : Holdmenu = 0\r\nShowpic 0 , 0 , Headerhoofdmenu                             &#039;show a comnpressed picture\r\nShowpic 6 , 36 , Lichteettafel\r\nShowpic 66 , 36 , Lichtsalontafel\r\nShowpic 126 , 36 , Lichtkeuken\r\nShowpic 186 , 36 , Schemerlamp\r\nShowpic 6 , 68 , Lichttuin\r\nShowpic 66 , 68 , Leeg\r\nShowpic 126 , 68 , Jalvoor\r\nShowpic 186 , 68 , Jalachter\r\nShowpic 6 , 100 , Wandmeubel\r\nShowpic 66 , 100 , Versterker\r\nShowpic 126 , 100 , Autoprog\r\nShowpic 186 , 100 , Pijlrechts\r\nReturn\r\n\r\nShowhoofdmenu2:\r\nMenu = 21 : Holdmenu = 1\r\n&#039;Normaly the screen will go after 10sec back to the main menu. With Holdmenu=1 the screen will stay in this menu.\r\nShowpic 0 , 0 , Hhoofdmenu2                                 &#039;show a comnpressed picture\r\nShowpic 6 , 36 , Leeg\r\nShowpic 66 , 36 , Leeg\r\nShowpic 126 , 36 , Leeg\r\nShowpic 186 , 36 , Leeg\r\nShowpic 6 , 68 , Leeg\r\nShowpic 66 , 68 , Leeg\r\nShowpic 126 , 68 , Leeg\r\nShowpic 186 , 68 , Leeg\r\nShowpic 6 , 100 , Pijllinks\r\nShowpic 66 , 100 , Leeg\r\nShowpic 126 , 100 , Leeg\r\nShowpic 186 , 100 , Leeg\r\nReturn\r\n\r\n\r\n\r\n\r\n\r\nBepaaltoets:\r\nSelect Case X\r\n            Case 160 To 317 : Col = 10\r\n            Case 318 To 477 : Col = 20\r\n            Case 478 To 633 : Col = 30\r\n            Case 634 To 788 : Col = 40\r\n            Case Else Col = 0\r\nEnd Select\r\nSelect Case Y\r\n            Case 329 To 414 : Row = 1\r\n            Case 415 To 497 : Row = 2\r\n            Case 498 To 584 : Row = 3\r\n            Case 585 To 652 : Row = 4\r\n            Case Else Row = 0\r\nEnd Select\r\nKey = Col + Row\r\n&#039;locate 4 , 2 : Lcd &quot;Je drukte op knop ; &quot; ; key\r\nIf Key &gt; 0 Then\r\n  Keyarray(keylus) = Key\r\n  Incr Keylus\r\n  If Keylus &gt; 3 Then Keylus = 1\r\n   If Keyarray(1) = Keyarray(2) Then\r\n       If Keyarray(2) = Keyarray(3) Then\r\n                  &#039;  If Buzzertoggle = 0 then\r\n                      Sound Speaker , 1 , 65000\r\n                           Keypressed = Key\r\n                           Gosub Showpressedkey\r\n                           Tijdcount = 0\r\n       End If\r\n   End If\r\n End If\r\nReturn\r\n\r\nShowpressedkey:                                             &#039;Routine for &quot;animated&quot; buttons\r\nSelect Case Keypressed\r\nCase 12\r\n   Showpic 0 , 33 , Knopin\r\n     Waitms Buttonreturndelay\r\n   Showpic 0 , 33 , Knop\r\nCase 13\r\n   Showpic 0 , 65 , Knopin\r\n     Waitms Buttonreturndelay\r\n   Showpic 0 , 65 , Knop\r\nCase 14\r\n   Showpic 0 , 97 , Knopin\r\n     Waitms Buttonreturndelay\r\n   Showpic 0 , 97 , Knop\r\nCase 22\r\n   Showpic 61 , 33 , Knopin\r\n     Waitms Buttonreturndelay\r\n   Showpic 61 , 33 , Knop\r\nCase 23\r\n   Showpic 61 , 65 , Knopin\r\n     Waitms Buttonreturndelay\r\n   Showpic 61 , 65 , Knop\r\nCase 24\r\n   Showpic 61 , 97 , Knopin\r\n     Waitms Buttonreturndelay\r\n   Showpic 61 , 97 , Knop\r\nCase 32\r\n   Showpic 121 , 33 , Knopin\r\n     Waitms Buttonreturndelay\r\n   Showpic 121 , 33 , Knop\r\nCase 33\r\n   Showpic 121 , 65 , Knopin\r\n     Waitms Buttonreturndelay\r\n   Showpic 121 , 65 , Knop\r\nCase 34\r\n   Showpic 121 , 97 , Knopin\r\n     Waitms Buttonreturndelay\r\n   Showpic 121 , 97 , Knop\r\nCase 42\r\nShowpic 181 , 33 , Knopin\r\n     Waitms Buttonreturndelay\r\n   Showpic 181 , 33 , Knop\r\nCase 43\r\nShowpic 181 , 65 , Knopin\r\n     Waitms Buttonreturndelay\r\n   Showpic 181 , 65 , Knop\r\n Case 44\r\nShowpic 181 , 97 , Knopin\r\n     Waitms Buttonreturndelay\r\n   Showpic 181 , 97 , Knop\r\nEnd Select\r\nReturn\r\n\r\nShowbasisknoppen:\r\nShowpic 0 , 33 , Knop\r\nShowpic 0 , 65 , Knop\r\nShowpic 0 , 97 , Knop\r\nShowpic 61 , 33 , Knop\r\nShowpic 61 , 65 , Knop\r\nShowpic 61 , 97 , Knop\r\nShowpic 121 , 33 , Knop\r\nShowpic 121 , 65 , Knop\r\nShowpic 121 , 97 , Knop\r\nShowpic 181 , 33 , Knop\r\nShowpic 181 , 65 , Knop\r\nShowpic 181 , 97 , Knop\r\nReturn\r\n\r\nReadtouch:\r\nConfig Pinf.0 = Output\r\nConfig Pinf.2 = Output\r\nSet Portf.0\r\nReset Portf.2\r\nDdrf.1 = 0 : Portf.1 = 1\r\nDdrf.3 = 0 : Portf.3 = 1\r\nWaitms 20\r\nY = Getadc(3)\r\nY = 1024 - Y\r\n&#039;Locate 4 , 2 : Lcd &quot;WAARDE X ; &quot; ; X : Waitms 200\r\nConfig Pinf.1 = Output\r\nConfig Pinf.3 = Output\r\nSet Portf.1\r\nReset Portf.3\r\nDdrf.0 = 0 : Portf.0 = 1\r\nDdrf.2 = 0 : Portf.2 = 1\r\nWaitms 20\r\nX = Getadc(2)\r\nX = 1024 - X\r\n&#039;locate 4 , 2 : Lcd &quot;WAARDE Y ; &quot; ; Y :waitms 200\r\nReturn\r\n\r\n\r\n\r\nFoutje:\r\nSound Speaker , 2 , 65000\r\nWaitms 50\r\nReturn\r\n\r\n\r\nHeaderhoofdmenu:\r\n$bgf &quot;..\\TouchbuttonsLarge\\HeaderHoofdmenu.bgf&quot;\r\nHhoofdmenu2:\r\n$bgf &quot;..\\TouchbuttonsLarge\\HHoofdmenu2.bgf&quot;\r\nHjalvoor:\r\n$bgf &quot;..\\TouchbuttonsLarge\\HJalVoor.bgf&quot;\r\nHwandmeubel:\r\n$bgf &quot;..\\TouchbuttonsLarge\\HWandmeubel.bgf&quot;\r\nKnop:\r\n$bgf &quot;..\\TouchbuttonsLarge\\knop.bgf&quot;\r\nKnopin:                                                     &#039;Button pressed in\r\n$bgf &quot;..\\TouchbuttonsLarge\\knopin.bgf&quot;\r\nLeeg:\r\n$bgf &quot;..\\TouchbuttonsLarge\\Leeg.bgf&quot;\r\nAutoprog:\r\n$bgf &quot;..\\TouchbuttonsLarge\\Autoprog.bgf&quot;\r\nLichtsalontafel:\r\n$bgf &quot;..\\TouchbuttonsLarge\\Lichtsalontafel.bgf&quot;\r\nLichteettafel:\r\n$bgf &quot;..\\TouchbuttonsLarge\\Lichteettafel.bgf&quot;\r\nLichtkeuken:\r\n$bgf &quot;..\\TouchbuttonsLarge\\LichtKeuken.bgf&quot;\r\nLichttuin:\r\n$bgf &quot;..\\TouchbuttonsLarge\\LichtTuin.bgf&quot;\r\nSchemerlamp:\r\n$bgf &quot;..\\TouchbuttonsLarge\\Schemerlamp.bgf&quot;\r\nJalvoor:\r\n$bgf &quot;..\\TouchbuttonsLarge\\Jalvoor.bgf&quot;\r\nJalachter:\r\n$bgf &quot;..\\TouchbuttonsLarge\\JalAchter.bgf&quot;\r\nWandmeubel:\r\n$bgf &quot;..\\TouchbuttonsLarge\\Wandmeubel.bgf&quot;\r\nVersterker:\r\n$bgf &quot;..\\TouchbuttonsLarge\\Versterker.bgf&quot;\r\nPijlrechts:\r\n$bgf &quot;..\\TouchbuttonsLarge\\Pijlrechts.bgf&quot;\r\nPijllinks:\r\n$bgf &quot;..\\TouchbuttonsLarge\\Pijllinks.bgf&quot;\r\nPijlomhoog:\r\n$bgf &quot;..\\TouchbuttonsLarge\\Pijlomhoog.bgf&quot;\r\nPijlomlaag:\r\n$bgf &quot;..\\TouchbuttonsLarge\\Pijlomlaag.bgf&quot;\r\nJalvf1:\r\n$bgf &quot;..\\TouchbuttonsLarge\\JalvF1.bgf&quot;\r\nJalvf2:\r\n$bgf &quot;..\\TouchbuttonsLarge\\JalvF2.bgf&quot;\r\nJalvf3:\r\n$bgf &quot;..\\TouchbuttonsLarge\\JalvF3.bgf&quot;\r\nJalvf4:\r\n$bgf &quot;..\\TouchbuttonsLarge\\JalvF4.bgf&quot;\r\nEsc:\r\n$bgf &quot;..\\TouchbuttonsLarge\\Esc.bgf&quot;\r\nStopbutton:\r\n$bgf &quot;..\\TouchbuttonsLarge\\Stopbutton.bgf&quot;\r\nF1:\r\n$bgf &quot;..\\TouchbuttonsLarge\\F1.bgf&quot;\r\nF2:\r\n$bgf &quot;..\\TouchbuttonsLarge\\F2.bgf&quot;\r\nF3:\r\n$bgf &quot;..\\TouchbuttonsLarge\\F3.bgf&quot;\r\nF4:\r\n$bgf &quot;..\\TouchbuttonsLarge\\F4.bgf&quot;\r\nLinkerdeurup:\r\n$bgf &quot;..\\TouchbuttonsLarge\\Linkerdeurup.bgf&quot;\r\nLinkerdeurdown:\r\n$bgf &quot;..\\TouchbuttonsLarge\\Linkerdeurdown.bgf&quot;\r\nRechterdeurup:\r\n$bgf &quot;..\\TouchbuttonsLarge\\Rechterdeurup.bgf&quot;\r\nRechterdeurdown:\r\n$bgf &quot;..\\TouchbuttonsLarge\\Rechterdeurdown.bgf&quot;\r\nBeidedeurenup:\r\n$bgf &quot;..\\TouchbuttonsLarge\\Beidedeurenup.bgf&quot;\r\nBeidedeurendown:\r\n$bgf &quot;..\\TouchbuttonsLarge\\Beidedeurendown.bgf&quot;\r\nLedsaan:\r\n$bgf &quot;..\\TouchbuttonsLarge\\Ledsaan.bgf&quot;\r\nLedsuit:\r\n$bgf &quot;..\\TouchbuttonsLarge\\Ledsuit.bgf&quot;<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Here is the code in Bascom for my 5&#8243; touchscreen. The schematic and code are adapted for the ledsee.com 240&#215;128 touchscreen. This code is not very well documentated, for a better explanation of the code check my 3&#8243; application note at the Bascom web site. Download code, schematic and buttons $regfile = &quot;m128def.DAT&quot; $crystal = [&#8230;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[46,26,45],"class_list":["post-365","post","type-post","status-publish","format-standard","hentry","category-bascom","tag-46","tag-bascom","tag-touchscreen"],"_links":{"self":[{"href":"https:\/\/evertdekker.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/365","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/evertdekker.com\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/evertdekker.com\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/evertdekker.com\/wp\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/evertdekker.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=365"}],"version-history":[{"count":5,"href":"https:\/\/evertdekker.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/365\/revisions"}],"predecessor-version":[{"id":1879,"href":"https:\/\/evertdekker.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/365\/revisions\/1879"}],"wp:attachment":[{"href":"https:\/\/evertdekker.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=365"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/evertdekker.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=365"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/evertdekker.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=365"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}