<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="pl-pl">
<link rel="self" type="application/atom+xml" href="https://forum.atnel.pl/feed.php?f=24&amp;t=22582&amp;mode" />

<title>ATNEL tech-forum</title>
<link href="https://forum.atnel.pl/index.php" />
<updated>2019-09-25T08:51:08+01:00</updated>

<author><name><![CDATA[ATNEL tech-forum]]></name></author>
<id>https://forum.atnel.pl/feed.php?f=24&amp;t=22582&amp;mode</id>
<entry>
<author><name><![CDATA[gizmo5418]]></name></author>
<updated>2019-09-25T08:51:08+01:00</updated>
<published>2019-09-25T08:51:08+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=22582&amp;p=222219#p222219</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=22582&amp;p=222219#p222219"/>
<title type="html"><![CDATA[Re: Problem z wyświetlaczem z qC ILI9341]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=22582&amp;p=222219#p222219"><![CDATA[
<div class="quotetitle">Bystrzacha napisał(a):</div><div class="quotecontent"><br />...Znalazłem w internecie mnóstwo programów...<br /></div><br /><br />Zacznij może od sprawdzenia przykładowych programów, które dostarcza producent. Na stronie przedmiotu w Bootland masz manual do pobrania, w którym jest wydruk prostego programu oraz link do przykładów.<br /><br />Ponadto w oknie terminala powinieneś zobaczyć komunikaty wysyłane przez poprawnie pracujące programy demonstracyjne od producenta. Odczytasz, czy wyświetlacz został rozpoznany....<br /><br />Wyświetlacze na tym kontrolerze potrafią pracować z zegarem SPI do nawet 42MHz ( wyżej nie sprawdzałem ), choć nota katalogowa mówi, że max. zegar dla SPI to 10MHz<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=1967">gizmo5418</a> — 25 wrz 2019, o 08:51</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[phill2k]]></name></author>
<updated>2019-09-25T08:39:32+01:00</updated>
<published>2019-09-25T08:39:32+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=22582&amp;p=222218#p222218</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=22582&amp;p=222218#p222218"/>
<title type="html"><![CDATA[Re: Problem z wyświetlaczem z qC ILI9341]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=22582&amp;p=222218#p222218"><![CDATA[
<div class="quotetitle">Bystrzacha napisał(a):</div><div class="quotecontent"><br />Witam,<br />niedawno kupiłem wyświetlacz <!-- m --><a class="postlink" href="https://botland.com.pl/pl/wyswietlacze-" >https://botland.com.pl/pl/wyswietlacze-</a><!-- m --> ... results=67. Znalazłem w internecie mnóstwo programów do wgrania, aby cokolwiek się pokazało, a za każdym razem widzę tylko zapalony biały ekran.<br />Ekran umieściłem na Arduino Leonardo. Załączałem już różne biblioteki(m.in Adafruit_GFX i Adafruit_TFTLCD) i nie wiem dlaczego nie działa.<br />Proszę, jeżeli ktoś dałby radę mi pomóc to będę bardzo wdzięczny:)<br /></div><br /><br />Jakieś dwa miesiące temu uruchamiałem podobny wyświetlacz - użyłem wtedy tej biblioteki do TFT i ekranu dotykowego <a href="https://github.com/prenticedavid/MCUFRIEND_kbv"  class="postlink">https://github.com/prenticedavid/MCUFRIEND_kbv</a> oprócz tej biblioteki musisz mieć zainstalowaną Adafruit_GFX i TouchScreen (też od Adafruit) i powinno pójść, poniżej testowy program który odpaliłem.<br /><br />[syntax=cpp]// the regular Adafruit &quot;TouchScreen.h&quot; library only works on AVRs<br /><br />// different mcufriend shields have Touchscreen on different pins<br />// and rotation.<br />// Run the TouchScreen_Calibr_native sketch for calibration of your shield<br /><br />#include &lt;MCUFRIEND_kbv.h&gt;<br />MCUFRIEND_kbv tft;       // hard-wired for UNO shields anyway.<br />#include &lt;TouchScreen.h&gt;<br /><br />char *name = &quot;Please Calibrate.&quot;;  //edit name of shield<br />const int XP=6,XM=A2,YP=A1,YM=7; //ID=0x9341<br />const int TS_LEFT=907,TS_RT=136,TS_TOP=942,TS_BOT=139;<br /><br />TouchScreen ts = TouchScreen(XP, YP, XM, YM, 300);<br />TSPoint tp;<br /><br />#define MINPRESSURE 200<br />#define MAXPRESSURE 1000<br /><br />int16_t BOXSIZE;<br />int16_t PENRADIUS = 1;<br />uint16_t ID, oldcolor, currentcolor;<br />uint8_t Orientation = 0;    //PORTRAIT<br /><br />// Assign human-readable names to some common 16-bit color values:<br />#define BLACK   0x0000<br />#define BLUE    0x001F<br />#define RED     0xF800<br />#define GREEN   0x07E0<br />#define CYAN    0x07FF<br />#define MAGENTA 0xF81F<br />#define YELLOW  0xFFE0<br />#define WHITE   0xFFFF<br /><br />void show_Serial(void)<br />{<br />    Serial.println(F(&quot;Most Touch Screens use pins 6, 7, A1, A2&quot;));<br />    Serial.println(F(&quot;But they can be in ANY order&quot;));<br />    Serial.println(F(&quot;e.g. right to left or bottom to top&quot;));<br />    Serial.println(F(&quot;or wrong direction&quot;));<br />    Serial.println(F(&quot;Edit name and calibration statements\n&quot;));<br />    Serial.println(name);<br />    Serial.print(F(&quot;ID=0x&quot;));<br />    Serial.println(ID, HEX);<br />    Serial.println(&quot;Screen is &quot; + String(tft.width()) + &quot;x&quot; + String(tft.height()));<br />    Serial.println(&quot;Calibration is: &quot;);<br />    Serial.println(&quot;LEFT = &quot; + String(TS_LEFT) + &quot; RT  = &quot; + String(TS_RT));<br />    Serial.println(&quot;TOP  = &quot; + String(TS_TOP)  + &quot; BOT = &quot; + String(TS_BOT));<br />    Serial.println(&quot;Wiring is always PORTRAIT&quot;);<br />    Serial.println(&quot;YP=&quot; + String(YP)  + &quot; XM=&quot; + String(XM));<br />    Serial.println(&quot;YM=&quot; + String(YM)  + &quot; XP=&quot; + String(XP));<br />}<br /><br />void show_tft(void)<br />{<br />    tft.setCursor(0, 0);<br />    tft.setTextSize(1);<br />    tft.print(F(&quot;ID=0x&quot;));<br />    tft.println(ID, HEX);<br />    tft.println(&quot;Screen is &quot; + String(tft.width()) + &quot;x&quot; + String(tft.height()));<br />    tft.println(&quot;&quot;);<br />    tft.setTextSize(2);<br />    tft.println(name);<br />    tft.setTextSize(1);<br />    tft.println(&quot;PORTRAIT Values:&quot;);<br />    tft.println(&quot;LEFT = &quot; + String(TS_LEFT) + &quot; RT  = &quot; + String(TS_RT));<br />    tft.println(&quot;TOP  = &quot; + String(TS_TOP)  + &quot; BOT = &quot; + String(TS_BOT));<br />    tft.println(&quot;\nWiring is: &quot;);<br />    tft.println(&quot;YP=&quot; + String(YP)  + &quot; XM=&quot; + String(XM));<br />    tft.println(&quot;YM=&quot; + String(YM)  + &quot; XP=&quot; + String(XP));<br />    tft.setTextSize(2);<br />    tft.setTextColor(RED);<br />    tft.setCursor((tft.width() - 48) / 2, (tft.height() * 2) / 4);<br />    tft.print(&quot;EXIT&quot;);<br />    tft.setTextColor(YELLOW, BLACK);<br />    tft.setCursor(0, (tft.height() * 6) / 8);<br />    tft.print(&quot;Touch screen for loc&quot;);<br />    while (1) {<br />        tp = ts.getPoint();<br />        pinMode(XM, OUTPUT);<br />        pinMode(YP, OUTPUT);<br />        if (tp.z &lt; MINPRESSURE || tp.z &gt; MAXPRESSURE) continue;<br />        if (tp.x &gt; 450 &amp;&amp; tp.x &lt; 570  &amp;&amp; tp.y &gt; 450 &amp;&amp; tp.y &lt; 570) break;<br />        tft.setCursor(0, (tft.height() * 3) / 4);<br />        tft.print(&quot;tp.x=&quot; + String(tp.x) + &quot; tp.y=&quot; + String(tp.y) + &quot;   &quot;);<br />    }<br />}<br /><br /><br />void setup(void)<br />{<br />    uint16_t tmp;<br /><br />    tft.reset();<br />    ID = tft.readID();<br />    tft.begin(ID);<br />    Serial.begin(9600);<br />    show_Serial();<br />    tft.setRotation(Orientation);<br />    tft.fillScreen(BLACK);<br />    show_tft();<br /><br />    BOXSIZE = tft.width() / 6;<br />    tft.fillScreen(BLACK);<br /><br />    tft.fillRect(0, 0, BOXSIZE, BOXSIZE, RED);<br />    tft.fillRect(BOXSIZE, 0, BOXSIZE, BOXSIZE, YELLOW);<br />    tft.fillRect(BOXSIZE * 2, 0, BOXSIZE, BOXSIZE, GREEN);<br />    tft.fillRect(BOXSIZE * 3, 0, BOXSIZE, BOXSIZE, CYAN);<br />    tft.fillRect(BOXSIZE * 4, 0, BOXSIZE, BOXSIZE, BLUE);<br />    tft.fillRect(BOXSIZE * 5, 0, BOXSIZE, BOXSIZE, MAGENTA);<br /><br />    tft.drawRect(0, 0, BOXSIZE, BOXSIZE, WHITE);<br />    currentcolor = RED;<br />    delay(1000);<br />}<br /><br />void loop()<br />{<br />    uint16_t xpos, ypos;  //screen coordinates<br />    tp = ts.getPoint();   //tp.x, tp.y are ADC values<br /><br />    // if sharing pins, you'll need to fix the directions of the touchscreen pins<br />    pinMode(XM, OUTPUT);<br />    pinMode(YP, OUTPUT);<br />    // we have some minimum pressure we consider 'valid'<br />    // pressure of 0 means no pressing!<br /><br />    if (tp.z &gt; MINPRESSURE &amp;&amp; tp.z &lt; MAXPRESSURE) {<br />        // most mcufriend have touch (with icons) that extends below the TFT<br />        // screens without icons need to reserve a space for &quot;erase&quot;<br />        // scale the ADC values from ts.getPoint() to screen values e.g. 0-239<br />        //<br />        // Calibration is true for PORTRAIT. tp.y is always long dimension<br />        // map to your current pixel orientation<br />        switch (Orientation) {<br />            case 0:<br />                xpos = map(tp.x, TS_LEFT, TS_RT, 0, tft.width());<br />                ypos = map(tp.y, TS_TOP, TS_BOT, 0, tft.height());<br />                break;<br />            case 1:<br />                xpos = map(tp.y, TS_TOP, TS_BOT, 0, tft.width());<br />                ypos = map(tp.x, TS_RT, TS_LEFT, 0, tft.height());<br />                break;<br />            case 2:<br />                xpos = map(tp.x, TS_RT, TS_LEFT, 0, tft.width());<br />                ypos = map(tp.y, TS_BOT, TS_TOP, 0, tft.height());<br />                break;<br />            case 3:<br />                xpos = map(tp.y, TS_BOT, TS_TOP, 0, tft.width());<br />                ypos = map(tp.y, TS_LEFT, TS_RT, 0, tft.height());<br />                break;<br />        }<br /><br />        // are we in top color box area ?<br />        if (ypos &lt; BOXSIZE) {               //draw white border on selected color box<br />            oldcolor = currentcolor;<br /><br />            if (xpos &lt; BOXSIZE) {<br />                currentcolor = RED;<br />                tft.drawRect(0, 0, BOXSIZE, BOXSIZE, WHITE);<br />            } else if (xpos &lt; BOXSIZE * 2) {<br />                currentcolor = YELLOW;<br />                tft.drawRect(BOXSIZE, 0, BOXSIZE, BOXSIZE, WHITE);<br />            } else if (xpos &lt; BOXSIZE * 3) {<br />                currentcolor = GREEN;<br />                tft.drawRect(BOXSIZE * 2, 0, BOXSIZE, BOXSIZE, WHITE);<br />            } else if (xpos &lt; BOXSIZE * 4) {<br />                currentcolor = CYAN;<br />                tft.drawRect(BOXSIZE * 3, 0, BOXSIZE, BOXSIZE, WHITE);<br />            } else if (xpos &lt; BOXSIZE * 5) {<br />                currentcolor = BLUE;<br />                tft.drawRect(BOXSIZE * 4, 0, BOXSIZE, BOXSIZE, WHITE);<br />            } else if (xpos &lt; BOXSIZE * 6) {<br />                currentcolor = MAGENTA;<br />                tft.drawRect(BOXSIZE * 5, 0, BOXSIZE, BOXSIZE, WHITE);<br />            }<br /><br />            if (oldcolor != currentcolor) { //rub out the previous white border<br />                if (oldcolor == RED) tft.fillRect(0, 0, BOXSIZE, BOXSIZE, RED);<br />                if (oldcolor == YELLOW) tft.fillRect(BOXSIZE, 0, BOXSIZE, BOXSIZE, YELLOW);<br />                if (oldcolor == GREEN) tft.fillRect(BOXSIZE * 2, 0, BOXSIZE, BOXSIZE, GREEN);<br />                if (oldcolor == CYAN) tft.fillRect(BOXSIZE * 3, 0, BOXSIZE, BOXSIZE, CYAN);<br />                if (oldcolor == BLUE) tft.fillRect(BOXSIZE * 4, 0, BOXSIZE, BOXSIZE, BLUE);<br />                if (oldcolor == MAGENTA) tft.fillRect(BOXSIZE * 5, 0, BOXSIZE, BOXSIZE, MAGENTA);<br />            }<br />        }<br />        // are we in drawing area ?<br />        if (((ypos - PENRADIUS) &gt; BOXSIZE) &amp;&amp; ((ypos + PENRADIUS) &lt; tft.height())) {<br />            tft.fillCircle(xpos, ypos, PENRADIUS, currentcolor);<br />        }<br />        // are we in erase area ?<br />        // Plain Touch panels use bottom 10 pixels e.g. &gt; h - 10<br />        // Touch panels with icon area e.g. &gt; h - 0<br />        if (ypos &gt; tft.height() - 10) {<br />            // press the bottom of the screen to erase<br />            tft.fillRect(0, BOXSIZE, tft.width(), tft.height() - BOXSIZE, BLACK);<br />        }<br />    }<br />}[/syntax]<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=75">phill2k</a> — 25 wrz 2019, o 08:39</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[mirekk36]]></name></author>
<updated>2019-09-24T20:41:18+01:00</updated>
<published>2019-09-24T20:41:18+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=22582&amp;p=222217#p222217</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=22582&amp;p=222217#p222217"/>
<title type="html"><![CDATA[Re: Problem z wyświetlaczem z qC ILI9341]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=22582&amp;p=222217#p222217"><![CDATA[
<div class="quotetitle">Semi napisał(a):</div><div class="quotecontent"><br />Botland to drogi sklep przepłaciłeś jakieś 2 razy.<br />Na pomoc techniczną w tym sklepie nie masz co liczyć! Nie polecam tego sklepu, drogo, niefachowo.<br /></div><br />Co to Qurdę ma znaczyć ?!?!?! <br /><br />KONIEC - i BANAN w końcu na forum - bo jak widać - kolega Semi się rozkręca - i wkrótce okaże się, że TYLKO to co on uważa za stosowne jest najtańsze, najlepsze, naj... naj... naj....<br /><br />jakim prawem można ot tak na forum - pisać anonimowo takie kuźwa pomówienia .... Sklep ma tysiące odbiorców - a więc to jest jednocześnie bezpośrednie obrażanie tych tysięcy odbiorców - koniec !<br /><br />zostawiam ten mój komentarz żeby każdy mógł wiedzieć - za co miarka się przebrała dla wszechwiedzącego i naj... z najlepszych Semi<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=54">mirekk36</a> — 24 wrz 2019, o 20:41</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Semi]]></name></author>
<updated>2019-09-24T20:07:52+01:00</updated>
<published>2019-09-24T20:07:52+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=22582&amp;p=222215#p222215</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=22582&amp;p=222215#p222215"/>
<title type="html"><![CDATA[Re: Problem z wyświetlaczem z qC ILI9341]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=22582&amp;p=222215#p222215"><![CDATA[
<div class="quotetitle">Bystrzacha napisał(a):</div><div class="quotecontent"><br />niedawno kupiłem wyświetlacz<br /></div><br />Botland to drogi sklep przepłaciłeś jakieś 2 razy. <br /><span style="text-decoration: underline">Na pomoc techniczną w tym sklepie nie masz co liczyć!</span> Nie polecam tego sklepu, drogo, niefachowo.<br /><br />Możesz towar zwrócić bo jest niezgodny z opisem, z którego wynika, że LCD ma SPI a tak naprawdę komunikuje się równolegle co wynika z tabelki w opisie i fotografii PCB.<br /><br /><span style="text-decoration: underline">Odpuść sobie kolorowy wyświetlacz graficzny o dużej rozdzielczości przyłączony do AVR</span>, chyba , ze z akceleratorem, np FT8xx. Bez akceleratora czas rysowania, czyszczenia ekranu będzie długi. Wczytanie obrazka z karty SD, nawet bez kompresji długie. Na tym LCD odczyt BMP 320x240 i wyświetlenie trwa ponad 2,5 sekundy. Widać jak rysowana jest linia po linii. Możesz próbować z ArduinoMega, które ma AVR z kontrolerem magistrali ale cudów się nie spodziewaj. Weź kalkulator i policz ile będzie &quot;rysowany&quot; napis, czyszczony ekran a się przerazisz. Z ArduinoUNO jest tragedia. Mega328 nie ma kontrolera i zapisy są generowane programowo. Sterownik ILI9341 ma magistralę 16-bit, na tym module wyprowadzono 8. To spowalnia operacje. Z Mega2560 tez wiele nie zyskasz bo to CPU 8-bit i na raz 16-bit nie wyśle. SPI w ILI9341 może pracować do 15MHz ale AVR przeważnie max to 8, 10MHz. Oczywiście te 8 czy 10 to fikcja. W praktyce pomiędzy bajtami masz przerwy i to nawet o czasie takim jak czas transmisji bajtu. Z 8MHz robi się 4. Jak zmniejszysz prędkość do 6 to uzyskasz realnie 5,5 czyli im wolniej (do pewnej granicy) tym szybciej. Poza problemem prędkości jest problem małej pamięci AVR a ArduinoUNO to już w ogóle. 2kB RAM to naprawdę niewiele.<br /><br /><br />Co chcesz wyświetlacz na tym wyświetlaczu? Może jakieś rozwiązanie się znajdzie?<br /><br /><strong><span style="color: #808000">------------------------ [ Dodano po: 13 minutach ]</span></strong><br /><br /><div class="quotetitle">Bystrzacha napisał(a):</div><div class="quotecontent"><br />Załączałem już różne biblioteki(m.in Adafruit_GFX i Adafruit_TFTLCD)<br /></div><br />Napisane są bardzo nieoptymalnie i nawet jak uruchomisz je na ARM 600MHz to nie zadziałają szybciej niż na AVR.<br /><br /><div class="quotetitle">Bystrzacha napisał(a):</div><div class="quotecontent"><br />i nie wiem dlaczego nie działa.<br /></div><br />Bo sterownik ma włączony tryb równoległy 8-bit a biblioteki pewnie używają SPI.<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=20851">Semi</a> — 24 wrz 2019, o 20:07</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Bystrzacha]]></name></author>
<updated>2019-09-24T18:53:25+01:00</updated>
<published>2019-09-24T18:53:25+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=22582&amp;p=222213#p222213</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=22582&amp;p=222213#p222213"/>
<title type="html"><![CDATA[Problem z wyświetlaczem z qC ILI9341]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=22582&amp;p=222213#p222213"><![CDATA[
Witam,<br />niedawno kupiłem wyświetlacz <!-- m --><a class="postlink" href="https://botland.com.pl/pl/wyswietlacze-lcd-tft-i-ips/14250-wyswietlacz-dotykowy-lcd-tft-28-320x240px-spi-z-czytnikiem-microsd-shield-dla-arduino-iduino-tf028-5903351242097.html?search_query=iduino&amp;results=67" >https://botland.com.pl/pl/wyswietlacze- ... results=67</a><!-- m -->. Znalazłem w internecie mnóstwo programów do wgrania, aby cokolwiek się pokazało, a za każdym razem widzę tylko zapalony biały ekran.<br />Ekran umieściłem na Arduino Leonardo. Załączałem już różne biblioteki(m.in Adafruit_GFX i Adafruit_TFTLCD) i nie wiem dlaczego nie działa. <br />Proszę, jeżeli ktoś dałby radę mi pomóc to będę bardzo wdzięczny:)<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=17681">Bystrzacha</a> — 24 wrz 2019, o 18:53</p><hr />
]]></content>
</entry>
</feed>