<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>TKJ Electronics</title>
	<atom:link href="http://elec.tkjweb.dk/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://elec.tkjweb.dk/blog</link>
	<description>The electronics-blog</description>
	<lastBuildDate>Mon, 08 Mar 2010 08:49:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>mini2440 &#8211; My new ARM toy</title>
		<link>http://elec.tkjweb.dk/blog/2010/03/mini2440-my-new-arm-toy/</link>
		<comments>http://elec.tkjweb.dk/blog/2010/03/mini2440-my-new-arm-toy/#comments</comments>
		<pubDate>Sun, 07 Mar 2010 21:48:35 +0000</pubDate>
		<dc:creator>Thomas Jespersen</dc:creator>
				<category><![CDATA[mini2440]]></category>
		<category><![CDATA[ARM]]></category>
		<category><![CDATA[ARM9]]></category>

		<guid isPermaLink="false">http://elec.tkjweb.dk/blog/?p=391</guid>
		<description><![CDATA[Last week I recieved a new ARM toy. I unpacked it a minute after I got, and started messing with it straight ahead &#8211; and that&#8217;s why I&#8217;m first writing about it now 
It&#8217;s called mini2440 and it has a Samsung S3C2440A ARM920T chip, clocked at 405 MHz (Max freq. 533 MHz), and a 3.5&#8243; [...]]]></description>
			<content:encoded><![CDATA[<p>Last week I recieved a new ARM toy. I unpacked it a minute after I got, and started messing with it straight ahead &#8211; and that&#8217;s why I&#8217;m first writing about it now <img src='http://elec.tkjweb.dk/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
It&#8217;s called mini2440 and it has a Samsung S3C2440A ARM920T chip, clocked at 405 MHz (Max freq. 533 MHz), and a 3.5&#8243; touch screen display on top. There is also 2MB NOR flash, 64MB SRAM, and 128MB NAND flash (you can get up to 1GB) on the board.</p>
<p><div id="attachment_393" class="wp-caption aligncenter" style="width: 310px"><a href="http://elec.tkjweb.dk/blog/wp-content/uploads/mini2440-35.jpg"><img src="http://elec.tkjweb.dk/blog/wp-content/uploads/mini2440-35-300x291.jpg" alt="" title="mini2440-35" width="300" height="291" class="size-medium wp-image-393" /></a><p class="wp-caption-text">The mini2440 board</p></div><br />
<br />&nbsp;<br />
The mini2440 has alot of connection possibilities, as there is both a USB slave, USB master (OTG), ethernet, RS232, SD card slot and sound output. All these are routed to real connectors, but there is also alot of GPIO&#8217;s which is routed to small pin headers and connectors. There is also a microphone soldered to the board!<br />
You can read more about the mini2440 board here: http://www.friendlyarm.net/products/mini2440</p>
<p><div id="attachment_398" class="wp-caption aligncenter" style="width: 310px"><a href="http://elec.tkjweb.dk/blog/wp-content/uploads/mini2440_2.jpg"><img src="http://elec.tkjweb.dk/blog/wp-content/uploads/mini2440_2-300x258.jpg" alt="" title="mini2440_2" width="300" height="258" class="size-medium wp-image-398" /></a><p class="wp-caption-text">The mini2440 board without the LCD</p></div><br />
<br />&nbsp;<br />
<br />&nbsp;<br />
As the ARM920T hasn&#8217;t any flash itself, it is connected to a NOR and a NAND chip. In the NOR chip there is a bootloader called Supervivi, which makes it easy to upgrade the NAND chip and set boot-options in the NOR, using the USB and serial (RS232) port.</p>
<p><div id="attachment_394" class="wp-caption aligncenter" style="width: 310px"><a href="http://elec.tkjweb.dk/blog/wp-content/uploads/Supervivi-menu.png"><img src="http://elec.tkjweb.dk/blog/wp-content/uploads/Supervivi-menu-300x293.png" alt="" title="Supervivi menu" width="300" height="293" class="size-medium wp-image-394" /></a><p class="wp-caption-text">The Supervivi menu</p></div><br />
<br />&nbsp;<br />
The mini2440 comes preinstalled with Linux 2.6.3 and a graphics layer called Qtopia. But as I haven&#8217;t messed alot with Linux I started investigating other opportunities.<br />
Some of the operation systems (also RTOS&#8217;s) which can be installed on the mini2440 are for example:</p>
<ul>
<li>Linux 2.6.3 and Qtopia (Linux)</li>
<li>Embedian (Linux)</li>
<li>Angstrom (Linux)</li>
<li>Android (Linux)</li>
<li>Windows CE 5.0</li>
<li>Windows CE 6.0</li>
<li>uCos (RTOS)</li>
</ul>
<p>&nbsp;<br />
Of course it is also possible to write code for the board without using an OS &#8211; this can be done in different ways</p>
<ul>
<li>Writing code for the chip itself, and then burn it directly to the ARM920T chip using JTAG</li>
<li>Writing code for the 2MB NOR chip, and then boot from that</li>
<li>Writing code for the NAND chip &#8211; this requires a specific bootloader which is placed in the bottom of the NAND chip</li>
</ul>
<p>Right now I haven&#8217;t tried any of theese, but I have removed the Linux and installed Windows CE 5.0 and afterwards Windows CE 6.0. The great thing about Windows CE 6.0 is the .NET 3.5 Framework. This does the application development much easier, and I&#8217;ve already made my first &#8220;Hello World&#8221; application!<br />
<br />&nbsp;<br />
<br />&nbsp;</p>
<p>It took me hours to get started, as the CD which came with my mini2440 only included the Chineese manual.<br />
But then there is two amazing sites:</p>
<ul>
<li>http://www.friendlyarm.net</li>
<li>http://www.andahammer.com/</li>
<li>And also the IRC channel on Freenode called #mini2440</li>
</ul>
<p>Theese helped me getting started &#8211; but remember, the mini2440 is not for beginners. It requires a clear mind, and alot of time!<br />
<br />&nbsp;<br />
So to help you who may find it difficult to get started, I&#8217;ve uploaded some usefull documents and files.</p>
<ul>
<li><a href="http://elec.tkjweb.dk/mini2440/MINI2440_USER_MANUAL.pdf" target="_blank">A 246 page manual about the mini2440, and how to use it</a><br />&nbsp;&nbsp; &#8211; It also includes some guides about creating your own Linux or WinCE image</li>
<li><a href="http://elec.tkjweb.dk/mini2440/Supervivi_Linux-WinCE_Guide.pdf" target="_blank">A guide for the Supervivi bootloader</a><br />&nbsp;&nbsp; &#8211; How to install Linux or Windows CE on the mini2440</li>
<li><a href="http://elec.tkjweb.dk/mini2440/WinCE5.zip">An english Windows CE 5.0 image</a><br />&nbsp;&nbsp; &#8211; Follow the guide above to install it</li>
<li><a href="http://elec.tkjweb.dk/mini2440/Linux_Nand_Backup.zip">A backup of the factory installed NAND (with Linux and Qtopiad)</a><br />&nbsp;&nbsp; &#8211; Remember this is only for the 128MB version &#8211; Restore it using Supervivi&#8217;s restore function</li>
</ul>
<p>In the following weeks I will upload more things, and write a couple of guides to get started&#8230; Especially guides about getting started with Windows CE 6.0 development, as I&#8217;m doing right now!</p>
]]></content:encoded>
			<wfw:commentRss>http://elec.tkjweb.dk/blog/2010/03/mini2440-my-new-arm-toy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>STM32 Oscilloscope</title>
		<link>http://elec.tkjweb.dk/blog/2010/02/stm32-oscilloscope/</link>
		<comments>http://elec.tkjweb.dk/blog/2010/02/stm32-oscilloscope/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 21:48:29 +0000</pubDate>
		<dc:creator>Thomas Jespersen</dc:creator>
				<category><![CDATA[ARM Projects]]></category>
		<category><![CDATA[LCD]]></category>
		<category><![CDATA[Oscilloscope]]></category>
		<category><![CDATA[STM32]]></category>

		<guid isPermaLink="false">http://elec.tkjweb.dk/blog/?p=389</guid>
		<description><![CDATA[This week I got some inspiration from the ST DSP library, so I made my own oscilloscope with the STM32 and my 320x240 pixels QTFT screen. I made the code from scratch, both the sampling and screen updating code -- but I used the ST DSP library for the FFT calculations of course
You can see [...]]]></description>
			<content:encoded><![CDATA[<p>This week I got some inspiration from the ST DSP library, so I made my own oscilloscope with the STM32 and my 320x240 pixels QTFT screen. I made the code from scratch, both the sampling and screen updating code -- but I used the ST DSP library for the FFT calculations of course</p>
<p>You can see the video of the project here&#8230;<br />
<!-- Smart Youtube --><span class="youtube"><object width="480" height="360"><param name="movie" value="http://www.youtube.com/v/llDmjxUtoRA&amp;rel=1&amp;color1=d6d6d6&amp;color2=f0f0f0&amp;border=&amp;fs=1&amp;hl=en&amp;autoplay=&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0&amp;ap=%2526fmt%3D22" /><param name="allowFullScreen" value="true" /><embed wmode="transparent" src="http://www.youtube.com/v/llDmjxUtoRA&amp;rel=1&amp;color1=d6d6d6&amp;color2=f0f0f0&amp;border=&amp;fs=1&amp;hl=en&amp;autoplay=&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0&amp;ap=%2526fmt%3D22" type="application/x-shockwave-flash" allowfullscreen="true" width="480" height="360" ></embed><param name="wmode" value="transparent" /></object></span></p>
]]></content:encoded>
			<wfw:commentRss>http://elec.tkjweb.dk/blog/2010/02/stm32-oscilloscope/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Magnetic Card lock with the Arduino</title>
		<link>http://elec.tkjweb.dk/blog/2010/02/magnetic-card-lock-with-the-arduino/</link>
		<comments>http://elec.tkjweb.dk/blog/2010/02/magnetic-card-lock-with-the-arduino/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 22:25:42 +0000</pubDate>
		<dc:creator>Thomas Jespersen</dc:creator>
				<category><![CDATA[Arduino Projects]]></category>

		<guid isPermaLink="false">http://elec.tkjweb.dk/blog/?p=370</guid>
		<description><![CDATA[I have posted alot of projects recently, and here is another project with the Arduino!
This projects is about making a magnetic card lock using the Arduino, a servo and a $4 cheap magnetic card reader from AllElectronics.com
The card reader, which you can see in the first picture, has 7 pins. The picture below shows theese [...]]]></description>
			<content:encoded><![CDATA[<p>I have posted alot of projects recently, and here is another project with the Arduino!<br />
This projects is about making a magnetic card lock using the Arduino, a servo and a $4 cheap magnetic card reader from AllElectronics.com<br />
<div id="attachment_378" class="wp-caption aligncenter" style="width: 310px"><a href="http://elec.tkjweb.dk/blog/wp-content/uploads/Arduino-Magnetic-Card-Lock.jpg"><img src="http://elec.tkjweb.dk/blog/wp-content/uploads/Arduino-Magnetic-Card-Lock-300x225.jpg" alt="" title="Magnetic Card Lock project" width="300" height="225" class="size-medium wp-image-378" /></a><p class="wp-caption-text">Magnetic Card Lock project</p></div><br />
<div id="attachment_377" class="wp-caption aligncenter" style="width: 309px"><a href="http://elec.tkjweb.dk/blog/wp-content/uploads/CardReaderConnections.png"><img src="http://elec.tkjweb.dk/blog/wp-content/uploads/CardReaderConnections.png" alt="" title="Magnetic Card Reader Connections" width="299" height="232" class="size-full wp-image-377" /></a><p class="wp-caption-text">Magnetic Card Reader Connections</p></div></p>
<p>The card reader, which you can see in the first picture, has 7 pins. The picture below shows theese pins functionality!</p>
<p>I&#8217;ve made a video about the project which explains it all!<br />
<!-- Smart Youtube --><span class="youtube"><object width="480" height="360"><param name="movie" value="http://www.youtube.com/v/S1i1DAMpy5E&amp;rel=1&amp;color1=d6d6d6&amp;color2=f0f0f0&amp;border=&amp;fs=1&amp;hl=en&amp;autoplay=&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0&amp;ap=%2526fmt%3D22" /><param name="allowFullScreen" value="true" /><embed wmode="transparent" src="http://www.youtube.com/v/S1i1DAMpy5E&amp;rel=1&amp;color1=d6d6d6&amp;color2=f0f0f0&amp;border=&amp;fs=1&amp;hl=en&amp;autoplay=&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0&amp;ap=%2526fmt%3D22" type="application/x-shockwave-flash" allowfullscreen="true" width="480" height="360" ></embed><param name="wmode" value="transparent" /></object></span></p>
<p>If you want to try it yourself, you can grab the code underneath and change the checkCode character array to match the string on your card!</p>
<pre>
#include &lt;string.h&gt;

#include &lt;Servo.h&gt;
Servo servo1;

 /* Magnetic Card lock with the Arduino and servo's
 * by Thomas Jespersen http://elec.tkjweb.dk
 *
 * Reads a magnetic stripe and opens lock (turns servo) if card is the same as programmed
 *
 */

// Connections: DATA = Pin 2, CLOCK = Pin 3, CARD IN = Pin 5
// See PDF "Magnetic Stripe Card Reader! << HACKMIAMI.pdf" for more connection information

<a href="http://elec.tkjweb.dk/blog/2010/02/magnetic-card-lock-with-the-arduino/#cut-1">Read more...</a>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://elec.tkjweb.dk/blog/2010/02/magnetic-card-lock-with-the-arduino/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>STM32 &#8211; Overclocking</title>
		<link>http://elec.tkjweb.dk/blog/2010/02/stm32-overclocking/</link>
		<comments>http://elec.tkjweb.dk/blog/2010/02/stm32-overclocking/#comments</comments>
		<pubDate>Sun, 14 Feb 2010 11:45:03 +0000</pubDate>
		<dc:creator>Thomas Jespersen</dc:creator>
				<category><![CDATA[ARM Projects]]></category>
		<category><![CDATA[overclocking]]></category>
		<category><![CDATA[RCC]]></category>
		<category><![CDATA[STM32]]></category>

		<guid isPermaLink="false">http://elec.tkjweb.dk/blog/?p=352</guid>
		<description><![CDATA[Have you ever wondered if it was possible to overclock the STM32? It is, with a simple change in code line!
We only have to change the PLL setting, which is able to go up to 16 &#8211; so that means that we can overclock the STM32 up to 8MHz x 16 = 128 MHz
Here is [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever wondered if it was possible to overclock the STM32? It is, with a simple change in code line!<br />
We only have to change the PLL setting, which is able to go up to 16 &#8211; so that means that we can overclock the STM32 up to 8MHz x 16 = 128 MHz<br />
Here is the RCC Initialization code for 128MHz &#8211; remember, you also have to comment the &#8220;SYSCLK_FREQ_72MHz&#8221;, uncomment the &#8220;SYSCLK_FREQ_HSE&#8221; and set it to 128MHz in the system_stm32f10x.c</p>
<pre>
/*******************************************************************************
* Function Name  : RCC_Configuration
* Description    : Configures the different system clocks.
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
void RCC_Configuration(void)
   {
   /* RCC system reset(for debug purpose) */
   RCC_DeInit();

   /* Enable HSE */
   RCC_HSEConfig(RCC_HSE_ON);

   /* Wait till HSE is ready */
   HSEStartUpStatus = RCC_WaitForHSEStartUp();

   if(HSEStartUpStatus == SUCCESS)
      {
      /* Enable Prefetch Buffer */
      FLASH_PrefetchBufferCmd(FLASH_PrefetchBuffer_Enable);

      /* Flash 2 wait state */
      FLASH_SetLatency(FLASH_Latency_2);

      /* HCLK = SYSCLK */
      RCC_HCLKConfig(RCC_SYSCLK_Div1); 

      /* PCLK2 = HCLK */
      RCC_PCLK2Config(RCC_HCLK_Div1); 

      /* PCLK1 = HCLK/2 */
      RCC_PCLK1Config(RCC_HCLK_Div2);

      /* PLLCLK = 8MHz * 9 = 72 MHz */
      //RCC_PLLConfig(RCC_PLLSource_HSE_Div1, RCC_PLLMul_9);
      /* PLLCLK = 8MHz * 16 = 128 MHz */
      RCC_PLLConfig(RCC_PLLSource_HSE_Div1, RCC_PLLMul_16);
      // The frequency has also been changed in system_stm32f10x

      /* Enable PLL */
      RCC_PLLCmd(ENABLE);

      /* Wait till PLL is ready */
      while(RCC_GetFlagStatus(RCC_FLAG_PLLRDY) == RESET)
         {;}

      /* Select PLL as system clock source */
      RCC_SYSCLKConfig(RCC_SYSCLKSource_PLLCLK);

      /* Wait till PLL is used as system clock source */
      while(RCC_GetSYSCLKSource() != 0x08)
         {;}
      }

   /* Enable peripheral clocks --------------------------------------------------*/
   /* Enable GPIOA, GPIOB, GPIOC, GPIOD, GPIOE, GPIOF, GPIOG and AFIO clocks */
  RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA | RCC_APB2Periph_GPIOB |RCC_APB2Periph_GPIOC
         | RCC_APB2Periph_GPIOD | RCC_APB2Periph_GPIOE | RCC_APB2Periph_GPIOF | RCC_APB2Periph_GPIOG
         | RCC_APB2Periph_AFIO, ENABLE);
   }
</pre>
]]></content:encoded>
			<wfw:commentRss>http://elec.tkjweb.dk/blog/2010/02/stm32-overclocking/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>STM32 &#8211; Internal 8MHz Clock Setup Routine</title>
		<link>http://elec.tkjweb.dk/blog/2010/02/stm32-internal-8mhz-clock-setup-routine/</link>
		<comments>http://elec.tkjweb.dk/blog/2010/02/stm32-internal-8mhz-clock-setup-routine/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 10:42:06 +0000</pubDate>
		<dc:creator>Thomas Jespersen</dc:creator>
				<category><![CDATA[ARM Projects]]></category>
		<category><![CDATA[STM32]]></category>

		<guid isPermaLink="false">http://elec.tkjweb.dk/blog/?p=349</guid>
		<description><![CDATA[Here is the setup code to use the internal 8MHz clock &#8211; but with the internal clock, we are only able to get a max frequency of 36MHz.

void clock_init(){
  /*Configure all clocks to max for best performance.
   * If there are EMI, power, or noise problems, try slowing the clocks*/   [...]]]></description>
			<content:encoded><![CDATA[<p>Here is the setup code to use the internal 8MHz clock &#8211; but with the internal clock, we are only able to get a max frequency of 36MHz.</p>
<pre>
void clock_init(){
  /*Configure all clocks to max for best performance.
   * If there are EMI, power, or noise problems, try slowing the clocks*/                     

  /* First set the flash latency to work with our clock*/
  /*000 Zero wait state, if 0  MHz < SYSCLK <= 24 MHz
    001 One wait state, if  24 MHz < SYSCLK <= 48 MHz
    010 Two wait states, if 48 MHz < SYSCLK <= 72 MHz */
  FLASH_SetLatency(FLASH_Latency_1);                                                         

  /* Start with HSI clock (internal 8mhz), divide by 2 and multiply by 9 to
   * get maximum allowed frequency: 36Mhz
   * Enable PLL, wait till it's stable, then select it as system clock*/
  RCC_PLLConfig(RCC_PLLSource_HSI_Div2, RCC_PLLMul_9);
  RCC_PLLCmd(ENABLE);
  while(RCC_GetFlagStatus(RCC_FLAG_PLLRDY) == RESET) {}
  RCC_SYSCLKConfig(RCC_SYSCLKSource_PLLCLK);                                                 

  /* Set HCLK, PCLK1, and PCLK2 to SCLK (these are default */
  RCC_HCLKConfig(RCC_SYSCLK_Div1);
  RCC_PCLK1Config(RCC_HCLK_Div1);
  RCC_PCLK2Config(RCC_HCLK_Div1);                                                             

  /* Set ADC clk to 9MHz (14MHz max, 18MHz default)*/
  RCC_ADCCLKConfig(RCC_PCLK2_Div4);                                                           

  /*To save power, use below functions to stop the clock to ceratin
   * peripherals
   * RCC_AHBPeriphClockCmd
   */
  RCC_AHBPeriphClockCmd(RCC_AHBPeriph_DMA, ENABLE);
  RCC_APB2PeriphClockCmd(RCC_APB2Periph_ALL, ENABLE);
  RCC_APB1PeriphClockCmd(RCC_APB1Periph_ALL, ENABLE);                                         

}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://elec.tkjweb.dk/blog/2010/02/stm32-internal-8mhz-clock-setup-routine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>320&#215;240 Color Display &#8211; ILI9919</title>
		<link>http://elec.tkjweb.dk/blog/2010/01/320x240-color-display-ili9919/</link>
		<comments>http://elec.tkjweb.dk/blog/2010/01/320x240-color-display-ili9919/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 19:45:40 +0000</pubDate>
		<dc:creator>Thomas Jespersen</dc:creator>
				<category><![CDATA[ARM Projects]]></category>
		<category><![CDATA[Display]]></category>
		<category><![CDATA[ILI9320]]></category>
		<category><![CDATA[ILI9919]]></category>
		<category><![CDATA[STM32]]></category>

		<guid isPermaLink="false">http://elec.tkjweb.dk/blog/?p=246</guid>
		<description><![CDATA[I finally got the display I bought on eBay to work. It took me a lot of hours as the man I&#8217;d bought the display from told me that the display controller was an ILI9320, so I started making code for the display like it was using an ILI9320 controller.
But as it didn&#8217;t work, I [...]]]></description>
			<content:encoded><![CDATA[<p>I finally got the display I bought on eBay to work. It took me a lot of hours as the man I&#8217;d bought the display from told me that the display controller was an ILI9320, so I started making code for the display like it was using an ILI9320 controller.</p>
<p>But as it didn&#8217;t work, I started debugging using my Raisonance RLink, and just when I looked at the Device variable &#8211; a variable which holds the controller number, and is loaded at the initialization process of the display, it showed me that it was an ILI9919 controller.</p>
<p>So I found the ILI9919 datasheet and started recoding using the new Command calls found in the datasheet&#8230; Finally it worked and showed some life <img src='http://elec.tkjweb.dk/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>So right now I have a working ILI9919 code with SetPixel, Text, Circle, Rectangle, Fill and some working Touch Screen commands for the onboard ADS7843 touch screen controller.</p>
<p>Please take a look at this image to see the display in action:<br />
<div id="attachment_293" class="wp-caption aligncenter" style="width: 310px"><a href="http://elec.tkjweb.dk/blog/wp-content/uploads/ILI9919_Display1.jpg"><img src="http://elec.tkjweb.dk/blog/wp-content/uploads/ILI9919_Display1-300x225.jpg" alt="ILI9919 seen from top" title="ILI9919 From top" width="300" height="225" class="size-medium wp-image-293" /></a><p class="wp-caption-text">ILI9919 from top</p></div><br />
<div id="attachment_299" class="wp-caption aligncenter" style="width: 310px"><a href="http://elec.tkjweb.dk/blog/wp-content/uploads/ILI9919_Display7.jpg"><img src="http://elec.tkjweb.dk/blog/wp-content/uploads/ILI9919_Display7-300x225.jpg" alt="" title="ILI9919 Pringles example" width="300" height="225" class="size-medium wp-image-299" /></a><p class="wp-caption-text">ILI9919 Pringles example</p></div></p>
<p>The current GUI commands I&#8217;ve made is:<br />
void Lcd_Text(u16 x, u16 y, u8 *str, u16 len,u16 Color, u16 bkColor);<br />
void Lcd_Line(u16 x0, u16 y0, u16 x1, u16 y1,u16 color);<br />
void Lcd_Circle(u16 cx,u16 cy,u16 r,u16 color,u8 fill);<br />
void Lcd_Rectangle(u16 x0, u16 y0, u16 x1, u16 y1,u16 color,u8 fill); // Slower than Lcd_ColorBox<br />
void Lcd_Square(u16 x0, u16 y0, u16 width, u16 color,u8 fill);<br />
void Lcd_ClearCharBox(u16 x,u16 y,u16 color);<br />
void Get320240PictureCode(u8* pBuffer,u32 BufferCounter,u32 BaseAddr);</p>
<p>void Lcd_FastRectangle(u16 x0, u16 y0, u16 x1, u16 y1,u16 color,u8 fill); // Faster than Lcd_Rectangle<br />
void Lcd_FastSquare(u16 x0, u16 y0, u16 width, u16 color,u8 fill); // Faster than Lcd_Rectangle<br />
void Lcd_FastClearCharBox(u16 x,u16 y,u16 color);</p>
<p>void DispPic320_240(const unsigned char *str);<br />
void DispPic(u16 x0, u16 y0, const unsigned char *str);</p>
<p>DispPic320_240 and DispPic uses a byte array to show a image &#8211; the byte array is converted from a 24-bit .BMP (bitmap) file using a program I&#8217;ve made in Visual Basic .NET!</p>
]]></content:encoded>
			<wfw:commentRss>http://elec.tkjweb.dk/blog/2010/01/320x240-color-display-ili9919/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Messy electronics table</title>
		<link>http://elec.tkjweb.dk/blog/2010/01/messy-electronics-table/</link>
		<comments>http://elec.tkjweb.dk/blog/2010/01/messy-electronics-table/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 19:43:13 +0000</pubDate>
		<dc:creator>Thomas Jespersen</dc:creator>
				<category><![CDATA[TKJ Electronics]]></category>
		<category><![CDATA[components]]></category>
		<category><![CDATA[computer]]></category>
		<category><![CDATA[electronics]]></category>
		<category><![CDATA[Mess]]></category>

		<guid isPermaLink="false">http://elec.tkjweb.dk/blog/?p=320</guid>
		<description><![CDATA[This is the table where I&#8217;m working with electronics when it&#8217;s messy!
But still I keep a little bit order, as the PIC is in the left, the STM32 in the middle, and the Arduino (+ ultrasonic) at the right.
]]></description>
			<content:encoded><![CDATA[<div id="attachment_323" class="wp-caption aligncenter" style="width: 310px"><a href="http://elec.tkjweb.dk/blog/wp-content/uploads/RodetBord3.jpg"><img src="http://elec.tkjweb.dk/blog/wp-content/uploads/RodetBord3-300x168.jpg" alt="" title="Messy Table" width="300" height="168" class="size-medium wp-image-323" /></a><p class="wp-caption-text">Messy Table</p></div>
<p>This is the table where I&#8217;m working with electronics when it&#8217;s messy!<br />
But still I keep a little bit order, as the PIC is in the left, the STM32 in the middle, and the Arduino (+ ultrasonic) at the right.</p>
]]></content:encoded>
			<wfw:commentRss>http://elec.tkjweb.dk/blog/2010/01/messy-electronics-table/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ultrasonic Range Sensor</title>
		<link>http://elec.tkjweb.dk/blog/2010/01/ultrasonic-range-sensor/</link>
		<comments>http://elec.tkjweb.dk/blog/2010/01/ultrasonic-range-sensor/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 19:36:34 +0000</pubDate>
		<dc:creator>Thomas Jespersen</dc:creator>
				<category><![CDATA[Arduino Projects]]></category>
		<category><![CDATA[Sensors]]></category>
		<category><![CDATA[Ultrasonic]]></category>

		<guid isPermaLink="false">http://elec.tkjweb.dk/blog/?p=263</guid>
		<description><![CDATA[Today I recieved a Ultrasonic Range Sensor bought on eBay.
It&#8217;s much like the Parallax Ping))), except that it has got a Trig and a Echo pin, instead of the Ping)))&#8217;s multipin (Trig and Echo on the same pin)
I quickly made some code in the Arduino IDE and got it running quick&#8230;
Just a sidenode from the [...]]]></description>
			<content:encoded><![CDATA[<p>Today I recieved a Ultrasonic Range Sensor bought on eBay.</p>
<p>It&#8217;s much like the <a href="http://www.parallax.com/Store/Sensors/ObjectDetection/tabid/176/ProductID/92/List/1/Default.aspx?SortField=ProductName,ProductName" target="_blank">Parallax Ping)))</a>, except that it has got a Trig and a Echo pin, instead of the Ping)))&#8217;s multipin (Trig and Echo on the same pin)</p>
<p>I quickly made some code in the Arduino IDE and got it running quick&#8230;</p>
<p>Just a sidenode from the physics class; as the sound is travelling thru air with a speed of 340 m/s, this can be recalculated to 0.034 cm/microsecond, which is the same as 29.411 microsecond/cm</p>
<div id="attachment_312" class="wp-caption aligncenter" style="width: 310px"><a href="http://elec.tkjweb.dk/blog/wp-content/uploads/Ultrasonic3.jpg"><img src="http://elec.tkjweb.dk/blog/wp-content/uploads/Ultrasonic3-300x225.jpg" alt="" title="Arduino with Ultrasonic Sensor" width="300" height="225" class="size-medium wp-image-312" /></a><p class="wp-caption-text">Arduino with Ultrasonic Sensor</p></div>
<p>For those who may be interested the code is here:</p>
<pre>/* Ultrasonic Sensor</p>
<p>This sketch reads a ultrasonic rangefinder and returns the<br />
distance to the closest object in range. To do this, it sends a pulse<br />
to the sensor to initiate a reading, then listens for a pulse<br />
to return.  The length of the returning pulse is proportional to<br />
the distance of the object from the sensor.</p>
<p>The circuit:<br />
* +V connection of the Ultrasonic Sensor attached to +5V<br />
* GND connection of the Ultrasonic Sensor attached to ground<br />
* Trig connection of the Ultrasonic Sensor attached to digital pin 2<br />
* Echo connection of the Ultrasonic Sensor attached to digital pin 3</p>
<p>created 25. Januar 2010<br />
by Thomas Jespersen</p>
<p>*/<br />
<a href="http://elec.tkjweb.dk/blog/2010/01/ultrasonic-range-sensor/#cut-1">Read more...</a></p>
]]></content:encoded>
			<wfw:commentRss>http://elec.tkjweb.dk/blog/2010/01/ultrasonic-range-sensor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>STM32 Nokia LCD</title>
		<link>http://elec.tkjweb.dk/blog/2010/01/stm32-nokia-lcd/</link>
		<comments>http://elec.tkjweb.dk/blog/2010/01/stm32-nokia-lcd/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 15:19:04 +0000</pubDate>
		<dc:creator>Thomas Jespersen</dc:creator>
				<category><![CDATA[ARM Projects]]></category>
		<category><![CDATA[LCD]]></category>
		<category><![CDATA[Nokia LCD]]></category>
		<category><![CDATA[STM32]]></category>

		<guid isPermaLink="false">http://elec.tkjweb.dk/blog/?p=241</guid>
		<description><![CDATA[Finally I found how to use the Nokia LCD I&#8217;ve bought from Sparkfun a year ago.
Originally I bought the display for the Arduino, but as the LCD is 3.3V I tried to make a voltage convertion circuit, but it didn&#8217;t work 
But now, I&#8217;ve got the STM32 which is running 3.3V &#8211; so I could [...]]]></description>
			<content:encoded><![CDATA[<p>Finally I found how to use the Nokia LCD I&#8217;ve bought from Sparkfun a year ago.<br />
Originally I bought the display for the Arduino, but as the LCD is 3.3V I tried to make a voltage convertion circuit, but it didn&#8217;t work <img src='http://elec.tkjweb.dk/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /><br />
But now, I&#8217;ve got the STM32 which is running 3.3V &#8211; so I could just connect it directly&#8230; And then it worked!</p>
<div id="attachment_316" class="wp-caption aligncenter" style="width: 310px"><a href="http://elec.tkjweb.dk/blog/wp-content/uploads/Nokia_TKJ-Electronics3.jpg"><img src="http://elec.tkjweb.dk/blog/wp-content/uploads/Nokia_TKJ-Electronics3-300x225.jpg" alt="" title="Nokia LCD - Hello World" width="300" height="225" class="size-medium wp-image-316" /></a><p class="wp-caption-text">Nokia LCD - Hello World</p></div><br />
<div id="attachment_315" class="wp-caption aligncenter" style="width: 310px"><a href="http://elec.tkjweb.dk/blog/wp-content/uploads/Nokia_TKJ-Electronics2.jpg"><img src="http://elec.tkjweb.dk/blog/wp-content/uploads/Nokia_TKJ-Electronics2-300x225.jpg" alt="" title="Nokia LCD - TKJ-Electronics Logo" width="300" height="225" class="size-medium wp-image-315" /></a><p class="wp-caption-text">Nokia LCD - TKJ-Electronics Logo</p></div>
]]></content:encoded>
			<wfw:commentRss>http://elec.tkjweb.dk/blog/2010/01/stm32-nokia-lcd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>STM32 DFU Programming</title>
		<link>http://elec.tkjweb.dk/blog/2010/01/stm32-dfu-programming/</link>
		<comments>http://elec.tkjweb.dk/blog/2010/01/stm32-dfu-programming/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 20:46:22 +0000</pubDate>
		<dc:creator>Thomas Jespersen</dc:creator>
				<category><![CDATA[ARM Projects]]></category>
		<category><![CDATA[DFU]]></category>
		<category><![CDATA[STM32]]></category>

		<guid isPermaLink="false">http://elec.tkjweb.dk/blog/?p=267</guid>
		<description><![CDATA[The time is currently 21:42 and I&#8217;ve been sitting in front of my computer in 2 hours to get the DFU programming to work.
Now it is working, and I&#8217;m able to make one of my excisting projects into a DFU loadable project (compiled it&#8217;s a .dfu filed)
I&#8217;ve also changed the DFU bootloader code to use [...]]]></description>
			<content:encoded><![CDATA[<p>The time is currently 21:42 and I&#8217;ve been sitting in front of my computer in 2 hours to get the DFU programming to work.</p>
<p>Now it is working, and I&#8217;m able to make one of my excisting projects into a DFU loadable project (compiled it&#8217;s a .dfu filed)</p>
<p>I&#8217;ve also changed the DFU bootloader code to use GPIOA_0 as DFU Enable pin, and GPIOA_1 as USB Disconnect &#8211; this makes me able to use the GPIOB and GPIOC for my display without any interferrance!</p>
<p>Here is how you make a Ride7 project DFU loadable:</p>
<div id="_mcePaste">The Default Startup script (in settings) has been set to No, as we have included a special startup script in the project (startup_stm32f10x_hd.s &#8211; found in CMSIS\Core\CM3\startup\gcc)</div>
<div id="_mcePaste">Also change the Linker Script in project settings to match the processor group you are using (Connectivity, High Density&#8230; and so on &#8211; fx stm32f10x_hd_flash_offset.ld)</div>
<div id="_mcePaste">Also be aware of the change in the NVIC_Configuration &#8211; here we tell the processor that the Flash has to start at adress 0&#215;3000</div>
<div></div>
<div id="_mcePaste">When you have compiled the code to a HEX file, run &#8220;DFU File Manager&#8221; to create a .dfu file.</div>
<div id="_mcePaste">Target ID: 00 is Internal Flash</div>
<div id="_mcePaste">Target ID: 01 is SPI Flash</div>
<div id="_mcePaste">Target ID: 02 is NOR Flash</div>
<div></div>
<div>Now you can use DfuSe to load the .dfu file into the internal flash of your STM32!</div>
]]></content:encoded>
			<wfw:commentRss>http://elec.tkjweb.dk/blog/2010/01/stm32-dfu-programming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
