<?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=12&amp;t=15985&amp;mode" />

<title>ATNEL tech-forum</title>
<link href="https://forum.atnel.pl/index.php" />
<updated>2016-08-22T12:55:49+01:00</updated>

<author><name><![CDATA[ATNEL tech-forum]]></name></author>
<id>https://forum.atnel.pl/feed.php?f=12&amp;t=15985&amp;mode</id>
<entry>
<author><name><![CDATA[ckupraca@wp.pl]]></name></author>
<updated>2016-08-22T12:55:49+01:00</updated>
<published>2016-08-22T12:55:49+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=15985&amp;p=166778#p166778</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=15985&amp;p=166778#p166778"/>
<title type="html"><![CDATA[Re: WYświetlacz kolorowy 320x240 AVD-T320240C256]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=15985&amp;p=166778#p166778"><![CDATA[
Witam was !!!<br /><br />Pisałem program do wyświetlacza kolorowego 320x240 AVD-T320240C256 z Artronic i nie działa tak,jak bym chciał. Biały Tło. <br />Podłączyłem pod Atmega2560.<br />PortA. 0...7 do DB0...7<br />PortC.3 do RS (Reset sygnal)<br />PortC.4 do WR (Write signal)<br />PortC.5 do RD (Read signal)<br />PortC.6 do CS (Chip enable)<br />PortC.7 do A0 (Register selection) oznaczona jako RS<br />VDD do +3,3V<br />VSS do GND<br />LED+ do +5V<br />Katalog - <!-- m --><a class="postlink" href="http://dl.btc.pl/kamami_wa/lcd-ag-tft320240c256.pdf" >http://dl.btc.pl/kamami_wa/lcd-ag-tft320240c256.pdf</a><!-- m -->.  <a href="http://obrazki.elektroda.pl/8354393000_1471864479.jpg"  class="postlink"><img src="http://obrazki.elektroda.pl/8354393000_1471864479_thumb.jpg" alt="Obrazek" /></a>  <br />Nie działa <img src="https://forum.atnel.pl/images/smilies/icon_e_sad.gif" alt=":(" title="Smutny" />. <br />Szukam pomocy odnośnie programowania w języku Bascom AVR <br />Mam prośbę o pomoc jak to wykonanie<br />Dziękuję CKU<br />[syntax=basic4gl]$regfile = &quot;m2560def.dat&quot;<br />$crystal = 16000000<br />$loadersize = 512<br />$hwstack = 100<br />$swstack = 75<br />$framesize = 40<br /><br />Config Porta = Output<br />Config Portc = Output<br /><br />Rs Alias Portc.3<br />Wr Alias Portc.4<br />Rd Alias Portc.5<br />Cs Alias Portc.6<br />A0 Alias Portc.7<br /><br />$include &quot;Font8x8.font&quot;<br />$include &quot;Font16x16.font&quot;<br />$include &quot;Font6x8.font&quot;<br />$include &quot;Font5x5.font&quot;<br /><br />Const Black = &amp;H0000<br />Const Blue = &amp;H001F<br />Const Red = &amp;HF800<br />Const Green = &amp;H07E0<br />Const Cyan = &amp;H07FF<br />Const Magenta = &amp;HF81F<br />Const Yellow = &amp;HFFE0<br />Const White = &amp;HFFFF<br /><br />Declare Sub Wrcmd(byval Command As Word)<br />Declare Sub Wrdata(byval Data16 As Word)<br />Declare Sub Lcd_reset()<br />Declare Sub Lcd_clear(byval Color As Word)<br />Declare Sub Lcd_text(byval S As String , Byval Xoffset As Word , Byval Yoffset As Word , Byval Fontset As Byte , Byval Forecolor As Word , Byval Backcolor As Word)<br />Declare Sub Lcd_line(byval Lx1 As Word , Byval Ly1 As Word , Byval Lx2 As Word , Byval Ly2 As Word , Byval Color As Word)<br /><br />Sub Wrcmd(byval Command As Word)<br />   Reset Cs<br />   Set Rd<br />   Reset A0<br />   Porta = Command<br />   Reset Wr<br />   Set Wr <br />   Set Cs<br />End Sub<br /><br />Sub Wrdata(byval Data16 As Word)<br />   Reset Cs <br />   Set Rd <br />   Set A0 <br />   Reset Wr <br />   Porta = Data16 <br />   Reset Wr<br />   Set Wr<br />   Set Cs<br />End Sub<br /><br />Sub Lcd_reset()<br />   Set Cs <br />   Set Rd <br />   Set Wr<br />   Set A0<br />   Set Rs<br />   Waitms 10<br />   Reset Rs<br />   Waitms 500<br />   Set Rs<br />End Sub<br /><br />Sub Lcd_clear(color As Word)<br />   Dim I As Word , J As WorD<br />   For I = 0 To 319<br />      For J = 0 To 239<br />        Wrdata Color <br />      Next J <br />   Next I<br />End Sub<br /><br />Sub Lcd_text(byval S As String , Byval Xoffset As Word , Byval Yoffset As Word , Byval Fontset As Byte , Byval Forecolor As Word , Byval Backcolor As Word)<br />   Local Tempstring As String * 1 , Temp As Word<br />   Local A As Word , Pixels As Byte , Count As Byte , Carcount As Byte , Lus As Byte<br />   Local Row As Byte , Byteseach As Byte , Blocksize As Byte , Dummy As Byte<br />   Local Colums As Byte , Columcount As Byte , Rowcount As Byte , Stringsize As Byte<br />   Local Xpos As Word , Ypos As Word , Pixel As Word , Pixelcount As Byte<br />   Stringsize = Len(s) - 1<br />   For Carcount = 0 To Stringsize<br />      If Fontset = 1 Then Restore Font8x8<br />      If Fontset = 2 Then Restore Font16x16<br />      If Fontset = 3 Then Restore Font6x8<br />      If Fontset = 4 Then Restore Font5x5<br />      Temp = Carcount + 1<br />      Tempstring = Mid(s , Temp , 1)<br />      Read Row : Read Byteseach : Read Blocksize : Read Dummy<br />      Temp = Asc(tempstring) - 32<br />      For Lus = 1 To Temp<br />         For Count = 1 To Blocksize<br />            Read Pixels<br />         Next Count<br />      Next Lus<br />      Colums = Blocksize / Row<br />      Row = Row * 8<br />      Row = Row - 1<br />      Colums = Colums - 1<br />      For Rowcount = 0 To Row Step 8<br />         A = Rowcount + Yoffset<br />         For Columcount = 0 To Colums<br />            Read Pixels<br />            Xpos = Columcount<br />            Temp = Carcount * Byteseach<br />            Xpos = Xpos + Temp<br />            Xpos = Xpos + Xoffset<br />            For Pixelcount = 0 To 7<br />               Ypos = A + Pixelcount<br />               Pixel = Pixels.0<br />               If Pixel = 1 Then<br />                  Pixel = Forecolor<br />               Else<br />                  Pixel = Backcolor<br />               End If<br />               Wrdata Xpos<br />               Wrdata Ypos<br />               Wrdata Pixel<br />               Shift Pixels , Right<br />            Next Pixelcount<br />         Next Columcount<br />      Next Rowcount<br />   Next Carcount<br />End Sub<br /><br />Sub Lcd_line(byval Lx1 As Word , Byval Ly1 As Word , Byval Lx2 As Word , Byval Ly2 As Word , Byval Color As Word)<br />   Local M As Word , M1 As Single , M2 As Single<br />   Local Yg As Word , Cv As Single , Bn As Integer<br />   Local R As Word , B As Word<br />   M1 = Ly2 - Ly1<br />   M2 = Lx2 - Lx1<br />   Cv = M1 / M2<br />   Bn = Int(cv)<br />   M = Low(bn)<br />   B = M * Lx1<br />   B = -1 * B<br />   B = B + Ly1<br />   For R = Lx1 To Lx2<br />      Yg = M * R<br />      Yg = Yg + B<br />      Wrdata R<br />      Wrdata Yg<br />      Wrdata Color<br />   Next R<br />End Sub<br /><br />Lcd_reset<br />Lcd_clear Black<br />Lcd_text &quot;CEZARY KUZMIUK&quot; , 1 , 10 , 2 , Red , Black<br />Lcd_text &quot;320x240 AVD-T320240C256&quot; , 10 , 40 , 1 , Red , White<br /><br />Do<br />Loop[/syntax]<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=7398">ckupraca@wp.pl</a> — 22 sie 2016, o 12:55</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[ckupraca@wp.pl]]></name></author>
<updated>2016-08-12T06:33:31+01:00</updated>
<published>2016-08-12T06:33:31+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=15985&amp;p=165916#p165916</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=15985&amp;p=165916#p165916"/>
<title type="html"><![CDATA[Re: WYświetlacz kolorowy 320x240 AVD-T320240C256]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=15985&amp;p=165916#p165916"><![CDATA[
tu chodzi o kolorowych wyświetlacza o symbolu: AVD-T320240C256 a nie 240x128<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=7398">ckupraca@wp.pl</a> — 12 sie 2016, o 06:33</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[wchpikus]]></name></author>
<updated>2016-08-12T06:06:48+01:00</updated>
<published>2016-08-12T06:06:48+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=15985&amp;p=165915#p165915</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=15985&amp;p=165915#p165915"/>
<title type="html"><![CDATA[Re: WYświetlacz kolorowy 320x240 AVD-T320240C256]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=15985&amp;p=165915#p165915"><![CDATA[
A probowales z &quot;help-a&quot; bascoma?<br /><br />[syntax=basic4gl]'The connections of the LCD used in this demo<br />'LCD pin connected to<br />' 1 GND GND<br />'2 GND GND<br />'3 +5V +5V<br />'4 -9V -9V potmeter<br />'5 /WR PORTC.0<br />'6 /RD PORTC.1<br />'7 /CE PORTC.2<br />'8 C/D PORTC.3<br />'9 NC not conneted<br />'10 RESET PORTC.4<br />'11-18 D0-D7 PA<br />'19 FS PORTC.5<br />'20 NC not connected<br /> <br />'First we define that we use a graphic LCD<br />' Only 240*64 supported yet<br />Config Graphlcd = 240 * 128 , Dataport = Porta , Controlport = Portc , Ce = 2 , Cd = 3 , Wr = 0 , Rd = 1 , Reset = 4 , Fs = 5 , Mode = 8<br />'The dataport is the portname that is connected to the data lines of the LCD<br />'The controlport is the portname which pins are used to control the lcd<br />'CE, CD etc. are the pin number of the CONTROLPORT.<br />' For example CE =2 because it is connected to PORTC.2<br />'mode 8 gives 240 / 8 = 30 columns , mode=6 gives 240 / 6 = 40 columns<br /> <br />'Dim variables (y not used)<br />Dim X As Byte , Y As Byte<br /> <br /> <br />'Clear the screen will both clear text and graph display<br />Cls<br />'Other options are :<br />' CLS TEXT to clear only the text display<br />' CLS GRAPH to clear only the graphical part<br /> <br />Cursor Off<br /> <br />Wait 1<br />'locate works like the normal LCD locate statement<br />' LOCATE LINE,COLUMN LINE can be 1-8 and column 0-30<br /> <br /> <br />Locate 1 , 1<br /> <br />'Show some text<br />Lcd &quot;MCS Electronics&quot;<br />'And some othe text on line 2<br />Locate 2 , 1 : Lcd &quot;T6963c support&quot;<br />Locate 3 , 1 : Lcd &quot;1234567890123456789012345678901234567890&quot;<br />Locate 16 , 1 : Lcd &quot;write this to the lower line&quot;<br /> <br />Wait 2<br /> <br />Cls Text<br /> <br /> <br />'use the new LINE statement to create a box<br />'LINE(X0,Y0) - (X1,Y1), on/off<br />Line(0 , 0) -(239 , 127) , 255 ' diagonal line<br />Line(0 , 127) -(239 , 0) , 255 ' diagonal line<br />Line(0 , 0) -(240 , 0) , 255 ' horizontal upper line<br />Line(0 , 127) -(239 , 127) , 255 'horizontal lower line<br />Line(0 , 0) -(0 , 127) , 255 ' vertical left line<br />Line(239 , 0) -(239 , 127) , 255 ' vertical right line<br /> <br /> <br />Wait 2<br />' draw a line using PSET X,Y, ON/OFF<br />' PSET on.off param is 0 to clear a pixel and any other value to turn it on<br />For X = 0 To 140<br />Pset X , 20 , 255 ' set the pixel<br />Next<br /> <br />For X = 0 To 140<br />Pset X , 127 , 255 ' set the pixel<br />Next<br /> <br />Wait 2<br /> <br />'circle time<br />'circle(X,Y), radius, color<br />'X,y is the middle of the circle,color must be 255 to show a pixel and 0 to clear a pixel<br />For X = 1 To 10<br />Circle(20 , 20) , X , 255 ' show circle<br />Wait 1<br />Circle(20 , 20) , X , 0 'remove circle<br />Wait 1<br />Next<br /> <br />Wait 2<br /> <br />For X = 1 To 10<br />Circle(20 , 20) , X , 255 ' show circle<br />Waitms 200<br />Next<br />Wait 2<br />'Now it is time to show a picture<br />'SHOWPIC X,Y,label<br />'The label points to a label that holds the image data<br />Test:<br />Showpic 0 , 0 , Plaatje<br />Showpic 0 , 64 , Plaatje ' show 2 since we have a big display<br />Wait 2<br />Cls Text ' clear the text<br />End<br /> <br /> <br /> <br />'This label holds the mage data<br />Plaatje:<br />'$BGF will put the bitmap into the program at this location<br />$bgf &quot;mcs.bgf&quot;<br /> <br />'You could insert other picture data here[/syntax]<br />Grafike importujesz wbudowanym softem lub jest gdzieś na sieci konwerter..<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=3859">wchpikus</a> — 12 sie 2016, o 06:06</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[ckupraca@wp.pl]]></name></author>
<updated>2016-08-11T20:39:35+01:00</updated>
<published>2016-08-11T20:39:35+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=15985&amp;p=165900#p165900</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=15985&amp;p=165900#p165900"/>
<title type="html"><![CDATA[WYświetlacz kolorowy 320x240 AVD-T320240C256]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=15985&amp;p=165900#p165900"><![CDATA[
Witam was<br /><br />Zakupiłem w Artronicu wyświetlacz kolorowy TFT o symbolu: AVD-T320240C256-02-R <!-- m --><a class="postlink" href="http://dl.btc.pl/kamami_wa/lcd-ag-tft320240c256.pdf" >http://dl.btc.pl/kamami_wa/lcd-ag-tft320240c256.pdf</a><!-- m --><br />Podłączyłem pod Atmega2560 i nie działa tak,jak bym chciał. Szukam pomocy odnośnie programowania w języku Bascom AVR lub szukam biblioteki w Bascomie do wyświetlacza, może ktoś już używa tego wyświetlacza. <br />Jestem trochę &quot;zielony&quot; ale umiem pisać program bascom avr.<br /><br />Tzn.<br />kod żródłowy: Wyświetlacz 240x128 <br />$regfile = &quot;m2560def.dat&quot;<br />Config Graphlcd = 240 * 128 , Dataport = Porta , Controlport = Portc , Ce = 0 , Cd = 1 , Wr = 2 , Rd = 3 , Reset = 4 , Fs = 5 , Mode = 8<br />to wiem<br /><br />kod żródłowy: kolor wyświetlacz AVD-T320240C256<br />$regfile = &quot;m2560def.dat&quot;<br />Config Graphlcd = Color , Dataport = Portc , Wr = Portd.6 , Rd = Portd.7 , Cs1 = Portd.3 , A0 = Portd.5 , Rst = Portd.4 , Vcc = Portd.2<br />to nie działa.<br /><br />Mam prośbę o pomoc jak to wykonanie<br /><br />Dziękuję CKU<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=7398">ckupraca@wp.pl</a> — 11 sie 2016, o 20:39</p><hr />
]]></content>
</entry>
</feed>