<?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://blog.tkjelectronics.dk/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.tkjelectronics.dk</link>
	<description>Development with ease</description>
	<lastBuildDate>Mon, 29 Apr 2013 20:33:07 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Kickstarter successfully funded</title>
		<link>http://blog.tkjelectronics.dk/2013/04/kickstarter-successfully-funded/</link>
		<comments>http://blog.tkjelectronics.dk/2013/04/kickstarter-successfully-funded/#comments</comments>
		<pubDate>Fri, 19 Apr 2013 14:16:44 +0000</pubDate>
		<dc:creator>Lauszus</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Balanduino]]></category>
		<category><![CDATA[Bluetooth]]></category>
		<category><![CDATA[TKJ Electronics]]></category>
		<category><![CDATA[USB]]></category>

		<guid isPermaLink="false">http://blog.tkjelectronics.dk/?p=4042</guid>
		<description><![CDATA[We are very pleased to announce that our Kickstarter for the Balanduino balancing robot has successfully been funded by $13,494 which we are very happy about. We have just received stickers from our printing company and have decided to give a little bonus in form of a signed Balanduino post card. We will be shipping [...]]]></description>
				<content:encoded><![CDATA[<p>We are very pleased to announce that our <a href="http://www.kickstarter.com/projects/tkjelectronics/balanduino-balancing-robot-kit" target="_blank">Kickstarter</a> for the Balanduino balancing robot has successfully been funded by $13,494 which we are very happy about.</p>
<p>We have just received stickers from our printing company and have decided to give a little bonus in form of a signed Balanduino post card. We will be shipping this post card and stickers to all of our backers who have pledged $10 or more, within next week.</p>
<p>All the source code including the firmware, schematic, PCB layout and mechanical drawings for the frame is available at Github: <a href="https://github.com/TKJElectronics/Balanduino" target="_blank">https://github.com/TKJElectronics/Balanduino</a>.</p>
<p>If you are not a backer, but are still interested in the project, you should checkout the Kicstarter: <a href="http://www.kickstarter.com/projects/tkjelectronics/balanduino-balancing-robot-kit" target="_blank">http://www.kickstarter.com/projects/tkjelectronics/balanduino-balancing-robot-kit</a> and our previous blog post: <a href="http://blog.tkjelectronics.dk/2013/03/balanduino-balancing-robot-kit/" target="_blank">http://blog.tkjelectronics.dk/2013/03/balanduino-balancing-robot-kit/</a>.</p>
<p>That&#8217;s all for now. Please let us know in the comments below if you got any questions or comments regarding the project. </p>
<div id="attachment_3992" class="wp-caption aligncenter" style="width: 410px"><a href="http://www.kickstarter.com/projects/tkjelectronics/balanduino-balancing-robot-kit"><img src="http://blog.tkjelectronics.dk/wp-content/uploads/Balanduino-400x300.png" alt="The Balanduino" width="400" height="300" class="size-medium wp-image-3992" /></a><p class="wp-caption-text">The Balanduino</p></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.tkjelectronics.dk/2013/04/kickstarter-successfully-funded/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Balanduino Kickstarter almost finished</title>
		<link>http://blog.tkjelectronics.dk/2013/04/balanduino-kickstarter-almost-finished/</link>
		<comments>http://blog.tkjelectronics.dk/2013/04/balanduino-kickstarter-almost-finished/#comments</comments>
		<pubDate>Sat, 13 Apr 2013 22:41:00 +0000</pubDate>
		<dc:creator>Lauszus</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Balanduino]]></category>
		<category><![CDATA[Bluetooth]]></category>
		<category><![CDATA[TKJ Electronics]]></category>
		<category><![CDATA[USB]]></category>

		<guid isPermaLink="false">http://blog.tkjelectronics.dk/?p=4026</guid>
		<description><![CDATA[Hello to all of our followers. This is just a short reminder that the Kickstarter of our Balancing robot, the Balanduino, is nearly finished. We have already reached our goal of $10.000, but of course it would be great to get even more backers and pledges. In the meanwhile we have recorded a new video [...]]]></description>
				<content:encoded><![CDATA[<p>Hello to all of our followers. This is just a short reminder that the Kickstarter of our Balancing robot, the <a href="http://www.balanduino.net" target="_blank">Balanduino</a>, is nearly finished.<br />
We have already reached our goal of $10.000, but of course it would be great to get even more backers and pledges.</p>
<p>In the meanwhile we have recorded a new video of the robot with a GoPro mounted on the top.</p>
<p><a href="http://www.youtube.com/watch?v=CvFcnb_9anM">http://www.youtube.com/watch?v=CvFcnb_9anM</a></p>
<p><a href="http://www.youtube.com/watch?v=CvFcnb_9anM"><img src="http://img.youtube.com/vi/CvFcnb_9anM/default.jpg" width="130" height="97" border=0></a></p>
<p>For more information check out the prevouis blog post: <a href="http://blog.tkjelectronics.dk/2013/03/balanduino-balancing-robot-kit/" target="_blank">http://blog.tkjelectronics.dk/2013/03/balanduino-balancing-robot-kit/</a> and the <a href="http://www.kickstarter.com/projects/tkjelectronics/balanduino-balancing-robot-kit" target="_blank">Kickstarter page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tkjelectronics.dk/2013/04/balanduino-kickstarter-almost-finished/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Balanduino &#8211; Balancing Robot Kit (Kickstarter)</title>
		<link>http://blog.tkjelectronics.dk/2013/03/balanduino-balancing-robot-kit/</link>
		<comments>http://blog.tkjelectronics.dk/2013/03/balanduino-balancing-robot-kit/#comments</comments>
		<pubDate>Mon, 18 Mar 2013 22:14:51 +0000</pubDate>
		<dc:creator>Thomas Jespersen</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Balanduino]]></category>
		<category><![CDATA[Bluetooth]]></category>

		<guid isPermaLink="false">http://blog.tkjelectronics.dk/?p=3990</guid>
		<description><![CDATA[Hello all fellow blog readers. Most of you might be aware of the Balancing robot project we have been working on for quite a while, if not please have a look here: The Balancing Robot. We have now been working on this project in over a year, fine tuning the balance and stability of the [...]]]></description>
				<content:encoded><![CDATA[<p>Hello all fellow blog readers.<br />
Most of you might be aware of the Balancing robot project we have been working on for quite a while, if not please have a look here: <a href="http://blog.tkjelectronics.dk/2012/03/the-balancing-robot/" target="_blank">The Balancing Robot</a>.<br />
<br />
We have now been working on this project in over a year, fine tuning the balance and stability of the robot and adding even other features and control options.<br />
<br />
And NOW we are ready to announce this Balancing robot to be sold as a kit, named <strong>Balanduino</strong>.<br />
<div id="attachment_3992" class="wp-caption aligncenter" style="width: 410px"><a href="http://www.kickstarter.com/projects/tkjelectronics/balanduino-balancing-robot-kit"><img src="http://blog.tkjelectronics.dk/wp-content/uploads/Balanduino-400x300.png" alt="The Balanduino" width="400" height="300" class="size-medium wp-image-3992" /></a><p class="wp-caption-text">The Balanduino</p></div><br />
The Balanduino kit consists of an Arduino compatible main board with the necessary sensors to keep the robot balanced automatically.<br />
<br />
Furthermore the main board contains a USB Host controller, the MAX3421E, which library for the Arduino we have been expanding a lot recently, adding support for many of the most popular game controllers.<br />
This USB Host controller together with a USB Bluetooth dongle enabled you to remotely control the Balanduino with your Android phone, PS3, Wii or Xbox controller and even your Windows, Linux or Mac PC.<br />
<span id="more-3990"></span><br />
We have decided to start a Kickstarter to help us fund the manufactury of the initial production run of the Balanduino kit, to get it to the market as quick as possible.<br />
<br />
<center><strong><a href="http://www.kickstarter.com/projects/tkjelectronics/balanduino-balancing-robot-kit" title="Balanduino Kickstarter">Click here to see the Balanduino Kickstarter</a></strong></center><br />
<div id="attachment_3993" class="wp-caption aligncenter" style="width: 410px"><a href="http://www.kickstarter.com/projects/tkjelectronics/balanduino-balancing-robot-kit"><img src="http://blog.tkjelectronics.dk/wp-content/uploads/Balanduino_Kickstarter-400x336.png" alt="Balanduino Kickstarter" width="400" height="336" class="size-medium wp-image-3993" /></a><p class="wp-caption-text">Balanduino Kickstarter</p></div><br />
On the Kickstarter page you can read some much more detailed information about the Balanduino robot, the hardware and software parts.<br />
<br />
We have decided to offer the Balanduino kit in some different variants to suit your taste and budget. So whether you would like to get a complete kit with everything you need to get started building your own copy of the Balanduino robot, or if you would like to build the mechanical structure yourself, you can get the exact version from the Kickstarter.<br />
<br />
Our Kickstarter price for a complete kit with the controller board, Bluetooth dongle, two geared motors with encoders, wheels, hubs, a 4000mAh 3S LiPo battery and charger and the mechanical structure is only <u><strong>$299</strong></u>.<br />
<br />
Below you will find a video demonstration of the Balanduino and all of it&#8217;s features, including a technical overview and a demonstration of the different controller options.</p>
<p><iframe width="500" height="281" src="http://www.youtube.com/embed/_kQniPbg9zc?feature=oembed" frameborder="0" allowfullscreen></iframe></p>
<p>We hope you will fund our project to get it going and especially get yourself a small balancing robot to play with, expand and explore a completely new world of Hobby Robotics.</p>
<p>High resolution image can be found here: <a href="http://blog.tkjelectronics.dk/wp-content/uploads/Balanduino.png">Balanduino.png</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tkjelectronics.dk/2013/03/balanduino-balancing-robot-kit/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>LPC4350 board &#8211; which parts would you like to see reviewed</title>
		<link>http://blog.tkjelectronics.dk/2013/03/lpc4350-board-which-parts-would-you-like-to-see-reviewed/</link>
		<comments>http://blog.tkjelectronics.dk/2013/03/lpc4350-board-which-parts-would-you-like-to-see-reviewed/#comments</comments>
		<pubDate>Sun, 03 Mar 2013 21:04:22 +0000</pubDate>
		<dc:creator>Thomas Jespersen</dc:creator>
				<category><![CDATA[ARM]]></category>
		<category><![CDATA[Development boards]]></category>

		<guid isPermaLink="false">http://blog.tkjelectronics.dk/?p=3967</guid>
		<description><![CDATA[We have just recently bought a one of the latest evaluation kits from Hitex, featuring the new dual-core LPC4350 from NXP &#8211; the LPC4350 Evaluation Board. The processor consists of two cores, an ARM Cortex-M0, as the low-level processor and the high-end ARM Cortex-M4. Even though the two cores are of a different kind and [...]]]></description>
				<content:encoded><![CDATA[<p>We have just recently bought a one of the <a href="http://www.hitex.com/index.php?id=3212" target="_blank">latest evaluation kits from Hitex</a>, featuring the new dual-core LPC4350 from NXP &#8211; the <a href="http://www.nxp.com/demoboard/OM13031.html" target="_blank">LPC4350 Evaluation Board</a>.<br />
<div id="attachment_3968" class="wp-caption aligncenter" style="width: 410px"><a href="http://blog.tkjelectronics.dk/wp-content/uploads/DSC_3351.jpg"><img src="http://blog.tkjelectronics.dk/wp-content/uploads/DSC_3351-400x296.jpg" alt="LPC4350 Getting Started Kit" width="400" height="296" class="size-medium wp-image-3968" /></a><p class="wp-caption-text">LPC4350 Getting Started Kit</p></div><br />
The processor consists of two cores, an ARM Cortex-M0, as the low-level processor and the high-end ARM Cortex-M4. Even though the two cores are of a different kind and with independently different features, they both run at a frequency of up to a stunning 204MHz.<br />
<span id="more-3967"></span><br />
<div id="attachment_3972" class="wp-caption aligncenter" style="width: 410px"><a href="http://blog.tkjelectronics.dk/wp-content/uploads/NXP-LPC4350-block-diagram.jpg"><img src="http://blog.tkjelectronics.dk/wp-content/uploads/NXP-LPC4350-block-diagram-400x324.jpg" alt="NXP LPC4350 Block diagram" width="400" height="324" class="size-medium wp-image-3972" /></a><p class="wp-caption-text">NXP LPC4350 Block diagram</p></div></p>
<p>The LPC4350 has a number of great periphirals as you can see in the block diagram above. First of all the processor comes with 1MB of Flash and 264KB of RAM.<br />
If either the Flash or RAM is not enough there is a great way to expand this either with Parallel Flash, NAND Flash, SPI Flash and for the RAM with SRAM or even the inexpensive SDRAM.<br />
Furthermore the processor comes with a different number of external connection periphirals such as USB Client, USB Host, Ethernet, UART, CAN, I2C and SPI.</p>
<p>When you think that should be it you will notice the LCD periphiral.<br />
We are very eager to test this periphiral though we have <a href="https://twitter.com/TKJElectronics/status/286958706875301888/photo/1" target="_blank">already tested NXP&#8217;s LCD periphiral</a> before on the <a href="http://coineltech.com/index.php?main_page=product_info&#038;products_id=38" target="_blank">CoiNel Tech LPC4088 MiO</a>, though we are missing a review of this.<br />
</p>
<p>With this new LPC4350 evaluation board from Hitex we are able to test all of these features and even more as it comes full-fitted with anything from extra RAM to Audio Input and Output amplifiers.<br />
<div id="attachment_3980" class="wp-caption aligncenter" style="width: 410px"><a href="http://blog.tkjelectronics.dk/wp-content/uploads/DSC_3353.jpg"><img src="http://blog.tkjelectronics.dk/wp-content/uploads/DSC_3353-400x309.jpg" alt="LPC4350 Evaluation Board" width="400" height="309" class="size-medium wp-image-3980" /></a><p class="wp-caption-text">LPC4350 Evaluation Board</p></div><br />
Here are some of the board features.</p>
<ul>
<li>CPU: LPC4350 (ARM Cortex-M4 with Cortex-M0)</li>
<li>Power-over-Ethernet</li>
<li>Ready for energy consumption analysis with PowerScale of the complete board, the CPU-core and other peripherals</li>
<li>SDRAM, SRAM, FLASH, qSPI flash</li>
<li>Temperature sensor, SD card-connector</li>
<li>CAN, UART, USART, Ethernet, USB (Host, Device, OTG)</li>
<li>Debug with standard ARM JTAG and JTAG + Trace connector</li>
<li>Ready for Jennic ZigBee module</li>
<li>Small onboard display and external display / LCD/TFT interface</li>
<li>HDMI interface</li>
<li>Media connector to connect well known MP3-Player</li>
<li>Push buttons, joystick and LEDs</li>
<li>Wrap field with power and GND</li>
<li>Audio IN and OUT, microphone IN, headphones OUT and a D-Class amplifier</li>
<li>Motor Contrli interface for NXP inverter board</li>
<li>VADC with OPAmp circuit</li>
</ul>
<p>So the question to our fellow readers is now which of these periphirals you would like us to dig into and investigate further by making a demonstration project.</p>
<p>A final unfortunate note is that all of the evaluation board materials, such as the demonstration projects, is made for the expensive Keil or IAR compilers. So for hobbyists like many of our readers, it has become difficult to start developing and using these boards without buying these tools or downloading them illegally.<br />
We have a solution for that, as we have managed to make a project for both the LPC4088 on the &#8220;CoiNel Tech LPC4088 MiO board&#8221; and for the LPC4350 on this board, within the free <a href="http://www.coocox.org/CooCox_CoIDE.htm" target="_blank">CooCox CoIDE</a>.</p>
<p>Keep posted for more information about that.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tkjelectronics.dk/2013/03/lpc4350-board-which-parts-would-you-like-to-see-reviewed/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Drive LCD TFT displays with an FPGA</title>
		<link>http://blog.tkjelectronics.dk/2013/02/drive-lcd-tft-displays-with-an-fpga/</link>
		<comments>http://blog.tkjelectronics.dk/2013/02/drive-lcd-tft-displays-with-an-fpga/#comments</comments>
		<pubDate>Fri, 22 Feb 2013 22:56:33 +0000</pubDate>
		<dc:creator>Thomas Jespersen</dc:creator>
				<category><![CDATA[Development boards]]></category>
		<category><![CDATA[FPGA]]></category>
		<category><![CDATA[Guides]]></category>

		<guid isPermaLink="false">http://blog.tkjelectronics.dk/?p=3935</guid>
		<description><![CDATA[FPGA&#8217;s can be very advanced to get started using, especially if you are used to microcontrollers. But when you first get the right feeling and the proper mindset you will soon see the endless possibilities with the programmable logic. One of the great aspects of the logic is the speed and the full control of [...]]]></description>
				<content:encoded><![CDATA[<p>FPGA&#8217;s can be very advanced to get started using, especially if you are used to microcontrollers.<br />
But when you first get the right feeling and the proper mindset you will soon see the endless possibilities with the programmable logic.<br />
<br />
One of the great aspects of the logic is the speed and the full control of what happens at every single clock cycle.<br />
With this full control it doesn&#8217;t takes many lines of code to generate a very time-critical signal such as a video signal.<br />
<br />
In this short post I will walk thru our current test setup with an FPGA, the Spartan 3E, controlling a 18-bit 7&#8243; 800&#215;480 TFT display.<br />
<div id="attachment_3947" class="wp-caption aligncenter" style="width: 276px"><a href="http://blog.tkjelectronics.dk/wp-content/uploads/FPGA_TFT_Project.jpg"><img src="http://blog.tkjelectronics.dk/wp-content/uploads/FPGA_TFT_Project-266x400.jpg" alt="" title="FPGA_TFT_Project" width="266" height="400" class="size-medium wp-image-3947" /></a><p class="wp-caption-text">Spartan 3E controlling a 800&#215;480 TFT LCD</p></div><span id="more-3935"></span><br />
In the image above you can the TFT display at the top and the FPGA board at the bottom.<br />
In between of these you will see a small green connector board, which is our own 7-inch LCD Breakout board with the required switch-mode power supply for powering the LED backlight, together with the interface connector with the 18-bit color signals, Pixel Clock, Data Enable and PWM.<br />
<div id="attachment_3948" class="wp-caption aligncenter" style="width: 410px"><a href="http://blog.tkjelectronics.dk/wp-content/uploads/LCD_Breakout_Board.jpg"><img src="http://blog.tkjelectronics.dk/wp-content/uploads/LCD_Breakout_Board-400x300.jpg" alt="" title="LCD_Breakout_Board" width="400" height="300" class="size-medium wp-image-3948" /></a><p class="wp-caption-text">7&#8243; LCD Breakout board</p></div><br />
The schematic of the board can be found here: <a href='http://blog.tkjelectronics.dk/wp-content/uploads/A5-LCD_Breakout.pdf'>A5-LCD_Breakout.pdf</a><br />
<br />
The FPGA board itself is the inexpensive, low-level, &#8220;<a href="http://www.xilinx.com/products/boards/s3esamplepack/files/S3Euserguide.pdf" target="_blank">Spartan 3E Sample Pack</a>&#8220;.<br />
Though any FPGA board with the required I/O pins available can of course be used.<br />
<br />
<div id="attachment_3946" class="wp-caption aligncenter" style="width: 410px"><a href="http://blog.tkjelectronics.dk/wp-content/uploads/Spartan3E_Sample_Pack.jpg"><img src="http://blog.tkjelectronics.dk/wp-content/uploads/Spartan3E_Sample_Pack-400x300.jpg" alt="" title="Spartan3E_Sample_Pack" width="400" height="300" class="size-medium wp-image-3946" /></a><p class="wp-caption-text">&#8220;Spartan 3E Sample Pack&#8221; FPGA board</p></div><br />
The VHDL code for this project, including the Xilinx Project files, can be downloaded here: <a href='http://blog.tkjelectronics.dk/wp-content/uploads/FPGA_LCD_TFT_Control.zip'>FPGA_LCD_TFT_Control.zip</a><br />
I will try to do a short summary of what happens in the code and why I have decided to make it such.<br />
<br\><br />
<strong>VHDL Code walkthru</strong><br />
To control a TFT display you have to generate the following two timed signals: DCLK (Pixel clock) and DE (Data Enable).<br />
In the <a href='http://blog.tkjelectronics.dk/wp-content/uploads/YTS700RLAB-01-100T.pdf'>datasheet of the display</a> you will be able to find the specific timing parameters of these signals, which also explains when to display the color data of each pixel.<br />
At page 6 of the datasheet of our display we can see the timing table. From this table we will notice the required CLK frequency of around 33.26MHz. Generating this Pixel clock source is one of the major aspects of generating the video signal.<br />
</p>
<div class="codecolorer-container vhdl default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="vhdl codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Clock<span style="color: #000066;">:</span> <span style="color: #000080; font-weight: bold;">entity</span> <span style="color: #0000ff;">work</span>.DCM_Module<span style="color: #000066;">&#40;</span>Behavioral<span style="color: #000066;">&#41;</span><br />
<span style="color: #000080; font-weight: bold;">generic</span> <span style="color: #000080; font-weight: bold;">map</span> <span style="color: #000066;">&#40;</span>PERIOD <span style="color: #000066;">=&gt;</span> <span style="color: #ff0000;">20.0</span>, DIV <span style="color: #000066;">=&gt;</span> <span style="color: #ff0000;">27</span>, MUL <span style="color: #000066;">=&gt;</span> <span style="color: #ff0000;">18</span><span style="color: #000066;">&#41;</span><br />
<span style="color: #000080; font-weight: bold;">port</span> <span style="color: #000080; font-weight: bold;">map</span> <span style="color: #000066;">&#40;</span>CLK_IN <span style="color: #000066;">=&gt;</span> CLK, CLK_OUT <span style="color: #000066;">=&gt;</span> PixelClock<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></div></div>
<p>
Within the code for the FPGA I have decided to use the built in DCM (Digital Clock Manager) periphiral of the FPGA&#8217;s, to generate 33.33MHz from the on board 50MHz oscillator. This is done by diving the Input frequency by 27 and then multiply this by 18.<br />
<em>50MHz / 27 = 1.85MHz * 18 = 33.33MHz</em><br />
<br />
Now when we have this clock signal internally in the FPGA too, we can use this signal to count the clock pulses, equal to each &#8216;pixel&#8217;, and then we are ready to create the timing of the DE signal.<br />
According to the datasheet we have an 800 pixels (clock cycles, Tcph, too) wide display area where the Data Enable has to be on.<br />
For every line scan we have a total of between 1000 and 1200 &#8216;pixels&#8217;, whereof between 200 and 400 are outside of the screen. These &#8216;off-screen&#8217; pixels are used to sync the video signal.<br />
<br />
When we have done a single line scan there is 479 more to go within the visisble display area. Yet again we do also have some &#8216;off-screen&#8217; lines, in this case between 10 and 110 lines, to do the sync.<br />
<br />
To ease the generation of the Data Enable signal and to take care of the current scan/pixel position, I have made two counters: Hcount and Vcount.<br />
The Hcount is used to take care of the current Horizontal pixel, going from 0 to 799 when inside the visible display area, and then continuing from 799 to about 1200 for the &#8216;off-screen&#8217; pixels.<br />
The Vcount is used to take care of the current Vertical pixel, going from 0 to 479 when inside the visible display area, and then continuing from 479 to about 590 for the &#8216;off-screen&#8217; pixels.<br />
<br />
The Data Enable pin is then controlled by this single line of code:</p>
<div class="codecolorer-container vhdl default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="vhdl codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">DE <span style="color: #000066;">&lt;=</span> '<span style="color: #ff0000;">1</span>' <span style="color: #000080; font-weight: bold;">when</span> <span style="color: #000066;">&#40;</span><span style="color: #000066;">&#40;</span>Hcount <span style="color: #000066;">&lt;</span> TDEH<span style="color: #000066;">&#41;</span> <span style="color: #000080; font-weight: bold;">and</span> <span style="color: #000066;">&#40;</span>Vcount <span style="color: #000066;">&lt;</span> TDE<span style="color: #000066;">&#41;</span><span style="color: #000066;">&#41;</span> <span style="color: #000080; font-weight: bold;">else</span> '<span style="color: #ff0000;">0</span>'<span style="color: #000066;">;</span></div></div>
<p>Where the TDEH and TDE are definitions as found in the datasheet. In the top of our VHDL code all these timing definitions has been programmed as constants:</p>
<div class="codecolorer-container vhdl default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="vhdl codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000080; font-weight: bold;">constant</span> TDEH<span style="color: #000066;">:</span> <span style="color: #0000ff;">integer</span> <span style="color: #000066;">:=</span> <span style="color: #ff0000;">800</span><span style="color: #000066;">;</span><br />
<span style="color: #000080; font-weight: bold;">constant</span> TDEL<span style="color: #000066;">:</span> <span style="color: #0000ff;">integer</span> <span style="color: #000066;">:=</span> <span style="color: #ff0000;">256</span><span style="color: #000066;">;</span><br />
<span style="color: #000080; font-weight: bold;">constant</span> TDEB<span style="color: #000066;">:</span> <span style="color: #0000ff;">integer</span> <span style="color: #000066;">:=</span> <span style="color: #ff0000;">45</span><span style="color: #000066;">;</span> &nbsp;<br />
<span style="color: #000080; font-weight: bold;">constant</span> TDE<span style="color: #000066;">:</span> <span style="color: #0000ff;">integer</span> <span style="color: #000066;">:=</span> <span style="color: #ff0000;">480</span><span style="color: #000066;">;</span></div></div>
<p>
So now we have managed to generate both the DCLK (Pixel clock) and the required DE (Data Enable) signal with the proper timing parameters.<br />
The Hcounter will keep counting up to <strong>(TDEH+TDEL)</strong>, which is the total horizontal pixel count (including the &#8216;off-screen&#8217; pixels). Afterwards it resets to 0 and increase 1 to the Vcount, moving the &#8220;cursor&#8221; one line down.<br />
This is then repeated until the Vcounter reaches the end at <strong>(TDE+TDEB)</strong> where it resets to 0 too.<br />
<br />
Finally it is now just a matter of setting the 18-bit digital color lines to the proper pixel color at each clock cycle and then we have a functioning display system.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tkjelectronics.dk/2013/02/drive-lcd-tft-displays-with-an-fpga/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Documentation added for the USB Host Library</title>
		<link>http://blog.tkjelectronics.dk/2013/02/documentation-added-for-the-usb-host-library/</link>
		<comments>http://blog.tkjelectronics.dk/2013/02/documentation-added-for-the-usb-host-library/#comments</comments>
		<pubDate>Wed, 20 Feb 2013 14:14:14 +0000</pubDate>
		<dc:creator>Lauszus</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Bluetooth]]></category>
		<category><![CDATA[TKJ Electronics]]></category>
		<category><![CDATA[USB]]></category>

		<guid isPermaLink="false">http://blog.tkjelectronics.dk/?p=3917</guid>
		<description><![CDATA[I&#8217;m happy to announce that documentation is now available for all the libraries I have written for the USB Host Shield library. The documentation is available at the following link: http://felis.github.com/USB_Host_Shield_2.0. The documentation is generated using Doxygen which is a free documentation-generator based upon the header files in the source code. For instance the following [...]]]></description>
				<content:encoded><![CDATA[<p>I&#8217;m happy to announce that documentation is now available for all the libraries I have written for the <a href="http://blog.tkjelectronics.dk/2013/01/usb-host-shield-is-now-available-in-the-webshop/" target="_blank">USB Host Shield</a> library.<br />
The documentation is available at the following link: <a href="http://felis.github.com/USB_Host_Shield_2.0" target="_blank">http://felis.github.com/USB_Host_Shield_2.0</a>.<br />
The documentation is generated using <a href="http://www.stack.nl/~dimitri/doxygen/" target="_blank">Doxygen</a> which is a free documentation-generator based upon the header files in the source code.</p>
<p>For instance <a href="https://github.com/felis/USB_Host_Shield_2.0/blob/2266398b28ddf2a6738b787bfcf9954fadce4f14/PS3BT.h#L68-L74" target="_blank">the following comment</a> will end up looking like this in the documentation:<br />
<a href="http://blog.tkjelectronics.dk/wp-content/uploads/Constructor.png"><img src="http://blog.tkjelectronics.dk/wp-content/uploads/Constructor-1024x328.png" alt="" title="Constructor" width="100%" class="aligncenter size-large wp-image-3927" /></a></p>
<p>I hope this will be useful for people who is new to the USB host library or even people who just want a quick overview.<br />
If you spot any typos or got any comments please let me know in the comments below.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tkjelectronics.dk/2013/02/documentation-added-for-the-usb-host-library/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Bluetooth controlled RGB light strip</title>
		<link>http://blog.tkjelectronics.dk/2013/01/bluetooth-controlled-rgb-light-strip/</link>
		<comments>http://blog.tkjelectronics.dk/2013/01/bluetooth-controlled-rgb-light-strip/#comments</comments>
		<pubDate>Sun, 20 Jan 2013 20:49:04 +0000</pubDate>
		<dc:creator>Thomas Jespersen</dc:creator>
				<category><![CDATA[TKJ Electronics]]></category>

		<guid isPermaLink="false">http://blog.tkjelectronics.dk/?p=3870</guid>
		<description><![CDATA[In December last year we developed a small Bluetooth controlled RGB light strip for the christmas tree, to be controlled with your Android smartphone The demonstration of the project and the smartphone control can be seen in the video below. http://www.youtube.com/watch?v=pZSADQihV_Y The main aspect of the project is to use an Arduino to parse incoming [...]]]></description>
				<content:encoded><![CDATA[<p>In December last year we developed a small Bluetooth controlled RGB light strip for the christmas tree, to be controlled with your Android smartphone<br />
<br />
The demonstration of the project and the smartphone control can be seen in the video below.</p>
<p><a href="http://www.youtube.com/watch?v=pZSADQihV_Y">http://www.youtube.com/watch?v=pZSADQihV_Y</a></p>
<p><a href="http://www.youtube.com/watch?v=pZSADQihV_Y"><img src="http://img.youtube.com/vi/pZSADQihV_Y/default.jpg" width="130" height="97" border=0></a></p>
<p>The main aspect of the project is to use an Arduino to parse incoming Serial commands to enable and set different effects for the attached RGB strip.<br />
The code for the project, including the Arduino code and the Android application project, can be found on GitHub: <a href="https://github.com/TKJElectronics/AndroidControllableLights" target="_blank">AndroidControllableLights</a><br />
<br />
Another interesting aspect of the project was to enable wireless update of the Arduino sketch, using the Bluetooth serial connection. Scroll down in this post if you are only interested in figuring out how this can be done. <span id="more-3870"></span></p>
<p><br/><br />
<strong>RGB Strip</strong><br />
The RGB strip contains 50 pixels, each with an individual WS2801 chip. These chips makes it possible to control the colors of each pixel on the strip using serially clocked and latched data with only 2 pins. The <strong>data</strong> pin of the strip is connected to Arduino <strong>pin 8</strong>, while the <strong>clock</strong> pin is connected to <strong>pin 9</strong>.<br />
By using the <a href="https://github.com/adafruit/Adafruit-WS2801-Library" target="_blank">WS2801 library by Adafruit</a> the control of the colors on the strip is fairly easy task.</p>
<div class="codecolorer-container cpp default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="cpp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">setStripColor<span style="color: #008000;">&#40;</span>R, G, B<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
strip.<span style="color: #007788;">show</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span></div></div>
<p><br/><br />
<strong>Animations and effects</strong><br />
The next step is the control of the lights and some different effects and animations.<br />
In this project I have decided to make the following effects:</p>
<ul>
<li>Set color directly</li>
<li>Fading between set colors</li>
<li>Snap between set colors</li>
<li>Scroll of set color pattern</li>
<li>Running fade og set colors</li>
</ul>
<p><br/><br />
<strong>Parsing of Serial commands</strong><br />
We are now ready to parse incoming Serial data and interpret it as commands to enable, set or disable the effects.<br />
I decided to make the following commands which is then parsed when received Serially, either from the Bluetooth module or from a PC connected using USB.<br />
The first byte of a command package is the command byte, descriping the command of the package. The next bytes are all parameters as described below. Each parameter is terminated with a &#8216;;&#8217; character, also when only one parameter is needed.<br />
<br />
The project contains the following commands:</p>
<ul>
<li>0x0F &#8211; Set color [Parameters: 3 bytes of 3 char each]</li>
<li>0&#215;01 &#8211; Add fade color [Parameters: 3 bytes of 3 char each]</li>
<li>0&#215;02 &#8211; Reset fade colors [Parameters: None]</li>
<li>0&#215;03 &#8211; Set Speed/Delay [Parameters: 1 integer of 5 chars]</li>
<li>0&#215;04 &#8211; Enable fade effect [Parameters: None]</li>
<li>0&#215;05 &#8211; Add snap color [Parameters: 3 bytes of 3 char each]</li>
<li>0&#215;06 &#8211; Reset snap colors [Parameters: None]</li>
<li>0&#215;07 &#8211; Enable snap effect [Parameters: None]</li>
<li>0&#215;08 &#8211; Add scrolling color [Parameters: 3 bytes of 3 char each]</li>
<li>0&#215;09 &#8211; Reset scrolling colors [Parameters: None]</li>
<li>0x0A &#8211; Enable scrolling effect [Parameters: None]</li>
<li>0x0B &#8211; Add running fade color [Parameters: 3 bytes of 3 char each]</li>
<li>0x0C &#8211; Reset running fade colors [Parameters: None]</li>
<li>0x0C &#8211; Enable running fade effect [Parameters: None]</li>
<li>0x0E &#8211; Disable any effect [Parameters: None]</li>
</ul>
<p><br/><br />
<strong>Android Application</strong><br />
The most difficult part for me was the Android application.<br />
I managed to put down a relatively simple but powerfull application to control send the specific Serial commands over Bluetooth to the Arduino.<br />
The Android project can also be found on GitHub: <a href="https://github.com/TKJElectronics/AndroidControllableLights/tree/master/ColorLightsController" target="_blank">ColorLightsController</a><br />
<div id="attachment_3884" class="wp-caption aligncenter" style="width: 250px"><a href="http://blog.tkjelectronics.dk/wp-content/uploads/ColorLightsController.jpg"><img src="http://blog.tkjelectronics.dk/wp-content/uploads/ColorLightsController-240x400.jpg" alt="" title="ColorLightsController" width="240" height="400" class="size-medium wp-image-3884" /></a><p class="wp-caption-text">&#8220;Color Lights Controller&#8221; &#8211; the Android control application</p></div><br />
To help me get started with the Bluetooth communication I have used the following tutorial: <a href="http://bellcode.wordpress.com/2012/01/02/android-and-arduino-bluetooth-communication/" target="_blank">ANDROID AND ARDUINO BLUETOOTH COMMUNICATION</a><br />
And for the color selector I found this great <a href="http://macykuang.com/?p=41" target="_blank">AmbilWarna Color Picker</a> together with a tutorial on <a href="http://wptrafficanalyzer.in/blog/android-color-picker-application-using-ambilwarna-color-picker-library/" target="_blank">how to use it in your own application</a>.<br />
<br />
OBS. The current version doesn&#8217;t have any device selection dialog for the Serial Bluetooth module, so the module name is &#8220;pre-programmed&#8221; into the application: <a href="https://github.com/TKJElectronics/AndroidControllableLights/blob/master/ColorLightsController/src/tkjelectronics/arduino/colorlightscontroller/MainActivity.java#L532" target="_blank">if(device.getName().equals(&#8220;quadcopter&#8221;))</a><br />
<br />
So you will have to change this accordingly before starting the application on your own phone.</p>
<p><br/><br />
<strong>Wirelles (Bluetooth) update of the Arduino</strong><br />
One final aspect of the project, was the ability to update the Arduino sketch wirelessly, so I didn&#8217;t always have to connect a USB cable.<br />
As the Bluetooth module I am using doesn&#8217;t have any DTR pin for resetting the board, starting the Arduino bootloader, I had to improvise and implement this &#8220;reset into bootloader&#8221; myself.<br />
<br />
I started trying the most known reset solution, the Watchdog. But the problem with our goal in resetting into the bootloader is, that when you do a Watchdog reset an internal flag is set which then skips the bootloader.<br />
So a real &#8220;hardware&#8221; reset is necessary.<br />
<br />
A solution for this was to connect an analog output pin (PWM pin) to the Reset pin of the Arduino. I decided to use pin 7.<br />
By using an Analog output pin the state of it is left unchanged while the Arduino is booting, making sure that it doesn&#8217;t go into a &#8220;restart-loop&#8221;.<br />
<br />
We are now able to hardware-reset the board by writing 0 to that pin (GND), which sets it up and drives the reset pin low!<br />
</p>
<div class="codecolorer-container cpp default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="cpp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0000ff;">void</span> resetIntoBootloader<span style="color: #008000;">&#40;</span><span style="color: #0000ff;">void</span><span style="color: #008000;">&#41;</span><br />
<span style="color: #008000;">&#123;</span><br />
&nbsp; analogWrite<span style="color: #008000;">&#40;</span><span style="color: #0000dd;">7</span>, <span style="color: #0000dd;">0</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
<span style="color: #008000;">&#125;</span></div></div>
<p>
While we have now overcome the issue of the DTR connection we still need to know when to execute the resetIntoBootloader function.<br />
This is where the specific Arduino bootloader character sequence comes in handy.<br />
<br />
When you press the upload button of your Arduino IDE your board is reset due to the DTR pin and the IDE then starts spitting out &#8220;0 0 0 0 0 &#8220;.<br />
We can use this sequence to check for a zero and then a space, and if that is recognized then execute the resetIntoBootloader function.<br />
</p>
<div class="codecolorer-container cpp default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="cpp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0000ff;">char</span> bootloaderPrelimary <span style="color: #000080;">=</span> <span style="color: #0000dd;">0</span><span style="color: #008080;">;</span><br />
<span style="color: #0000ff;">void</span> checkBootloader<span style="color: #008000;">&#40;</span><span style="color: #0000ff;">char</span> serialChar<span style="color: #008000;">&#41;</span><br />
<span style="color: #008000;">&#123;</span> &nbsp;<br />
&nbsp; &nbsp; <span style="color: #0000ff;">if</span> <span style="color: #008000;">&#40;</span>bootloaderPrelimary <span style="color: #000080;">==</span> <span style="color: #0000dd;">0</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">if</span> <span style="color: #008000;">&#40;</span>serialChar <span style="color: #000080;">==</span> <span style="color: #FF0000;">'0'</span><span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; bootloaderPrelimary <span style="color: #000080;">=</span> <span style="color: #0000dd;">1</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; <span style="color: #008000;">&#125;</span> <span style="color: #0000ff;">else</span> <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">if</span> <span style="color: #008000;">&#40;</span>serialChar <span style="color: #000080;">==</span> <span style="color: #FF0000;">' '</span><span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; resetIntoBootloader<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">else</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; bootloaderPrelimary <span style="color: #000080;">=</span> <span style="color: #0000dd;">0</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; <span style="color: #008000;">&#125;</span> &nbsp; &nbsp; &nbsp; &nbsp;<br />
<span style="color: #008000;">&#125;</span></div></div>
<p>
Everytime we receive a character we need to check it with this &#8216;checkBootloader&#8217; function first, to see if it is some bootloader characters.<br />
<br />
I have implemented this in the top of the main loop, before doing any of the command parsing.<br />
So for everytime we receive a character we check it to see if it is a bootloader character, and if not, we are going to parse it as a command byte.<br />
<br />
You can see the lines of code you will have to add to your loop function here: <a href="https://github.com/TKJElectronics/AndroidControllableLights/blob/master/AndroidControllableLights.ino#L60-L62" target="_blank">Bootloader check sequence</a><br />
<br />
Finally you will have to remember to set your Bluetooth module to a <strong>Baud-rate of 57600</strong> &#8211; as this is the rate the Arduino bootloader is using.<br />
That is also why the sketch is set to use 57600 as the buad-rate. </p>
<p><br/><br />
I guess this is it for now.<br />
I hope you enjoyed this small but handsome Christmas lighting project.<br />
<br />
<strong>Happy new year everyone!</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tkjelectronics.dk/2013/01/bluetooth-controlled-rgb-light-strip/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>USB Host Shield is now available in the webshop</title>
		<link>http://blog.tkjelectronics.dk/2013/01/usb-host-shield-is-now-available-in-the-webshop/</link>
		<comments>http://blog.tkjelectronics.dk/2013/01/usb-host-shield-is-now-available-in-the-webshop/#comments</comments>
		<pubDate>Thu, 17 Jan 2013 19:45:07 +0000</pubDate>
		<dc:creator>Lauszus</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Bluetooth]]></category>
		<category><![CDATA[TKJ Electronics]]></category>
		<category><![CDATA[USB]]></category>

		<guid isPermaLink="false">http://blog.tkjelectronics.dk/?p=3820</guid>
		<description><![CDATA[This is a short announcement regarding the USB Host Shield from Circuits@Home, which we are now carrying in in our store. By buying the official shield you will support the continous development of the library and get support from us! The shield can be found and bought here: USB Host Shield 2.0 for Arduino. The [...]]]></description>
				<content:encoded><![CDATA[<p>This is a short announcement regarding the USB Host Shield from <a href="http://www.circuitsathome.com/" target="_blank">Circuits@Home</a>, which we are now carrying in in <a href="http://shop.tkjelectronics.dk/" target="_blank">our store</a>.<br />
By buying the official shield you will support the continous development of the library and get support from us!<br />
The shield can be found and bought here: <a href="http://shop.tkjelectronics.dk/product_info.php?products_id=43" target="_blank">USB Host Shield 2.0 for Arduino</a>.</p>
<p>The shield can be used with almost any kind of Arduino including the most popular <a href="http://arduino.cc/en/Main/arduinoBoardUno" target="_blank">Arduino Uno</a>, <a href="http://arduino.cc/en/Main/arduinoBoardMega2560" target="_blank">Arduino Mega</a>, <a href="http://arduino.cc/en/Main/arduinoBoardLeonardo" target="_blank">Arduino Leonardo</a> etc. If you are in doubt if your Arduino is supported please don&#8217;t hesitate to write a comment below.</p>
<p>The USB Host Shield will allow you to use any of the <a href="http://blog.tkjelectronics.dk/category/bluetooth/" target="_blank">Bluetooth</a> and <a href="http://blog.tkjelectronics.dk/category/usb/" target="_blank">USB libraries</a> I wrote.<br />
<span id="more-3820"></span><br />
In case you missed it I have written several libraries for the shield including:<br />
<br />
<strong><a href="https://github.com/felis/USB_Host_Shield_2.0#spp-library" target="_blank">The Serial Port Protocol (SPP)</a></strong><br />
Emulate a serial port via Bluetooth, which allows you to send data back and fourth wirelessly.</p>
<p><strong><a href="https://github.com/felis/USB_Host_Shield_2.0#ps3-library" target="_blank">PS3 controllers</a></strong><br />
All the official controllers are supported both via USB and Bluetooth.</p>
<p><strong><a href="https://github.com/felis/USB_Host_Shield_2.0#xbox-360-library" target="_blank">Xbox controllers</a></strong><br />
Both the wireless and wired controllers are supported. You will need a special <a href="http://blog.tkjelectronics.dk/wp-content/uploads/xbox360-wireless-receiver.jpg" target="_blank">wireless receiver</a> to use the wireless controller.</p>
<p><strong><a href="https://github.com/felis/USB_Host_Shield_2.0#wii-library" target="_blank">Wiimotes</a></strong><br />
The Wiimote is supported including the build IR camera. The Motion Plus and Nunchuck extensions are also supported. The Wii U Pro Controller is supported as well.</p>
<p>
The USB Host Shield support several other devices including:</p>
<ul>
<li><a href="http://www.circuitsathome.com/?s=serial" target="_blank">USB to serial converters</a> &#8211; FTDI, PL-2303, ACM, as well as certain cell phones and GPS receivers are supported.</li>
<li><a href="http://www.circuitsathome.com/category/mcu/arduino/usb-shield/android-adk" target="_blank">Android ADK</a></li>
<li><a href="http://www.circuitsathome.com/category/camera-control" target="_blank">Digital cameras</a></li>
<li><a href="http://www.circuitsathome.com/category/mcu/arduino/usb-shield/hid" target="_blank">HID device, such as keyboards, mice and joysticks</a></li>
<li><a href="http://www.circuitsathome.com/mcu/midi-support-for-usb-host-2-0-library" target="_blank">USB MIDI driver</a></li>
</ul>
<p>The source code can be found at Github:<br />
<a href="https://github.com/felis/USB_Host_Shield_2.0" target="_blank">https://github.com/felis/USB_Host_Shield_2.0</a>.</p>
<p>More information can be found at <a href="http://www.circuitsathome.com/" target="_blank">Circuits@Home</a>.</p>
<p><center><a href="http://shop.tkjelectronics.dk/product_info.php?products_id=43"><img src="http://shop.tkjelectronics.dk/images/USB_Host_Shield1.jpg" alt="USB Host Shield"/></a></center></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tkjelectronics.dk/2013/01/usb-host-shield-is-now-available-in-the-webshop/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Xbox 360 receiver added to the USB Host Library</title>
		<link>http://blog.tkjelectronics.dk/2012/12/xbox-360-receiver-added-to-the-usb-host-library/</link>
		<comments>http://blog.tkjelectronics.dk/2012/12/xbox-360-receiver-added-to-the-usb-host-library/#comments</comments>
		<pubDate>Fri, 28 Dec 2012 23:45:35 +0000</pubDate>
		<dc:creator>Lauszus</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[TKJ Electronics]]></category>
		<category><![CDATA[USB]]></category>

		<guid isPermaLink="false">http://blog.tkjelectronics.dk/?p=3791</guid>
		<description><![CDATA[You asked for it and here it is. I finally got the time to implement support for Wireless Xbox 360 controllers to the USB Host Library. This is done via a Xbox 360 Wireless receiver that is normally intended for Windows computers. The source code can be found at github: https://github.com/felis/USB_Host_Shield_2.0/blob/master/XBOXRECV.cpp There is an example [...]]]></description>
				<content:encoded><![CDATA[<p>You asked for it and here it is.<br />
I finally got the time to implement support for Wireless Xbox 360 controllers to the USB Host Library. This is done via a <a href="http://blog.tkjelectronics.dk/wp-content/uploads/xbox360-wireless-receiver.jpg" target="_blank">Xbox 360 Wireless receiver</a> that is normally intended for Windows computers.</p>
<p>The source code can be found at github: <a href="https://github.com/felis/USB_Host_Shield_2.0/blob/master/XBOXRECV.cpp" target="_blank">https://github.com/felis/USB_Host_Shield_2.0/blob/master/XBOXRECV.cpp</a><br />
There is an example as well: <a href="https://github.com/felis/USB_Host_Shield_2.0/blob/master/examples/Xbox/XBOXRECV/XBOXRECV.ino" target="_blank">https://github.com/felis/USB_Host_Shield_2.0/blob/master/examples/Xbox/XBOXRECV/XBOXRECV.ino</a>.</p>
<p>The receiver supports up to four controllers internally, so it was fairly easy to implement it.</p>
<p><del datetime="2013-01-06T03:28:35+00:00">Actually I havn&#8217;t tested the library with more than one controller, but if somebody out there could confirm if it&#8217;s working or not, with more than one controller, I would really appreciate it!</del><br />
Thanks to Tim, multiple controllers is now confirmed to work!<br />
<span id="more-3791"></span><br />
If you need to use more than four controllers you will need to connect a second receiver via a USB hub which is also supported by the library.<br />
Simply add the following to the start of your Arduino sketch:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">USBHub &nbsp;Hub1(&amp;Usb);<br />
USBHub &nbsp;Hub2(&amp;Usb);</div></div>
<p>Note that you might need to add more instances depending on how many chips there is inside your USB hub.</p>
<p>You will also need to create another instance of the XBOXRECV class like so:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">USB Usb;<br />
XBOXRECV Xbox1(&amp;Usb);<br />
XBOXRECV Xbox2(&amp;Usb);</div></div>
<p>For more information regarding the protocol see the following pages: <a href="http://tattiebogle.net/index.php/ProjectRoot/Xbox360Controller/WirelessUsbInfo" target="_blank">http://tattiebogle.net/index.php/ProjectRoot/Xbox360Controller/WirelessUsbInfo</a> and <a href="https://github.com/Grumbel/xboxdrv/blob/master/PROTOCOL" target="_blank">https://github.com/Grumbel/xboxdrv/blob/master/PROTOCOL</a>.</p>
<p><a href="http://blog.tkjelectronics.dk/wp-content/uploads/xbox360-wireless-receiver.jpg"><img src="http://blog.tkjelectronics.dk/wp-content/uploads/xbox360-wireless-receiver.jpg" alt="" title="xbox360-wireless-receiver" width="294" height="360" class="aligncenter size-full wp-image-2771" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tkjelectronics.dk/2012/12/xbox-360-receiver-added-to-the-usb-host-library/feed/</wfw:commentRss>
		<slash:comments>45</slash:comments>
		</item>
		<item>
		<title>Inexpensive 2&#215;16 LCD display (HD44780)</title>
		<link>http://blog.tkjelectronics.dk/2012/12/inexpensive-2x16-lcd-display-hd44780/</link>
		<comments>http://blog.tkjelectronics.dk/2012/12/inexpensive-2x16-lcd-display-hd44780/#comments</comments>
		<pubDate>Thu, 06 Dec 2012 20:56:00 +0000</pubDate>
		<dc:creator>Thomas Jespersen</dc:creator>
				<category><![CDATA[TKJ Electronics]]></category>

		<guid isPermaLink="false">http://blog.tkjelectronics.dk/?p=3771</guid>
		<description><![CDATA[We at TKJ Electronics have just received a big bunch of inexpensive 2&#215;16 Alphanumeric character display with a built in HD44780 controller, making it easy compatible with the Arduino or any other microcontroller. You have full control of both lines of 16 characters with either a 4-bit or 8-bit control scheme, requiring a minimum of [...]]]></description>
				<content:encoded><![CDATA[<p><div id="attachment_3779" class="wp-caption aligncenter" style="width: 410px"><a href="http://blog.tkjelectronics.dk/wp-content/uploads/LCM-S01602DTR-M_2.jpg"><img src="http://blog.tkjelectronics.dk/wp-content/uploads/LCM-S01602DTR-M_2-400x236.jpg" alt="" title="LCM-S01602DTR-M_2" width="400" height="236" class="size-medium wp-image-3779" /></a><p class="wp-caption-text">Small and inexpensive LCD module</p></div><br />
We at TKJ Electronics have just received a big bunch of inexpensive 2&#215;16 Alphanumeric character display with a built in HD44780 controller, making it easy compatible with the Arduino or any other microcontroller.<br />
<br />
<div id="attachment_3773" class="wp-caption aligncenter" style="width: 330px"><a href="http://blog.tkjelectronics.dk/wp-content/uploads/LCM-S01602DTR-M.jpg"><img src="http://blog.tkjelectronics.dk/wp-content/uploads/LCM-S01602DTR-M.jpg" alt="" title="LCM-S01602DTR-M" width="320" height="143" class="size-full wp-image-3773" /></a><p class="wp-caption-text">2 by 16 characters though without backlight</p></div><br />
<span id="more-3771"></span>You have full control of both lines of 16 characters with either a 4-bit or 8-bit control scheme, requiring a minimum of only 6 I/O pins on the microcontroller.<br />
The display comes without backlight but has room and connections for it if the display is flipped up. Further more there is two holes in the side for screw mount, making it even easier to integrate with the cabinet of your next project.<br />
<br/><br />
Please visit our Webshop for a short detailed description including a download link for the datasheet: <a href="http://shop.tkjelectronics.dk/product_info.php?products_id=42" target="_blank">LCM-S01602DTR/M</a><br />
<br />
Or have a look at the video below to see the LCD in action using an Arduino MEGA.</p>
<p><a href="http://www.youtube.com/watch?v=QJoFUpqNGvA">http://www.youtube.com/watch?v=QJoFUpqNGvA</a></p>
<p><a href="http://www.youtube.com/watch?v=QJoFUpqNGvA"><img src="http://img.youtube.com/vi/QJoFUpqNGvA/default.jpg" width="130" height="97" border=0></a></p>
<p><br/><br />
For the interested hackers the code for the demonstration in the video can be found below.</p>
<div class="codecolorer-container cpp default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:600px;"><div class="cpp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666;">// include the library code:</span><br />
<span style="color: #339900;">#include &lt;LiquidCrystal.h&gt;</span><br />
<br />
<span style="color: #666666;">// initialize the library with the numbers of the interface pins</span><br />
LiquidCrystal lcd<span style="color: #008000;">&#40;</span><span style="color: #0000dd;">12</span>, <span style="color: #0000dd;">11</span>, <span style="color: #0000dd;">5</span>, <span style="color: #0000dd;">4</span>, <span style="color: #0000dd;">3</span>, <span style="color: #0000dd;">2</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
<br />
<span style="color: #0000ff;">char</span> i<span style="color: #008080;">;</span><br />
<span style="color: #0000ff;">const</span> <span style="color: #0000ff;">char</span> message1<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">17</span><span style="color: #008000;">&#93;</span> <span style="color: #000080;">=</span> <span style="color: #FF0000;">&quot;2x16 LCD Display&quot;</span><span style="color: #008080;">;</span><br />
<br />
<span style="color: #0000ff;">void</span> setup<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#123;</span><br />
&nbsp; <span style="color: #666666;">// set up the LCD's number of columns and rows: </span><br />
&nbsp; lcd.<span style="color: #007788;">begin</span><span style="color: #008000;">&#40;</span><span style="color: #0000dd;">16</span>, <span style="color: #0000dd;">2</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
<span style="color: #008000;">&#125;</span><br />
<br />
<span style="color: #0000ff;">void</span> loop<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#123;</span><br />
&nbsp; <span style="color: #666666;">// Print a message to the LCD.</span><br />
&nbsp; lcd.<span style="color: #007788;">clear</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; <br />
&nbsp; lcd.<span style="color: #007788;">setCursor</span><span style="color: #008000;">&#40;</span><span style="color: #0000dd;">0</span>, <span style="color: #0000dd;">0</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; lcd.<span style="color: #007788;">print</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;TKJ Electronics&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; lcd.<span style="color: #007788;">setCursor</span><span style="color: #008000;">&#40;</span><span style="color: #0000dd;">0</span>, <span style="color: #0000dd;">1</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; lcd.<span style="color: #007788;">print</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;LCM-S01602DTR/M&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; delay<span style="color: #008000;">&#40;</span><span style="color: #0000dd;">2000</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; <br />
&nbsp; lcd.<span style="color: #007788;">setCursor</span><span style="color: #008000;">&#40;</span><span style="color: #0000dd;">16</span>, <span style="color: #0000dd;">0</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> &nbsp;<br />
&nbsp; lcd.<span style="color: #007788;">autoscroll</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> &nbsp; &nbsp;<br />
&nbsp; <span style="color: #0000ff;">for</span> <span style="color: #008000;">&#40;</span>i <span style="color: #000080;">=</span> <span style="color: #0000dd;">0</span><span style="color: #008080;">;</span> i <span style="color: #000080;">&lt;</span> <span style="color: #0000dd;">16</span><span style="color: #008080;">;</span> i<span style="color: #000040;">++</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; lcd.<span style="color: #007788;">print</span><span style="color: #008000;">&#40;</span>message1<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; delay<span style="color: #008000;">&#40;</span><span style="color: #0000dd;">100</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; <span style="color: #008000;">&#125;</span><br />
&nbsp; lcd.<span style="color: #007788;">noAutoscroll</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> &nbsp;<br />
&nbsp; <br />
&nbsp; <span style="color: #0000ff;">for</span> <span style="color: #008000;">&#40;</span>i <span style="color: #000080;">=</span> <span style="color: #0000dd;">0</span><span style="color: #008080;">;</span> i <span style="color: #000080;">&lt;</span> <span style="color: #0000dd;">4</span><span style="color: #008080;">;</span> i<span style="color: #000040;">++</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; lcd.<span style="color: #007788;">setCursor</span><span style="color: #008000;">&#40;</span><span style="color: #0000dd;">16</span>, <span style="color: #0000dd;">1</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; lcd.<span style="color: #007788;">print</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; delay<span style="color: #008000;">&#40;</span><span style="color: #0000dd;">500</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; lcd.<span style="color: #007788;">setCursor</span><span style="color: #008000;">&#40;</span><span style="color: #0000dd;">16</span>, <span style="color: #0000dd;">1</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; lcd.<span style="color: #007788;">print</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot; &nbsp; Only $5.00 &nbsp; &quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; delay<span style="color: #008000;">&#40;</span><span style="color: #0000dd;">500</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> <br />
&nbsp; <span style="color: #008000;">&#125;</span> <br />
&nbsp; <br />
&nbsp; delay<span style="color: #008000;">&#40;</span><span style="color: #0000dd;">1000</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> <br />
<span style="color: #008000;">&#125;</span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.tkjelectronics.dk/2012/12/inexpensive-2x16-lcd-display-hd44780/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
