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

<title>ATNEL tech-forum</title>
<link href="https://forum.atnel.pl/index.php" />
<updated>2014-06-05T00:41:21+01:00</updated>

<author><name><![CDATA[ATNEL tech-forum]]></name></author>
<id>https://forum.atnel.pl/feed.php?f=4&amp;t=7264&amp;mode</id>
<entry>
<author><name><![CDATA[MoherPower]]></name></author>
<updated>2014-06-05T00:41:21+01:00</updated>
<published>2014-06-05T00:41:21+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=7264&amp;p=83423#p83423</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=7264&amp;p=83423#p83423"/>
<title type="html"><![CDATA[Re: sterownik ili9325c + lcd + avr]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=7264&amp;p=83423#p83423"><![CDATA[
chciałem tylko powiedzieć......<br /><a href="http://forum.atnel.pl/_obrazki/o/2521/519af20cb57bb36fefc162d5d1649c0b.jpg"  class="postlink"><img src="http://forum.atnel.pl/_obrazki/o/thumb/2521/519af20cb57bb36fefc162d5d1649c0b.jpg" alt="Obrazek" /></a><p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=2521">MoherPower</a> — 5 cze 2014, o 00:41</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[gufim]]></name></author>
<updated>2014-06-02T21:24:01+01:00</updated>
<published>2014-06-02T21:24:01+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=7264&amp;p=83136#p83136</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=7264&amp;p=83136#p83136"/>
<title type="html"><![CDATA[Re: sterownik ili9325c + lcd + avr]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=7264&amp;p=83136#p83136"><![CDATA[
Tak dzialal na sprzetowym SPI , mam nadzieje ze pomoglem  <img src="https://forum.atnel.pl/images/smilies/icon_e_biggrin.gif" alt=":D" title="Bardzo szczęśliwy" /><p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=126">gufim</a> — 2 cze 2014, o 21:24</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[MoherPower]]></name></author>
<updated>2014-06-02T19:44:20+01:00</updated>
<published>2014-06-02T19:44:20+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=7264&amp;p=83098#p83098</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=7264&amp;p=83098#p83098"/>
<title type="html"><![CDATA[Re: sterownik ili9325c + lcd + avr]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=7264&amp;p=83098#p83098"><![CDATA[
he he <img src="https://forum.atnel.pl/images/smilies/icon_razz.gif" alt=":P" title="Pokazuje język" /> &quot;projekt niedokończony&quot; ale rozumiem że wyświetlacz działał:P<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=2521">MoherPower</a> — 2 cze 2014, o 19:44</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[gufim]]></name></author>
<updated>2014-06-02T18:21:02+01:00</updated>
<published>2014-06-02T18:21:02+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=7264&amp;p=83081#p83081</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=7264&amp;p=83081#p83081"/>
<title type="html"><![CDATA[Re: sterownik ili9325c + lcd + avr]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=7264&amp;p=83081#p83081"><![CDATA[
Czesc jasne nie ma sprawy tylko uprzedzam ze ten project jest niedokonczony <br /><br />main.c<br />[syntax=c]/*<br /> * main.c<br /> *<br /> *  Created on: 11 gru 2013<br /> *      Author: MIREK<br /> */<br /><br /><br />#include &lt;avr/io.h&gt;<br />#include &lt;util/delay.h&gt;<br />#include &lt;inttypes.h&gt;<br /><br />#include &quot;ILI9320.h&quot;<br />#include &quot;SPI/spi.h&quot;<br />#include &quot;image.h&quot;<br /><br />int main(void)<br />{<br /><br /> // SPI_Init();<br />/* ************* inicjalizacja SPI ************************************* */<br />#ifndef USE_SOFT_SPI<br />InitSpi();<br />#else<br />InitSoftSpi();<br />#endif<br /><br />        lcd_Init();<br /><br /><br />        //lcd_Clear (Blue);<br />        //_delay_ms ( 1000 );<br />//lcd_Clear (Yellow);<br />        //_delay_ms ( 1000 );<br />//lcd_Clear (Red);<br />       // _delay_ms ( 1000 );<br />    lcd_Clear (White);<br />    _delay_ms ( 500 );<br /><br />//lcd_chr_med_znak_pion('M', 120, 120, Red, White);<br />//lcd_str_med_napis_pion(&quot;GUFIM&quot;, 100, 50, Red, White);<br />//lcd_DrawLine( 10, 10, 100, 100 , Green );<br />//lcd_DrawLine( 100, 100, 100, 200 , Red );<br />//lcd_SetPoint( 5, 5, Red);<br />lcd_chr_small_znak_pion('M', 55, 55, Green, White);<br />lcd_str_small_napis_pion(&quot;MIREK&quot;, 150, 200, Blue, White);<br />lcd_chr_small_znak_pion('E', 65, 55, Black, White);<br /><br />lcd_chr_med_znak_poziom('G', 55, 75, Red, White);<br />lcd_str_med_napis_poziom(&quot;GUFIM&quot;, 50, 150, Black, White);<br />//lcd_chr_big_znak_pion('G', 75, 75, Red, White);<br />//lcd_Area( 150, 100, 70, 30, Blue);<br />//lcd_str_med_napis_pion(&quot;GUFIM&quot;, 110, 150, Yellow, White);<br />//lcd_Area( 200, 20, 50, 25, Green);<br />lcd_chr_med_znak_poziom('W', 120, 120, Yellow, White);<br />//lcd_str_med_napis_pion(&quot;GUFIM&quot;, 100, 50, Magenta, White);<br /><br /><br /><br />while(1)<br />{<br /><br />}<br />}[/syntax]<br /><br />fonts.h<br />[syntax=c]/*<br /> *fonts.h<br /> */ <br /><br />#ifndef FONTS_H_<br />#define FONTS_H_<br />/*<br />// size is 8x14<br />const uint8_t font8x14&#91;96&#93;&#91;14&#93; PROGMEM = {<br />{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // space (32)<br />{ 0x00, 0x00, 0x00, 0x18, 0x3c, 0x3c, 0x3c, 0x18, 0x18, 0x00, 0x18, 0x18, 0x00, 0x00}, //!<br />{ 0x00, 0x66, 0x66, 0x66, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, //&quot;<br />{ 0x00, 0x00, 0x00, 0x6c, 0x6c, 0xfe, 0x6c, 0x6c, 0x6c, 0xfe, 0x6c, 0x6c, 0x00, 0x00}, //#<br />{ 0x00, 0x18, 0x18, 0x7c, 0xc6, 0xc2, 0xc0, 0x7c, 0x06, 0x86, 0xc6, 0x7c, 0x18, 0x18}, //$<br />{ 0x00, 0x00, 0x00, 0x00, 0x00, 0xc2, 0xc6, 0x0c, 0x18, 0x30, 0x66, 0xc6, 0x00, 0x00}, // %<br />{ 0x00, 0x00, 0x00, 0x38, 0x6c, 0x6c, 0x38, 0x76, 0xdc, 0xcc, 0xcc, 0x76, 0x00, 0x00}, // &amp;<br />{ 0x00, 0x18, 0x18, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // '<br />{ 0x00, 0x00, 0x00, 0x0c, 0x18, 0x30, 0x30, 0x30, 0x30, 0x30, 0x18, 0x0c, 0x00, 0x00}, // (<br />{ 0x00, 0x00, 0x00, 0x30, 0x18, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x18, 0x30, 0x00, 0x00}, // )<br />{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x3c, 0xff, 0x3c, 0x66, 0x00, 0x00, 0x00, 0x00}, // *<br />{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x7e, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, // +<br />{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x30, 0x00}, // ´<br />{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // -<br />{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00}, // .<br />{ 0x00, 0x00, 0x00, 0x02, 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc0, 0x80, 0x00, 0x00, 0x00}, // /<br />{ 0x00, 0x00, 0x00, 0x38, 0x6c, 0xc6, 0xc6, 0xd6, 0xc6, 0xc6, 0x6c, 0x38, 0x00, 0x00}, // 0 (48-32)<br />{ 0x00, 0x00, 0x00, 0x18, 0x38, 0x78, 0x18, 0x18, 0x18, 0x18, 0x18, 0x7e, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0x7c, 0xc6, 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc6, 0xfe, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0x7c, 0xc6, 0x06, 0x06, 0x3c, 0x06, 0x06, 0xc6, 0x7c, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0x0c, 0x1c, 0x3c, 0x6c, 0xcc, 0xfe, 0x0c, 0x0c, 0x1e, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0xfe, 0xc0, 0xc0, 0xc0, 0xfc, 0x06, 0x06, 0xc6, 0x7c, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0x38, 0x60, 0xc0, 0xc0, 0xfc, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0xfe, 0xc6, 0x06, 0x0c, 0x18, 0x30, 0x30, 0x30, 0x30, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0x7c, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x06, 0x0c, 0x78, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x18, 0x18, 0x30, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0x0c, 0x18, 0x30, 0x60, 0xc0, 0x60, 0x30, 0x18, 0x0c, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0x60, 0x30, 0x18, 0x0c, 0x06, 0x0c, 0x18, 0x30, 0x60, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0x0c, 0x18, 0x18, 0x00, 0x18, 0x18, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xde, 0xde, 0xde, 0xdc, 0xc0, 0x7c, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x66, 0x66, 0x66, 0xfc, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xc0, 0xc0, 0xc2, 0x66, 0x3c, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0xf8, 0x6c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x6c, 0xf8, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x62, 0x66, 0xfe, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x60, 0x60, 0xf0, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xc0, 0xde, 0xc6, 0x66, 0x3a, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0x1e, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0xcc, 0xcc, 0x78, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0xe6, 0x66, 0x6c, 0x6c, 0x78, 0x6c, 0x6c, 0x66, 0xe6, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0xf0, 0x60, 0x60, 0x60, 0x60, 0x60, 0x62, 0x66, 0xfe, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0xc6, 0xee, 0xfe, 0xd6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0xc6, 0xe6, 0xf6, 0xfe, 0xde, 0xce, 0xc6, 0xc6, 0xc6, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xd6, 0xde, 0x7c, 0x0e, 0x00},<br />{ 0x00, 0x00, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x6c, 0x66, 0x66, 0xe6, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0x60, 0x38, 0x0c, 0xc6, 0xc6, 0x7c, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0x7e, 0x7e, 0x5a, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x6c, 0x38, 0x10, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xd6, 0xd6, 0xfe, 0x6c, 0x6c, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0x7c, 0x38, 0x7c, 0xc6, 0xc6, 0xc6, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0xfe, 0xc6, 0x8c, 0x18, 0x30, 0x60, 0xc2, 0xc6, 0xfe, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0x3c, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x3c, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0x70, 0x38, 0x1c, 0x0e, 0x06, 0x02, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0x3c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x3c, 0x00, 0x00},<br />{ 0x10, 0x38, 0x6c, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff},<br />{ 0x00, 0x30, 0x18, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0x76, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0xe0, 0x60, 0x60, 0x78, 0x6c, 0x66, 0x66, 0x66, 0x7c, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0x1c, 0x0c, 0x0c, 0x3c, 0x6c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc6, 0x7c, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0x1c, 0x36, 0x32, 0x30, 0x7c, 0x30, 0x30, 0x30, 0x78, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xcc, 0xcc, 0xcc, 0x7c, 0x0c, 0xcc, 0x78},<br />{ 0x00, 0x00, 0x00, 0xe0, 0x60, 0x60, 0x6c, 0x76, 0x66, 0x66, 0x66, 0xe6, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0x06, 0x06, 0x00, 0x0e, 0x06, 0x06, 0x06, 0x06, 0x66, 0x66, 0x3c},<br />{ 0x00, 0x00, 0x00, 0xe0, 0x60, 0x60, 0x66, 0x6c, 0x78, 0x6c, 0x66, 0xe6, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xec, 0xfe, 0xd6, 0xd6, 0xd6, 0xd6, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x7c, 0x60, 0x60, 0xf0},<br />{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xcc, 0xcc, 0xcc, 0x7c, 0x0c, 0x0c, 0x1e},<br />{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x76, 0x66, 0x60, 0x60, 0xf0, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0x70, 0x1c, 0xc6, 0x7c, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0x10, 0x30, 0x30, 0xfc, 0x30, 0x30, 0x30, 0x36, 0x1c, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0x6c, 0x38, 0x10, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xd6, 0xd6, 0xfe, 0x6c, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x6c, 0x38, 0x38, 0x6c, 0xc6, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x0c, 0x78},<br />{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xcc, 0x18, 0x30, 0x66, 0xfe, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0x0e, 0x18, 0x18, 0x18, 0x70, 0x18, 0x18, 0x18, 0x0e, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0x70, 0x18, 0x18, 0x18, 0x0e, 0x18, 0x18, 0x18, 0x70, 0x00, 0x00},<br />{ 0x00, 0x76, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},<br />{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0x00, 0x00, 0x00},<br />};<br />*/<br /><br />const uint8_t font5x7 &#91;&#93;&#91;5&#93; PROGMEM  = {<br />    <br />    { 0x00, 0x00, 0x00, 0x00, 0x00 },   // sp<br />    { 0x00, 0x00, 0x2f, 0x00, 0x00 },   // !<br />    { 0x00, 0x07, 0x00, 0x07, 0x00 },   // &quot;<br />    { 0x14, 0x7f, 0x14, 0x7f, 0x14 },   // #<br />    { 0x24, 0x2a, 0x7f, 0x2a, 0x12 },   // $<br />    { 0x32, 0x34, 0x08, 0x16, 0x26 },   // %<br />    { 0x36, 0x49, 0x55, 0x22, 0x50 },   // &amp;<br />    { 0x00, 0x05, 0x03, 0x00, 0x00 },   // '<br />    { 0x00, 0x1c, 0x22, 0x41, 0x00 },   // (<br />    { 0x00, 0x41, 0x22, 0x1c, 0x00 },   // )<br />    { 0x14, 0x08, 0x3E, 0x08, 0x14 },   // *<br />    { 0x08, 0x08, 0x3E, 0x08, 0x08 },   // +<br />    { 0x00, 0x00, 0x50, 0x30, 0x00 },   // ,<br />    { 0x10, 0x10, 0x10, 0x10, 0x10 },   // -<br />    { 0x00, 0x60, 0x60, 0x00, 0x00 },   // .<br />    { 0x20, 0x10, 0x08, 0x04, 0x02 },   // /<br />    { 0x3E, 0x51, 0x49, 0x45, 0x3E },   // 0<br />    { 0x00, 0x42, 0x7F, 0x40, 0x00 },   // 1<br />    { 0x42, 0x61, 0x51, 0x49, 0x46 },   // 2<br />    { 0x21, 0x41, 0x45, 0x4B, 0x31 },   // 3<br />    { 0x18, 0x14, 0x12, 0x7F, 0x10 },   // 4<br />    { 0x27, 0x45, 0x45, 0x45, 0x39 },   // 5<br />    { 0x3C, 0x4A, 0x49, 0x49, 0x30 },   // 6<br />    { 0x01, 0x71, 0x09, 0x05, 0x03 },   // 7<br />    { 0x36, 0x49, 0x49, 0x49, 0x36 },   // 8<br />    { 0x06, 0x49, 0x49, 0x29, 0x1E },   // 9<br />    { 0x00, 0x36, 0x36, 0x00, 0x00 },   // :<br />    { 0x00, 0x56, 0x36, 0x00, 0x00 },   // ;<br />    { 0x08, 0x14, 0x22, 0x41, 0x00 },   // &lt;<br />    { 0x14, 0x14, 0x14, 0x14, 0x14 },   // =<br />    { 0x00, 0x41, 0x22, 0x14, 0x08 },   // &gt;<br />    { 0x02, 0x01, 0x51, 0x09, 0x06 },   // ?<br />    { 0x32, 0x49, 0x59, 0x51, 0x3E },   // @<br />    { 0x7E, 0x11, 0x11, 0x11, 0x7E },   // A<br />    { 0x7F, 0x49, 0x49, 0x49, 0x36 },   // B<br />    { 0x3E, 0x41, 0x41, 0x41, 0x22 },   // C<br />    { 0x7F, 0x41, 0x41, 0x22, 0x1C },   // D<br />    { 0x7F, 0x49, 0x49, 0x49, 0x41 },   // E<br />    { 0x7F, 0x09, 0x09, 0x09, 0x01 },   // F<br />    { 0x3E, 0x41, 0x49, 0x49, 0x7A },   // G<br />    { 0x7F, 0x08, 0x08, 0x08, 0x7F },   // H<br />    { 0x00, 0x41, 0x7F, 0x41, 0x00 },   // I<br />    { 0x20, 0x40, 0x41, 0x3F, 0x01 },   // J<br />    { 0x7F, 0x08, 0x14, 0x22, 0x41 },   // K<br />    { 0x7F, 0x40, 0x40, 0x40, 0x40 },   // L<br />    { 0x7F, 0x02, 0x0C, 0x02, 0x7F },   // M<br />    { 0x7F, 0x04, 0x08, 0x10, 0x7F },   // N<br />    { 0x3E, 0x41, 0x41, 0x41, 0x3E },   // O<br />    { 0x7F, 0x09, 0x09, 0x09, 0x06 },   // P<br />    { 0x3E, 0x41, 0x51, 0x21, 0x5E },   // Q<br />    { 0x7F, 0x09, 0x19, 0x29, 0x46 },   // R<br />    { 0x46, 0x49, 0x49, 0x49, 0x31 },   // S<br />    { 0x01, 0x01, 0x7F, 0x01, 0x01 },   // T<br />    { 0x3F, 0x40, 0x40, 0x40, 0x3F },   // U<br />    { 0x1F, 0x20, 0x40, 0x20, 0x1F },   // V<br />    { 0x3F, 0x40, 0x38, 0x40, 0x3F },   // W<br />    { 0x63, 0x14, 0x08, 0x14, 0x63 },   // X<br />    { 0x07, 0x08, 0x70, 0x08, 0x07 },   // Y<br />    { 0x61, 0x51, 0x49, 0x45, 0x43 },   // Z<br />    { 0x00, 0x7F, 0x41, 0x41, 0x00 },   // &#91;<br />    { 0x55, 0x2A, 0x55, 0x2A, 0x55 },   // 55<br />    { 0x00, 0x41, 0x41, 0x7F, 0x00 },   // &#93;<br />    { 0x04, 0x02, 0x01, 0x02, 0x04 },   // ^<br />    { 0x40, 0x40, 0x40, 0x40, 0x40 },   // _<br />    { 0x00, 0x01, 0x02, 0x04, 0x00 },   // '<br />    { 0x20, 0x54, 0x54, 0x54, 0x78 },   // a<br />    { 0x7F, 0x48, 0x44, 0x44, 0x38 },   // b<br />    { 0x38, 0x44, 0x44, 0x44, 0x20 },   // c<br />    { 0x38, 0x44, 0x44, 0x48, 0x7F },   // d<br />    { 0x38, 0x54, 0x54, 0x54, 0x18 },   // e<br />    { 0x08, 0x7E, 0x09, 0x01, 0x02 },   // f<br />    { 0x0C, 0x52, 0x52, 0x52, 0x3E },   // g<br />    { 0x7F, 0x08, 0x04, 0x04, 0x78 },   // h<br />    { 0x00, 0x44, 0x7D, 0x40, 0x00 },   // i<br />    { 0x20, 0x40, 0x44, 0x3D, 0x00 },   // j<br />    { 0x7F, 0x10, 0x28, 0x44, 0x00 },   // k<br />    { 0x00, 0x41, 0x7F, 0x40, 0x00 },   // l<br />    { 0x7C, 0x04, 0x18, 0x04, 0x78 },   // m<br />    { 0x7C, 0x08, 0x04, 0x04, 0x78 },   // n<br />    { 0x38, 0x44, 0x44, 0x44, 0x38 },   // o<br />    { 0x7C, 0x14, 0x14, 0x14, 0x08 },   // p<br />    { 0x08, 0x14, 0x14, 0x18, 0x7C },   // q<br />    { 0x7C, 0x08, 0x04, 0x04, 0x08 },   // r<br />    { 0x48, 0x54, 0x54, 0x54, 0x20 },   // s<br />    { 0x04, 0x3F, 0x44, 0x40, 0x20 },   // t<br />    { 0x3C, 0x40, 0x40, 0x20, 0x7C },   // u<br />    { 0x1C, 0x20, 0x40, 0x20, 0x1C },   // v<br />    { 0x3C, 0x40, 0x30, 0x40, 0x3C },   // w<br />    { 0x44, 0x28, 0x10, 0x28, 0x44 },   // x<br />    { 0x0C, 0x50, 0x50, 0x50, 0x3C },   // y<br />    { 0x44, 0x64, 0x54, 0x4C, 0x44 },   // z<br />};<br /><br /><br />const uint8_t font8x16&#91;&#93;&#91;16&#93; PROGMEM = {<br /><br />{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*&quot; &quot;,0*/<br />{0x00,0x00,0x00,0x00,0x18,0x3C,0x3C,0x3C,0x18,0x18,0x00,0x18,0x18,0x00,0x00,0x00},/*&quot;!&quot;,1*/<br />{0x00,0x00,0x00,0x00,0x66,0x66,0x66,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*&quot;&quot;&quot;,2*/<br />{0x00,0x00,0x00,0x00,0x36,0x36,0x7F,0x36,0x36,0x36,0x7F,0x36,0x36,0x00,0x00,0x00},/*&quot;#&quot;,3*/<br />{0x00,0x00,0x18,0x18,0x3C,0x66,0x60,0x30,0x18,0x0C,0x06,0x66,0x3C,0x18,0x18,0x00},/*&quot;$&quot;,4*/<br />{0x00,0x00,0x00,0x70,0xD8,0xDA,0x76,0x0C,0x18,0x30,0x6E,0x5B,0x1B,0x0E,0x00,0x00},/*&quot;%&quot;,5*/<br />{0x00,0x00,0x00,0x00,0x38,0x6C,0x6C,0x38,0x60,0x6F,0x66,0x66,0x3B,0x00,0x00,0x00},/*&quot;&amp;&quot;,6*/<br />{0x00,0x00,0x00,0x00,0x18,0x18,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*&quot;'&quot;,7*/<br />{0x00,0x00,0x00,0x00,0x0C,0x18,0x18,0x30,0x30,0x30,0x30,0x30,0x18,0x18,0x0C,0x00},/*&quot;(&quot;,8*/<br />{0x00,0x00,0x00,0x00,0x30,0x18,0x18,0x0C,0x0C,0x0C,0x0C,0x0C,0x18,0x18,0x30,0x00},/*&quot;)&quot;,9*/<br />{0x00,0x00,0x00,0x00,0x00,0x00,0x36,0x1C,0x7F,0x1C,0x36,0x00,0x00,0x00,0x00,0x00},/*&quot;*&quot;,10*/<br />{0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x7E,0x18,0x18,0x00,0x00,0x00,0x00,0x00},/*&quot;+&quot;,11*/<br />{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x1C,0x0C,0x18,0x00,0x00},/*&quot;,&quot;,12*/<br />{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*&quot;-&quot;,13*/<br />{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x1C,0x00,0x00,0x00,0x00},/*&quot;.&quot;,14*/<br />{0x00,0x00,0x00,0x06,0x06,0x0C,0x0C,0x18,0x18,0x30,0x30,0x60,0x60,0x00,0x00,0x00},/*&quot;/&quot;,15*/<br />{0x00,0x00,0x00,0x1E,0x33,0x37,0x37,0x33,0x3B,0x3B,0x33,0x1E,0x00,0x00,0x00,0x00},/*&quot;0&quot;,16*/<br />{0x00,0x00,0x00,0x0C,0x1C,0x7C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x00,0x00,0x00,0x00},/*&quot;1&quot;,17*/<br />{0x00,0x00,0x00,0x3C,0x66,0x66,0x06,0x0C,0x18,0x30,0x60,0x7E,0x00,0x00,0x00,0x00},/*&quot;2&quot;,18*/<br />{0x00,0x00,0x00,0x3C,0x66,0x66,0x06,0x1C,0x06,0x66,0x66,0x3C,0x00,0x00,0x00,0x00},/*&quot;3&quot;,19*/<br />{0x00,0x00,0x00,0x30,0x30,0x36,0x36,0x36,0x66,0x7F,0x06,0x06,0x00,0x00,0x00,0x00},/*&quot;4&quot;,20*/<br />{0x00,0x00,0x00,0x7E,0x60,0x60,0x60,0x7C,0x06,0x06,0x0C,0x78,0x00,0x00,0x00,0x00},/*&quot;5&quot;,21*/<br />{0x00,0x00,0x00,0x1C,0x18,0x30,0x7C,0x66,0x66,0x66,0x66,0x3C,0x00,0x00,0x00,0x00},/*&quot;6&quot;,22*/<br />{0x00,0x00,0x00,0x7E,0x06,0x0C,0x0C,0x18,0x18,0x30,0x30,0x30,0x00,0x00,0x00,0x00},/*&quot;7&quot;,23*/<br />{0x00,0x00,0x00,0x3C,0x66,0x66,0x76,0x3C,0x6E,0x66,0x66,0x3C,0x00,0x00,0x00,0x00},/*&quot;8&quot;,24*/<br />{0x00,0x00,0x00,0x3C,0x66,0x66,0x66,0x66,0x3E,0x0C,0x18,0x38,0x00,0x00,0x00,0x00},/*&quot;9&quot;,25*/<br />{0x00,0x00,0x00,0x00,0x00,0x1C,0x1C,0x00,0x00,0x00,0x1C,0x1C,0x00,0x00,0x00,0x00},/*&quot;:&quot;,26*/<br />{0x00,0x00,0x00,0x00,0x00,0x1C,0x1C,0x00,0x00,0x00,0x1C,0x1C,0x0C,0x18,0x00,0x00},/*&quot;;&quot;,27*/<br />{0x00,0x00,0x00,0x06,0x0C,0x18,0x30,0x60,0x30,0x18,0x0C,0x06,0x00,0x00,0x00,0x00},/*&quot;&lt;&quot;,28*/<br />{0x00,0x00,0x00,0x00,0x00,0x00,0x7E,0x00,0x7E,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*&quot;=&quot;,29*/<br />{0x00,0x00,0x00,0x60,0x30,0x18,0x0C,0x06,0x0C,0x18,0x30,0x60,0x00,0x00,0x00,0x00},/*&quot;&gt;&quot;,30*/<br />{0x00,0x00,0x00,0x3C,0x66,0x66,0x0C,0x18,0x18,0x00,0x18,0x18,0x00,0x00,0x00,0x00},/*&quot;?&quot;,31*/<br />{0x00,0x00,0x00,0x7E,0xC3,0xC3,0xCF,0xDB,0xDB,0xCF,0xC0,0x7F,0x00,0x00,0x00,0x00},/*&quot;@&quot;,32*/<br />{0x00,0x00,0x00,0x18,0x3C,0x66,0x66,0x66,0x7E,0x66,0x66,0x66,0x00,0x00,0x00,0x00},/*&quot;A&quot;,33*/<br />{0x00,0x00,0x00,0x7C,0x66,0x66,0x66,0x7C,0x66,0x66,0x66,0x7C,0x00,0x00,0x00,0x00},/*&quot;B&quot;,34*/<br />{0x00,0x00,0x00,0x3C,0x66,0x66,0x60,0x60,0x60,0x66,0x66,0x3C,0x00,0x00,0x00,0x00},/*&quot;C&quot;,35*/<br />{0x00,0x00,0x00,0x78,0x6C,0x66,0x66,0x66,0x66,0x66,0x6C,0x78,0x00,0x00,0x00,0x00},/*&quot;D&quot;,36*/<br />{0x00,0x00,0x00,0x7E,0x60,0x60,0x60,0x7C,0x60,0x60,0x60,0x7E,0x00,0x00,0x00,0x00},/*&quot;E&quot;,37*/<br />{0x00,0x00,0x00,0x7E,0x60,0x60,0x60,0x7C,0x60,0x60,0x60,0x60,0x00,0x00,0x00,0x00},/*&quot;F&quot;,38*/<br />{0x00,0x00,0x00,0x3C,0x66,0x66,0x60,0x60,0x6E,0x66,0x66,0x3E,0x00,0x00,0x00,0x00},/*&quot;G&quot;,39*/<br />{0x00,0x00,0x00,0x66,0x66,0x66,0x66,0x7E,0x66,0x66,0x66,0x66,0x00,0x00,0x00,0x00},/*&quot;H&quot;,40*/<br />{0x00,0x00,0x00,0x3C,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00},/*&quot;I&quot;,41*/<br />{0x00,0x00,0x1E,0x0C,0x0C,0x0C,0x0C,0x0C,0xCC,0xCC,0xCC,0x78,0x00,0x00,0x00,0x00},/*&quot;J&quot;,42*/<br />{0x00,0x00,0x00,0x66,0x66,0x6C,0x6C,0x78,0x6C,0x6C,0x66,0x66,0x00,0x00,0x00,0x00},/*&quot;K&quot;,43*/<br />{0x00,0x00,0x00,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x7E,0x00,0x00,0x00,0x00},/*&quot;L&quot;,44*/<br />{0x00,0x00,0x00,0x63,0x63,0x77,0x6B,0x6B,0x6B,0x63,0x63,0x63,0x00,0x00,0x00,0x00},/*&quot;M&quot;,45*/<br />{0x00,0x00,0x00,0x63,0x63,0x73,0x7B,0x6F,0x67,0x63,0x63,0x63,0x00,0x00,0x00,0x00},/*&quot;N&quot;,46*/<br />{0x00,0x00,0x00,0x3C,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x3C,0x00,0x00,0x00,0x00},/*&quot;O&quot;,47*/<br />{0x00,0x00,0x00,0x7C,0x66,0x66,0x66,0x7C,0x60,0x60,0x60,0x60,0x00,0x00,0x00,0x00},/*&quot;P&quot;,48*/<br />{0x00,0x00,0x00,0x3C,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x3C,0x0C,0x06,0x00,0x00},/*&quot;Q&quot;,49*/<br />{0x00,0x00,0x00,0x7C,0x66,0x66,0x66,0x7C,0x6C,0x66,0x66,0x66,0x00,0x00,0x00,0x00},/*&quot;R&quot;,50*/<br />{0x00,0x00,0x00,0x3C,0x66,0x60,0x30,0x18,0x0C,0x06,0x66,0x3C,0x00,0x00,0x00,0x00},/*&quot;S&quot;,51*/<br />{0x00,0x00,0x00,0x7E,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x00,0x00,0x00,0x00},/*&quot;T&quot;,52*/<br />{0x00,0x00,0x00,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x3C,0x00,0x00,0x00,0x00},/*&quot;U&quot;,53*/<br />{0x00,0x00,0x00,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x3C,0x18,0x00,0x00,0x00,0x00},/*&quot;V&quot;,54*/<br />{0x00,0x00,0x00,0x63,0x63,0x63,0x6B,0x6B,0x6B,0x36,0x36,0x36,0x00,0x00,0x00,0x00},/*&quot;W&quot;,55*/<br />{0x00,0x00,0x00,0x66,0x66,0x34,0x18,0x18,0x2C,0x66,0x66,0x66,0x00,0x00,0x00,0x00},/*&quot;X&quot;,56*/<br />{0x00,0x00,0x00,0x66,0x66,0x66,0x66,0x3C,0x18,0x18,0x18,0x18,0x00,0x00,0x00,0x00},/*&quot;Y&quot;,57*/<br />{0x00,0x00,0x00,0x7E,0x06,0x06,0x0C,0x18,0x30,0x60,0x60,0x7E,0x00,0x00,0x00,0x00},/*&quot;Z&quot;,58*/<br />{0x00,0x00,0x00,0x3C,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x3C,0x00},/*&quot;&#91;&quot;,59*/<br />{0x00,0x00,0x00,0x60,0x60,0x30,0x30,0x18,0x18,0x0C,0x0C,0x06,0x06,0x00,0x00,0x00},/*&quot;\&quot;,60*/<br />{0x00,0x00,0x00,0x3C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x3C,0x00},/*&quot;&#93;&quot;,61*/<br />{0x00,0x18,0x3C,0x66,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*&quot;^&quot;,62*/<br />{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00},/*&quot;_&quot;,63*/<br />{0x00,0x38,0x18,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*&quot;`&quot;,64*/<br />{0x00,0x00,0x00,0x00,0x00,0x3C,0x06,0x06,0x3E,0x66,0x66,0x3E,0x00,0x00,0x00,0x00},/*&quot;a&quot;,65*/<br />{0x00,0x00,0x00,0x60,0x60,0x7C,0x66,0x66,0x66,0x66,0x66,0x7C,0x00,0x00,0x00,0x00},/*&quot;b&quot;,66*/<br />{0x00,0x00,0x00,0x00,0x00,0x3C,0x66,0x60,0x60,0x60,0x66,0x3C,0x00,0x00,0x00,0x00},/*&quot;c&quot;,67*/<br />{0x00,0x00,0x00,0x06,0x06,0x3E,0x66,0x66,0x66,0x66,0x66,0x3E,0x00,0x00,0x00,0x00},/*&quot;d&quot;,68*/<br />{0x00,0x00,0x00,0x00,0x00,0x3C,0x66,0x66,0x7E,0x60,0x60,0x3C,0x00,0x00,0x00,0x00},/*&quot;e&quot;,69*/<br />{0x00,0x00,0x00,0x1E,0x30,0x30,0x30,0x7E,0x30,0x30,0x30,0x30,0x00,0x00,0x00,0x00},/*&quot;f&quot;,70*/<br />{0x00,0x00,0x00,0x00,0x00,0x3E,0x66,0x66,0x66,0x66,0x66,0x3E,0x06,0x06,0x7C,0x00},/*&quot;g&quot;,71*/<br />{0x00,0x00,0x00,0x60,0x60,0x7C,0x66,0x66,0x66,0x66,0x66,0x66,0x00,0x00,0x00,0x00},/*&quot;h&quot;,72*/<br />{0x00,0x00,0x18,0x18,0x00,0x78,0x18,0x18,0x18,0x18,0x18,0x7E,0x00,0x00,0x00,0x00},/*&quot;i&quot;,73*/<br />{0x00,0x00,0x0C,0x0C,0x00,0x3C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x78,0x00},/*&quot;j&quot;,74*/<br />{0x00,0x00,0x00,0x60,0x60,0x66,0x66,0x6C,0x78,0x6C,0x66,0x66,0x00,0x00,0x00,0x00},/*&quot;k&quot;,75*/<br />{0x00,0x00,0x00,0x78,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x7E,0x00,0x00,0x00,0x00},/*&quot;l&quot;,76*/<br />{0x00,0x00,0x00,0x00,0x00,0x7E,0x6B,0x6B,0x6B,0x6B,0x6B,0x63,0x00,0x00,0x00,0x00},/*&quot;m&quot;,77*/<br />{0x00,0x00,0x00,0x00,0x00,0x7C,0x66,0x66,0x66,0x66,0x66,0x66,0x00,0x00,0x00,0x00},/*&quot;n&quot;,78*/<br />{0x00,0x00,0x00,0x00,0x00,0x3C,0x66,0x66,0x66,0x66,0x66,0x3C,0x00,0x00,0x00,0x00},/*&quot;o&quot;,79*/<br />{0x00,0x00,0x00,0x00,0x00,0x7C,0x66,0x66,0x66,0x66,0x66,0x7C,0x60,0x60,0x60,0x00},/*&quot;p&quot;,80*/<br />{0x00,0x00,0x00,0x00,0x00,0x3E,0x66,0x66,0x66,0x66,0x66,0x3E,0x06,0x06,0x06,0x00},/*&quot;q&quot;,81*/<br />{0x00,0x00,0x00,0x00,0x00,0x66,0x6E,0x70,0x60,0x60,0x60,0x60,0x00,0x00,0x00,0x00},/*&quot;r&quot;,82*/<br />{0x00,0x00,0x00,0x00,0x00,0x3E,0x60,0x60,0x3C,0x06,0x06,0x7C,0x00,0x00,0x00,0x00},/*&quot;s&quot;,83*/<br />{0x00,0x00,0x00,0x30,0x30,0x7E,0x30,0x30,0x30,0x30,0x30,0x1E,0x00,0x00,0x00,0x00},/*&quot;t&quot;,84*/<br />{0x00,0x00,0x00,0x00,0x00,0x66,0x66,0x66,0x66,0x66,0x66,0x3E,0x00,0x00,0x00,0x00},/*&quot;u&quot;,85*/<br />{0x00,0x00,0x00,0x00,0x00,0x66,0x66,0x66,0x66,0x66,0x3C,0x18,0x00,0x00,0x00,0x00},/*&quot;v&quot;,86*/<br />{0x00,0x00,0x00,0x00,0x00,0x63,0x6B,0x6B,0x6B,0x6B,0x36,0x36,0x00,0x00,0x00,0x00},/*&quot;w&quot;,87*/<br />{0x00,0x00,0x00,0x00,0x00,0x66,0x66,0x3C,0x18,0x3C,0x66,0x66,0x00,0x00,0x00,0x00},/*&quot;x&quot;,88*/<br />{0x00,0x00,0x00,0x00,0x00,0x66,0x66,0x66,0x66,0x66,0x66,0x3C,0x0C,0x18,0xF0,0x00},/*&quot;y&quot;,89*/<br />{0x00,0x00,0x00,0x00,0x00,0x7E,0x06,0x0C,0x18,0x30,0x60,0x7E,0x00,0x00,0x00,0x00},/*&quot;z&quot;,90*/<br />{0x00,0x00,0x00,0x0C,0x18,0x18,0x18,0x30,0x60,0x30,0x18,0x18,0x18,0x0C,0x00,0x00},/*&quot;{&quot;,91*/<br />{0x00,0x00,0x00,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x00},/*&quot;|&quot;,92*/<br />{0x00,0x00,0x00,0x30,0x18,0x18,0x18,0x0C,0x06,0x0C,0x18,0x18,0x18,0x30,0x00,0x00},/*&quot;}&quot;,93*/<br />{0x00,0x00,0x00,0x71,0xDB,0x8E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} /*&quot;~&quot;,94*/<br />};<br /><br /><br />#endif /* FONTS_H_ */[/syntax]<br /><br />spi.c<br />[syntax=c]/*<br /> * spi.c<br /> *<br /> *  Created on: 18-08-2013<br /> *      Author: MIREK<br /> */<br />#include &lt;avr/io.h&gt;<br />#include &lt;util/delay.h&gt;<br />#include &lt;stdio.h&gt;<br /><br />#include &quot;spi.h&quot;<br /><br />#ifndef USE_SOFT_SPI<br /><br /><br />// ustawianie CS pin<br />void SPI_SelectSlave ()<br />{<br />    PORTB &amp;= ~( 1&lt;&lt;CS );<br />}<br /><br />void SPI_ReleaseSlave ()<br />{<br />    PORTB |= ( 1&lt;&lt;CS );<br />}<br /><br />void InitSpi(void) {<br /><br />DDRB |= (1&lt;&lt;CS);<br /><br />SPI_ReleaseSlave();<br /><br />/* ustawienie kierunku wyjœciowego dla linii MOSI, SCK i SS */<br />DDRB |= (1&lt;&lt;MOSI) | (1&lt;&lt;SCK)  | (1&lt;&lt;SS);<br /><br />// aktywacja  SPI<br />SPCR |= (1&lt;&lt;SPE)|(1&lt;&lt;MSTR)|(1&lt;&lt;CPOL)|(1&lt;&lt;CPHA);<br />SPSR |= (1&lt;&lt;SPI2X);<br />}<br /><br />/* definicja  funkcji wysy³aj¹cej bajt */<br />void SendSpi( uint8_t bajt ) {<br />/* wysy³amy bajt do uk³adu Slave */<br />SPDR = bajt;<br />/* czekamy a¿ zostanie wys³any ostatni bit */<br />while( !(SPSR &amp; (1&lt;&lt;SPIF)) );<br /><br />/* zbocze narastaj¹ce sygna³u „Latch Clock” powoduje<br /> * przepisanie wartoœci rejestru do wyjœæ Qa - Qh */<br />PORTB |= (1&lt;&lt;CS);<br />/* odczekanie 1 us – czas trwania impulsu LE */<br />_delay_us(1);<br />/* przywracamy stan niski na linii LE dziêki czemu<br /> * podczas wysy³ania nastêpnego bajtu nie bêd¹ widoczne zmiany<br /> * na wyjœciach Qa-Qh podczas przesuwania siê rejestru do czasu<br /> * ponownego zatrzaœniêcia ca³ego bajtu */<br />PORTB &amp;= ~(1&lt;&lt;CS);<br />}<br /><br />uint8_t SendReadSpi( uint8_t bajt ) {<br />/* wysy³amy bajt do uk³adu Slave */<br />SPDR = bajt;<br />/* czekamy a¿ zostanie wys³any ostatni bit */<br />while( !(SPSR &amp; (1&lt;&lt;SPIF)) );<br />bajt=SPDR;<br /><br />return bajt;<br />}<br /><br />#else<br /><br />void InitSoftSpi(void) {<br />/* ustawienie kierunku wyjœciowego dla linii MOSI, SCK i CS */<br />DDRB |= (1&lt;&lt;SMOSI)|(1&lt;&lt;SSCK)|(1&lt;&lt;SCS);<br /><br />DDRB &amp;= ~(1&lt;&lt;SMISO);<br />}<br /><br />// ustawianie CS pin<br />void SPI_SelectSlave ()<br />{<br />    PORTB &amp;= ~( 1&lt;&lt;SCS );<br />}<br /><br />void SPI_ReleaseSlave ()<br />{<br />    PORTB |= ( 1&lt;&lt;SCS );<br />}<br /><br /><br />/* definicja  funkcji wysy³aj¹cej bajt */<br />void SendSoftSpi( uint8_t bajt ) {<br />uint8_t cnt=0x80;<br /><br />SCK_0;<br />/* wysy³amy bajt do uk³adu Slave */<br />while( cnt ) {<br />if( bajt &amp; cnt ) MOSI_1;<br />else MOSI_0;<br />SCK_1;<br />SCK_0;<br />cnt&gt;&gt;=1;<br />}<br />/* czekamy a¿ zostanie wys³any ostatni bit */<br /><br />/* zbocze narastaj¹ce sygna³u „Latch Clock” powoduje<br /> * przepisanie wartoœci rejestru do wyjœæ Qa - Qh */<br />PORTB |= (1&lt;&lt;SCS);<br />/* odczekanie 1 us – czas trwania impulsu LE */<br />_delay_us(1);<br />/* przywracamy stan niski na linii LE dziêki czemu<br /> * podczas wysy³ania nastêpnego bajtu nie bêd¹ widoczne zmiany<br /> * na wyjœciach Qa-Qh podczas przesuwania siê rejestru do czasu<br /> * ponownego zatrzaœniêcia ca³ego bajtu */<br />PORTB &amp;= ~(1&lt;&lt;SCS);<br />}<br /><br />/**************************************************<br />Function: SoftSendReadSpi(); - podstawowy zapis/odczyt soft SPI<br />**************************************************/<br />uint8_t SendReadSpi(uint8_t bajt)<br />{<br />register uint8_t i;<br /><br />for(i=0;i&lt;8;i++) {<br />if(bajt &amp; 0x80) {<br />MOSI_1;// MOSI=1;<br />} else {<br />MOSI_0;// MOSI=0;<br />}<br /><br />//registeruint8_t cnt=0x80;<br /><br />//SCK_0;<br />/* wysy³amy bajt do uk³adu Slave */<br />//while( cnt ) {<br />//if( bajt &amp; cnt ) MOSI_1;<br />//else MOSI_0;<br />//SCK_1;<br />//SCK_0;<br />//cnt&gt;&gt;=1;<br />//}<br /><br /><br />bajt = ( bajt &lt;&lt; 1 );           // shift next bit<br /><br />//if( SMISO &amp; PORTB ) bajt |= 1;// check MISO bit<br />if( PINB &amp; (1&lt;&lt;PB6) ) bajt |= 1;<br />SCK_1;// SCK = 1;<br />SCK_0;// SCK = 0;<br />}<br />return bajt;          //<br />}<br /><br /><br />#endif[/syntax]<br /><br />spi.h<br />[syntax=c]/*<br /> * spi.h<br /> *<br /> *  Created on: 18-08-2013<br /> *      Author: MIREK<br /> */<br /><br />#ifndef SPI_H_<br />#define SPI_H_<br /><br />/*<br /> *ODKOMENTUJ poni¿sz¹ liniê aby u¿yæ programowego SPI<br /> */<br /><br />//#define USE_SOFT_SPI<br /><br />/* hardware SPI */<br />#define MOSI PB5//   &lt;----  ( IN )<br />#define MISO PB6    //   &lt;----  ( OUT )<br />#define SCK PB7//   &lt;---- SHIFT CLOCK (SC)<br />#define CS PB0// &lt;---- LATCH CLOCK (LC)<br />#define SS PB4<br /><br />/* software SPI */<br />#define SMOSI PB5 //   &lt;---- ( IN )<br />#define SSCK PB7//   &lt;---- SHIFT CLOCK (SC)<br />#define SCS PB0// &lt;---- LATCH CLOCK (LC)<br />#define SMISO PB6   //   &lt;---- ( OUT )<br /><br />#define SCK_0 PORTB &amp;= ~(1&lt;&lt;SSCK)<br />#define SCK_1 PORTB |= (1&lt;&lt;SSCK)<br />#define MOSI_0 PORTB &amp;= ~(1&lt;&lt;SMOSI)<br />#define MOSI_1 PORTB |= (1&lt;&lt;SMOSI)<br />#define MISO_0 PORTB &amp;= ~(1&lt;&lt;SMISO)<br />#define MISO_1 PORTB |= (1&lt;&lt;SMISO)<br /><br /><br />void InitSpi(void);/* inicjalizacja sprzêtowego SPI */<br />void InitSoftSpi(void);/* inicjalizacja programowego SPI */<br /><br />void SPI_SelectSlave ( );<br />void SPI_ReleaseSlave ( );<br /><br />void SendSpi( uint8_t bajt );/* wys³anie bajtu - sprzêtowe SPI */<br />uint8_t SendReadSpi( uint8_t bajt );<br /><br />void SendSoftSpi( uint8_t bajt );/* wys³anie bajtu - programowe SPI */<br />//uint8_t SendReadSpi(uint8_t bajt);<br /><br />#endif /* SPI_H_ */[/syntax]<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=126">gufim</a> — 2 cze 2014, o 18:21</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[MoherPower]]></name></author>
<updated>2014-06-02T08:25:06+01:00</updated>
<published>2014-06-02T08:25:06+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=7264&amp;p=83008#p83008</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=7264&amp;p=83008#p83008"/>
<title type="html"><![CDATA[Re: sterownik ili9325c + lcd + avr]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=7264&amp;p=83008#p83008"><![CDATA[
Bardzo dziękuję gufim.<br />Jest to ogromy krok w przód jednak czy było by to dużym nadużyciem gdybym poprosił cię o pliki fonts.h i /SPI/spi.h oraz ewentualnie odpowiadające im pliki c.<br />Jeżeli nie chcesz to proszę o podpowiedz co do funkcji się tam znajdujących.<br /><br />SPI_SelectSlave (); - ta funkcja ustawia &quot;low&quot; na lini CS wyświetlacza? czy robi coś jeszcze?<br />SendReadSPI (); - czy ta funkcja coś zwraca czy jest typu void. jak rozumiem przesyłamy nią po bajcie <br />SPI_ReleaseSlave (); ta funkcja ustawia &quot;high&quot; na lini CS wyświetlacza<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=2521">MoherPower</a> — 2 cze 2014, o 08:25</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[gufim]]></name></author>
<updated>2014-06-02T07:17:27+01:00</updated>
<published>2014-06-02T07:17:27+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=7264&amp;p=83005#p83005</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=7264&amp;p=83005#p83005"/>
<title type="html"><![CDATA[Re: sterownik ili9325c + lcd + avr]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=7264&amp;p=83005#p83005"><![CDATA[
Witam bawilem sie kiedys wyswietlaczem ze sterownikiem ili9320 sa one dosc podobne wiec zalaczam to co mi z tego wyszlo<br />ili9320.c<br />[syntax=c]/*<br /> *ILI9320.c<br /> *<br /> *  Created on: 11 gru 2013<br /> *Author: Mirek<br /> */ <br /><br /><br />#include &lt;stdio.h&gt;<br />#include &lt;inttypes.h&gt;<br />#include &lt;util/delay.h&gt;<br />#include &lt;avr/pgmspace.h&gt;<br />#include &lt;string.h&gt;<br /><br />#include &quot;fonts.h&quot;<br />#include &quot;ili9320.h&quot;<br />#include &quot;SPI/spi.h&quot;<br /><br /><br />// Write an Index to the display<br />void lcd_WriteIndex(uint8_t index)<br />{<br />SPI_SelectSlave ();<br /><br />    /* SPI write data */<br />SendReadSpi(SPI_START | SPI_WR | SPI_INDEX);   /* Write : RS = 0, RW = 0       */<br />SendReadSpi(0);<br />SendReadSpi(index);<br /><br />SPI_ReleaseSlave ();<br />}<br /><br />// Write register data<br />void lcd_WriteData( uint16_t data)<br />{<br />SPI_SelectSlave ();<br /><br />SendReadSpi(SPI_START | SPI_WR | SPI_DATA);    /* Write : RS = 1, RW = 0       */<br />SendReadSpi((data &gt;&gt; 8));                    /* Write D8..D15                */<br />SendReadSpi((data &amp; 0xFF));                    /* Write D0..D7                 */<br /><br />SPI_ReleaseSlave ();<br />}<br /><br />void lcd_WriteDataOnly( uint16_t data)<br />{<br />SendReadSpi((data &gt;&gt;   8));      /* Write D8..D15                */<br />SendReadSpi((data &amp; 0xFF));      /* Write D0..D7                 */<br />}<br /><br />// Write start byte only<br />void lcd_WriteDataStart(void)<br />{<br />SendReadSpi(SPI_START | SPI_WR | SPI_DATA);    /* Write : RS = 1, RW = 0       */<br />}<br /><br />// Reads data from the display<br />uint16_t lcd_ReadData(void)<br />{<br />uint16_t value;<br /><br />SPI_SelectSlave ();<br /><br />SendReadSpi(SPI_START | SPI_RD | SPI_DATA);    /* Read: RS = 1, RW = 1         */<br />SendReadSpi(0);                                /* Dummy read 1                 */<br />value   = SendReadSpi(0);                      /* Read D8..D15                 */<br />value &lt;&lt;= 8;<br />value  |= SendReadSpi(0);                      /* Read D0..D7                  */<br /><br />SPI_ReleaseSlave ();<br /><br />return value;<br />}<br /><br />// Writes data to the selected register<br />void lcd_WriteRegister( uint16_t Display_Reg, uint16_t Display_RegValue)<br />{<br />/* Write 16-bit Index, then Write Reg */<br />lcd_WriteIndex(Display_Reg);<br />/* Write 16-bit Reg */<br />lcd_WriteData(Display_RegValue);<br />}<br /><br />// Reads data from the selected register<br />uint16_t lcd_ReadReg( uint16_t Display_Reg)<br />{<br />uint16_t Display_RAM;<br /><br />/* Write 16-bit Index (then Read Reg) */<br />lcd_WriteIndex(Display_Reg);<br />/* Read 16-bit Reg */<br />Display_RAM = lcd_ReadData();<br /><br />return Display_RAM;<br />}<br /><br />// Sets cursor to the given address (x,y)<br />static void lcd_SetCursor( uint16_t Xpoz, uint16_t Ypoz )<br />{<br />/* 0x9320 */<br />lcd_WriteRegister(0x0020, Xpoz );<br />lcd_WriteRegister(0x0021, Ypoz );<br />}<br /><br />// Initializes the display. This function should be called first for getting anything to work<br />void lcd_Init(void)<br />{<br />    // Reset LCD, this is very important to get anything working<br />    // Sequence: Reset pin of LCD: HIGH, delay, LOW, delay, HIGH, longer delay<br />    DISPLAY_RESET_DDR |= (1&lt;&lt;DISPLAY_RESET_PIN); // Set reset pin As Output<br />    DISPLAY_RESET_PORT |= (1&lt;&lt;DISPLAY_RESET_PIN);<br />    _delay_ms(2);<br /><br />    // Reset controller<br />    DISPLAY_RESET_PORT &amp;= ~(1&lt;&lt;DISPLAY_RESET_PIN);<br />    _delay_ms(2);<br />    DISPLAY_RESET_PORT |= (1&lt;&lt;DISPLAY_RESET_PIN);<br />    _delay_ms(15);<br /><br /><br /><br />    uint16_t DeviceCode;<br /><br />//Display_Configuration();<br />DeviceCode = lcd_ReadReg(0x0000);/* Read ID*/<br />/* Different driver IC initialization*/<br />if( DeviceCode == 0x9320 || DeviceCode == 0x9300 )<br />{<br />lcd_WriteRegister(0x00,0x0000);<br />lcd_WriteRegister(0x01,0x0100); /* Driver Output Contral */<br />lcd_WriteRegister(0x02,0x0700); /* LCD Driver Waveform Contral */<br /><br />//lcd_WriteRegister(0x03,0x1038); /* Set the scan mode */<br />lcd_WriteRegister(0x03,0x1018); /* Set the scan mode */<br /><br />lcd_WriteRegister(0x0020, 0x0000 );<br />lcd_WriteRegister(0x0021, 0x013f );<br /><br />lcd_WriteRegister(0x04,0x0000); /* Scalling Contral */<br />lcd_WriteRegister(0x08,0x0202); /* Display Contral 2 */<br />lcd_WriteRegister(0x09,0x0000); /* Display Contral 3 */<br />lcd_WriteRegister(0x0a,0x0000); /* Frame Cycle Contal */<br />lcd_WriteRegister(0x0c,(1&lt;&lt;0)); /* Extern Display Interface Contral 1 */<br />lcd_WriteRegister(0x0d,0x0000); /* Frame Maker Position */<br />lcd_WriteRegister(0x0f,0x0000); /* Extern Display Interface Contral 2 */<br />_delay_ms(50);<br />lcd_WriteRegister(0x07,0x0101); /* Display Contral */<br />_delay_ms(50);<br />lcd_WriteRegister(0x10,(1&lt;&lt;12)|(0&lt;&lt;8)|(1&lt;&lt;7)|(1&lt;&lt;6)|(0&lt;&lt;4)); /* Power Control 1 */<br />lcd_WriteRegister(0x11,0x0007);                              /* Power Control 2 */<br />lcd_WriteRegister(0x12,(1&lt;&lt;8)|(1&lt;&lt;4)|(0&lt;&lt;0));                /* Power Control 3 */<br />lcd_WriteRegister(0x13,0x0b00);                              /* Power Control 4 */<br />lcd_WriteRegister(0x29,0x0000);                              /* Power Control 7 */<br />lcd_WriteRegister(0x2b,(1&lt;&lt;14)|(1&lt;&lt;4));<br /><br />lcd_WriteRegister(0x50,0);       /* Set X Start */<br />lcd_WriteRegister(0x51,239);    /* Set X End */<br />lcd_WriteRegister(0x52,0);    /* Set Y Start */<br />lcd_WriteRegister(0x53,319);    /* Set Y End */<br />_delay_ms(50);<br /><br />lcd_WriteRegister(0x60,0x2700); /* Driver Output Control */<br />lcd_WriteRegister(0x61,0x0001); /* Driver Output Control */<br />lcd_WriteRegister(0x6a,0x0000); /* Vertical Srcoll Control */<br /><br />lcd_WriteRegister(0x80,0x0000); /* Display Position? Partial Display 1 */<br />lcd_WriteRegister(0x81,0x0000); /* RAM Address Start? Partial Display 1 */<br />lcd_WriteRegister(0x82,0x0000); /* RAM Address End-Partial Display 1 */<br />lcd_WriteRegister(0x83,0x0000); /* Displsy Position? Partial Display 2 */<br />lcd_WriteRegister(0x84,0x0000); /* RAM Address Start? Partial Display 2 */<br />lcd_WriteRegister(0x85,0x0000); /* RAM Address End? Partial Display 2 */<br /><br />lcd_WriteRegister(0x90,(0&lt;&lt;7)|(16&lt;&lt;0)); /* Frame Cycle Contral */<br />lcd_WriteRegister(0x92,0x0000);         /* Panel Interface Contral 2 */<br />lcd_WriteRegister(0x93,0x0001);         /* Panel Interface Contral 3 */<br />lcd_WriteRegister(0x95,0x0110);         /* Frame Cycle Contral */<br />lcd_WriteRegister(0x97,(0&lt;&lt;8));<br />lcd_WriteRegister(0x98,0x0000);         /* Frame Cycle Contral */<br />lcd_WriteRegister(0x07,0x0133);<br />lcd_WriteRegister(0x07, 0x0173); // 262K color and display ON   0133<br />}<br />    _delay_ms(100);   /* delay 50 ms */<br />}<br /><br />// Clears the display with the selected color<br />void lcd_Clear( uint16_t Color)<br />{<br />uint32_t index=0;<br /><br />lcd_SetCursor(0,0);<br /><br />lcd_WriteIndex(0x0022);<br /><br /> SPI_SelectSlave ();<br />lcd_WriteDataStart();<br /><br />for( index = 0; index &lt; (uint32_t)MAX_X * MAX_Y; index++ )<br />{<br />SendReadSpi((Color &gt;&gt;  8));      /* Write D8..D15                */<br />SendReadSpi((Color &amp; 0xFF));      /* Write D0..D7                 */<br /><br />}<br />SPI_ReleaseSlave ();<br />}<br /><br /><br /><br />// Converts BGR color scheme to the more usual RGB.<br />// RRRRRGGGGGGBBBBB To BBBBBGGGGGGRRRRR<br />static unsigned short lcd_BGR2RGB( unsigned short color)<br />{<br />unsigned short  r, g, b, rgb;<br /><br />b = ( color&gt;&gt;0 )  &amp; 0x1f;<br />g = ( color&gt;&gt;5 )  &amp; 0x3f;<br />r = ( color&gt;&gt;11 ) &amp; 0x1f;<br /><br />rgb =  (b&lt;&lt;11) + (g&lt;&lt;5) + (r&lt;&lt;0);<br /><br />return( rgb );<br />}<br /><br />// Reads the color of the pixel at position x,y<br />uint16_t lcd_GetPoint( uint16_t Xpos, uint16_t Ypos)<br />{<br />uint16_t dummy;<br /><br />lcd_SetCursor(Xpos,Ypos);<br /><br />lcd_WriteIndex(0x0022);<br /><br />dummy = lcd_ReadData();   /* An empty read */<br />dummy = lcd_ReadData();<br /><br />return  lcd_BGR2RGB( dummy );<br />}<br /><br />// Sets the color of a pixel at position x,y<br />void lcd_SetPoint( uint16_t Xpoz, uint16_t Ypoz, uint16_t color)<br />{<br />if( Xpoz &gt;= MAX_X || Ypoz &gt;= MAX_Y )<br />{<br />return;<br />}<br />lcd_SetCursor(Ypoz,319-Xpoz);<br />lcd_WriteRegister(0x0022,color);<br /><br />}<br /><br />// Draws a line from x1,y1 to x2,y2 with the selected color<br /><br />void lcd_DrawLine( uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1 , uint16_t color )<br />{<br />    int16_t dx,dy;      /* The definition of the X Y axis increase the value of the variable */<br />    int16_t temp;<br /><br />    if( x0 &gt; x1 )<br />    {<br />    temp = x1;<br />x1 = x0;<br />x0 = temp;<br />    }<br />    if( y0 &gt; y1 )<br />    {<br />temp = y1;<br />y1 = y0;<br />y0 = temp;<br />    }<br /><br />dx = x1-x0;<br />dy = y1-y0;<br /><br />    if( dx == 0 )<br />    {<br />        do<br />        {<br />            lcd_SetPoint(x0, y0, color);<br />            y0++;<br />        }<br />        while( y1 &gt;= y0 );<br />return;<br />    }<br />    if( dy == 0 )<br />    {<br />        do<br />        {<br />            lcd_SetPoint(x0, y0, color);<br />            x0++;<br />        }<br />        while( x1 &gt;= x0 );<br />return;<br />    }<br /><br />    if( dx &gt; dy )<br />    {<br />    temp = 2 * dy - dx;<br />        while( x0 != x1 )<br />        {<br />        lcd_SetPoint(x0,y0,color);<br />        x0++;<br />        if( temp &gt; 0 )<br />        {<br />            y0++;<br />            temp += 2 * dy - 2 * dx;<br />     }<br />            else<br />            {<br />    temp += 2 * dy;<br />}<br />        }<br />        lcd_SetPoint(x0,y0,color);<br />    }<br />    else<br />    {<br />    temp = 2 * dx - dy;<br />        while( y0 != y1 )<br />        {<br />     lcd_SetPoint(x0,y0,color);<br />            y0++;<br />            if( temp &gt; 0 )<br />            {<br />                x0++;<br />                temp+=2*dy-2*dx;<br />            }<br />            else<br />{<br />                temp += 2 * dy;<br />}<br />        }<br />        lcd_SetPoint(x0,y0,color);<br />}<br />}<br /><br />void lcd_chr_small_znak_pion(char chr, uint16_t Xpoz, uint16_t Ypoz, uint16_t color_font, uint16_t color)<br />{<br />    char buf;<br />uint16_t  xpoz, ypoz, j;<br />xpoz=Xpoz;<br />ypoz=Ypoz+6;<br /><br />    if(Xpoz&lt;314)<br />{<br /><br />    for(uint16_t i=0;i&lt;5;i++)//dla 5 elementów tablicy znakowej<br />{<br />buf = pgm_read_byte(&amp;font5x7&#91;chr - 32&#93;&#91;i&#93;);//przypisania buf jednego z 5 elementów<br />j=0;<br />while(j&lt;8)<br />{<br />    if(buf &amp; _BV(7-j))//Jeœli kolejny element jest 1<br />{<br />    lcd_SetPoint(xpoz+i,ypoz-j, color_font);//rysuje pixel<br />j++;<br />}<br />else if(color!=-1)<br />{<br />lcd_SetPoint(xpoz+i,ypoz-j, color);//rysuje pixel<br />j++;<br />}<br />else<br />{<br />j++;<br />}<br />}<br />}<br />}<br />}<br /><br />void lcd_str_small_napis_pion(char *str, uint16_t Xpoz, uint16_t Ypoz, uint16_t color_font, uint16_t color)<br />{<br />    while((*str != 0) &amp;&amp; (*str != 10))<br />{<br /><br />        lcd_chr_small_znak_pion(*str++, Xpoz, Ypoz, color_font, color);<br />Xpoz+=6;<br />if(Xpoz&gt;320)////Jeœli ma³e litery i wyjdzie poza ekran<br />break;<br />}<br />}<br /><br />void lcd_chr_med_znak_poziom(char chr, uint16_t Xpoz, uint16_t Ypoz, uint16_t color_font, uint16_t color)<br />{<br /><br />    uint8_t buf;<br />uint16_t  xpoz, ypoz, j;<br />xpoz=Xpoz;<br />ypoz=Ypoz+16;<br /><br />    if(Xpoz&lt;312)<br />{<br />for(uint8_t i=0;i&lt;16;i++)//dla 16 elementów tablicy znakowej<br />{<br />buf = pgm_read_byte(&amp;font8x16&#91;chr - 32&#93;&#91;i&#93;);//przypisania buf jednego z 14 elementów<br />j=0;<br /><br />while(j&lt;8)<br />{<br />    if(buf &amp; _BV(7-j))//Jeœli kolejny element jest 1<br />{<br />    lcd_SetPoint(xpoz+j,ypoz+i, color_font);//rysuje pixel<br />j++;<br />}<br />else if(color!=-1)<br />{<br />lcd_SetPoint(xpoz+j,ypoz+i, color);//rysuje pixel<br />j++;<br />}<br />else<br />{<br />j++;<br />}<br />}<br />}<br />}<br />}<br /><br />void lcd_str_med_napis_poziom(char *str, uint16_t Xpoz, uint16_t Ypoz, uint16_t color_font, uint16_t color)<br />{<br />    while((*str != 0) &amp;&amp; (*str != 10))<br />{<br />        lcd_chr_med_znak_poziom(*str++, Xpoz, Ypoz, color_font, color);<br />Xpoz+=8;<br />if(Xpoz&gt;320)////Jeœli ma³e litery i wyjdzie poza ekran<br />{<br />break;<br />}<br />    }<br />}<br /><br /><br /><br />void lcd_SetWindow( uint16_t Xstart, uint16_t Xkoniec, uint16_t Ystart, uint16_t Ykoniec )<br />{<br />/* 0x9320 */<br />lcd_WriteRegister(0x0050, Xstart );<br />lcd_WriteRegister(0x0051, Xkoniec );<br />lcd_WriteRegister(0x0052, Ystart );<br />lcd_WriteRegister(0x0053, Ykoniec );<br />}<br /><br />void lcd_Area(uint16_t Xpoz,uint16_t Ypoz, uint16_t height, uint16_t width, uint16_t color)<br />{<br />uint32_t index=0;<br /><br />lcd_SetCursor(Ypoz,319-Xpoz);<br />lcd_SetWindow(Ypoz, Ypoz+height-1,319-Xpoz-width+1,319-Xpoz);<br />lcd_WriteIndex(0x0022);<br />SPI_SelectSlave ();<br />lcd_WriteDataStart();<br /><br />for(index = 0; index &lt; width*height; index++)<br />{<br />lcd_WriteDataOnly(color);<br />}<br />SPI_ReleaseSlave ();<br /><br />}<br /><br />void lcd_Image(const uint16_t* pData, uint8_t x, uint16_t y, uint16_t h, uint16_t w)<br />{<br /><br />uint32_t index=0;<br /><br />lcd_SetCursor(y,319-x);<br />lcd_SetWindow(y,y+h-1,319-x-w+1,319-x);<br />lcd_WriteIndex(0x0022);<br />SPI_SelectSlave();<br />lcd_WriteDataStart();<br /><br />for(index = 0; index &lt; w*h; index++)<br />{<br />lcd_WriteDataOnly(pgm_read_word(pData++));<br />}<br />SPI_ReleaseSlave();<br /><br />}[/syntax]<br /><br />ili9320.h<br />[syntax=c]/*<br /> *ILI9320.h<br /> *<br /> *  Created on: 11 gru 2013<br /> *Author: Mirek<br /> */ <br /><br /><br />#ifndef ILI9320_H_<br />#define ILI9320_H_<br /><br />#define MAX_X  320<br />#define MAX_Y  319<br /><br />#define SPI_START   (0x70)              /* Start byte for SPI transfer        */<br />#define SPI_RD      (0x01)              /* WR bit 1 within start              */<br />#define SPI_WR      (0x00)              /* WR bit 0 within start              */<br />#define SPI_DATA    (0x02)              /* RS bit 1 within start byte         */<br />#define SPI_INDEX   (0x00)              /* RS bit 0 within start byte         */<br /><br />#define DISPLAY_RESET_PIN   PB1<br />#define DISPLAY_RESET_DDR   DDRB<br />#define DISPLAY_RESET_PORT  PORTB<br /><br />/* LCD colors */<br />#define White          0xFFFF<br />#define Black          0x0000<br />#define Grey           0xF7DE<br />#define Blue           0x001F<br />#define Blue2          0x051F<br />#define Red            0xF800<br />#define Magenta        0xF81F<br />#define Green          0x07E0<br />#define Cyan           0x7FFF<br />#define Yellow         0xFFE0<br /><br /><br />void lcd_Init(void);<br /><br />void lcd_Clear( uint16_t Color);<br />void lcd_SetPoint( uint16_t Xpoz, uint16_t Ypoz, uint16_t color);<br />void lcd_DrawLine( uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1 , uint16_t color );<br /><br />void lcd_chr_small_znak_pion(char chr, uint16_t Xpoz, uint16_t Ypoz, uint16_t color_font, uint16_t color);<br />void lcd_str_small_napis_pion(char *str, uint16_t Xpoz, uint16_t Ypoz, uint16_t color_font, uint16_t color);<br />void lcd_chr_med_znak_poziom(char chr, uint16_t Xpoz, uint16_t Ypoz, uint16_t color_font, uint16_t color);<br />void lcd_str_med_napis_poziom(char *str, uint16_t Xpoz, uint16_t Ypoz, uint16_t color_font, uint16_t color);<br /><br />void lcd_SetWindow( uint16_t Xstart, uint16_t Xkoniec, uint16_t Ystart, uint16_t Ykoniec );<br />void lcd_Area(uint16_t Xpoz,uint16_t Ypoz, uint16_t height, uint16_t width, uint16_t color);<br />void lcd_Image(const uint16_t* pData, uint8_t x, uint16_t y, uint16_t h, uint16_t w);<br /><br />#endif /* ILI9320_H_ */[/syntax]<br /><br />moze to cie naprowadzi I pomoze milej zabawy<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=126">gufim</a> — 2 cze 2014, o 07:17</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[MoherPower]]></name></author>
<updated>2014-06-01T21:11:34+01:00</updated>
<published>2014-06-01T21:11:34+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=7264&amp;p=82996#p82996</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=7264&amp;p=82996#p82996"/>
<title type="html"><![CDATA[sterownik ili9325c + lcd + avr]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=7264&amp;p=82996#p82996"><![CDATA[
witam wszystkich.<br /><br />Mam problem z wyświetlaczem LCD na sterowniku ili9325c. mam do niego notę katalogową którą zamieszczam w tym wątku. Problem polega na tym że próbuję uruchomić go na SPI. Niestety z noty katalogowej nie jestem w stanie wywnioskować jak to zrobić. a więc konkretne pytania<br /><br />1) na stronie 32 zaczyna się opis komunikacji po SPI. mowa tu o kominikacji 24bit. Z noty wynika że<br />   a) 1 bajt to kontrolny wyglądający 01110 ID RS W/R. i tu pierwsze pytanie piszą tu o ID które ustawia się zworką IM[3:0] więc rozumiem że jeżeli mam te zworki jako 0100 to moje ID=0?<br />   b) cytat z noty <br />&quot;The seventh bit of start byte is RS bit. When RS = “0”, either index write operation or status read operation is executed. When RS = “1”, either register write operation or RAM read/write operation is executed. The eighth bit of the start byte is used to select either read or write operation (R/W bit). Data is written when the R/W bit is “0” and read back when the R/W bit is “1”. <br /><br />a zatem jeżeli chcę zapisać do rejestru to ustawiam RS=1, RW=0. ale co dalej??? czy potem podaję 16 bit. adres rejestru i zmieniam CS żeby przekazać komendę potem znowu CS żeby podać 16 bit wartość tego rejestru czy wale poprostu CS, bits startowy, 16bit adres rejestru, 16 bit wartość rejestru , CS?? ale to już nie będzie 24 bit transmisja tylko 40bit.<br /><br />tak samo jak zapisujemy do ramu skoro z tabelki na stronie 32 wynika że RS=1,RW=0 to jest &quot;Write a register or GRAM data&quot; czyli jeżeli chcę zapisać do ramu liczbę która jest taka sama jak adres rejestru to skąd sterownik wie co chcę zrobić? <br /><br />dla ułatwienia <br />diagram transmisji strona 34,<br />opis i adresy rejestrów strona 58.<br /><br /><br />Proszę o pomoc, bo albo ja jestem tępy jakiś albo ta nota jest fatalnie napisana.<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=2521">MoherPower</a> — 1 cze 2014, o 21:11</p><hr />
]]></content>
</entry>
</feed>