<?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>vsdev &#187; JuiceBox</title>
	<atom:link href="http://www.frozeneskimo.com/electronics/category/juicebox/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.frozeneskimo.com/electronics</link>
	<description>electronics and embedded development</description>
	<lastBuildDate>Mon, 28 Jun 2010 03:46:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>More JuiceBox Dev</title>
		<link>http://www.frozeneskimo.com/electronics/2006/01/19/more-juicebox-dev/</link>
		<comments>http://www.frozeneskimo.com/electronics/2006/01/19/more-juicebox-dev/#comments</comments>
		<pubDate>Fri, 20 Jan 2006 06:49:45 +0000</pubDate>
		<dc:creator>vsergeev</dc:creator>
				<category><![CDATA[ARM]]></category>
		<category><![CDATA[JuiceBox]]></category>

		<guid isPermaLink="false">http://www.frozeneskimo.com/electronics/?p=41</guid>
		<description><![CDATA[Iâ€™m not entirely new to microcontrollers, although Iâ€™ve never been around the ARM ones. Most of my experience comes from the Atmel AVR line of microcontrollers, but I still consider myself a noob. The JuiceBox is a great dev board to learn on. Everything is production prewired, all you have to do is write the [...]]]></description>
			<content:encoded><![CDATA[<p>Iâ€™m not entirely new to microcontrollers, although Iâ€™ve never been around the ARM ones. Most of my experience comes from the Atmel AVR line of microcontrollers, but I still consider myself a noob.</p>
<p>The JuiceBox is a great dev board to learn on. Everything is production prewired, all you have to do is write the code to work itâ€¦</p>
<p>Today I have made some significant progress with the general understanding of this embedded hardware. Using just JTAG/OCDCommander, the datasheet, and the register definitions in s3c44b0x.h, I have gotten two different parts of the board to work. First, the buttons. This was pretty easy, since I have worked with the idea of setting the direction of a port and manipulating the port in the past.</p>
<p>The buttons of the juicebox are located on port G, so two primary registers are involved: PCONG and PDATG. The first one being the direction of the port (16-bit register, 2 bits per pin to be: input, output, special), and the second one being the data representing that port (8-bit). Instead of fumbling with the math and finding the bitwise masks required to push certain buttons, I simply read the PDATG back in OCDCommander with different buttons pressed at different times, and then defined these values in my own code to be easily accessible and easily compared to PDATG. I get this in the end:</p>
<p>#define JB_PLAY     0x9D<br />
#define JB_RETURN   0x9E<br />
#define JB_STAR     0x8F<br />
#define JB_FORWARD  0x9B<br />
#define JB_REVERSE  0&#215;97<br />
#define JB_ATREST   0x9F</p>
<p>To use the port G, I first set the direction of the whole port to input (pcong = 0Ã—0000;), and then the data on port G can be directly compared to these constants. It works great.</p>
<p>Since this worked out of the box so well, I decided to write my own UART interface. I am familiar with UART in general (used it a lot in the AVRs), so I have a basic understanding of how it works. The init() and putc() of my UART interface also surprisingly worked out of the box, but the getc() still needs a bit of work (it half works). When Iâ€™m done, Iâ€™ll post the UART interface code.</p>
<p>JB Button Test Source Code (prints out in the LCD what button you have pressed), precompiled elf included as well:<br />
<a href="http://www.frozeneskimo.com/electronics/wp-content/uploads/Software/JBButtons.zip" title="JuiceBox Button Test Source and Binary">http://www.frozeneskimo.com/electronics/wp-content/uploads/Software/JBButtons.zip</a><br />
Note: I take absolutely no responsibility for any damage this software may cause.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.frozeneskimo.com/electronics/2006/01/19/more-juicebox-dev/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JuiceBox Game of Life</title>
		<link>http://www.frozeneskimo.com/electronics/2006/01/16/juicebox-game-of-life/</link>
		<comments>http://www.frozeneskimo.com/electronics/2006/01/16/juicebox-game-of-life/#comments</comments>
		<pubDate>Tue, 17 Jan 2006 04:21:23 +0000</pubDate>
		<dc:creator>vsergeev</dc:creator>
				<category><![CDATA[ARM]]></category>
		<category><![CDATA[JuiceBox]]></category>

		<guid isPermaLink="false">http://www.frozeneskimo.com/electronics/?p=40</guid>
		<description><![CDATA[After writing the game itself for the first time on my computer, I proceeded to clean up some of the LCD Demo Code and then port the Game of Life to the JuiceBox. It uses the whole screen as the grid of cells, and each individual pixel as a cell. The initial grid is randomly [...]]]></description>
			<content:encoded><![CDATA[<p>After writing the game itself for the first time on my computer, I proceeded to clean up some of the LCD Demo Code and then port the Game of Life to the JuiceBox. It uses the whole screen as the grid of cells, and each individual pixel as a cell. The initial grid is randomly generated (although not really random at all, it uses the very psuedo-rand() included in the LCD demo code), and then the generations pass by forever, with 5 milliseconds rest in between. Each pixel changes color (any color but black) when it is replotted, just to make them look cool.</p>
<p>Since births and deaths simultaneously occur in the Game of Life, you canâ€™t modify a grid directly when applying the three rules of the game. Originally I kept a temporary copy grid that would be checked, while the original would be modified. But, due to memory limitations on the JuiceBox itself, I had to rewrite the grids to use a more complex â€œmarked for death/birthâ€ status in the cells. Anyway, it runs perfectly, and itâ€™s pretty cool to watch.</p>
<p>Here is a picture of a sample game, near the beginning:<br />
<a href="http://www.frozeneskimo.com/electronics/wp-content/uploads/2006/01/JBGameOfLifeEnd.jpg" title="JuiceBox Game of Life, Towards the End"><img src="http://www.frozeneskimo.com/electronics/wp-content/uploads/2006/01/JBGameOfLifeEndThumb.jpg" alt="JuiceBox Game of Life, Towards the End" /></a></p>
<p>Here is it towards the end, when it is rather stable:<br />
<a href="http://www.frozeneskimo.com/electronics/wp-content/uploads/2006/01/JBGameOfLifeStart.jpg" title="JuiceBox Game of Life, Towards the End Thumb"><img src="http://www.frozeneskimo.com/electronics/wp-content/uploads/2006/01/JBGameOfLifeStartThumb.jpg" alt="JuiceBox Game of Life, Towards the End Thumb" /></a></p>
<p>If you want to try it for yourself, here is the elf file that can be downloaded with OCD Commander or similar program to your JuiceBox (given you have a JTAG emulator as well): <a href="http://www.frozeneskimo.com/electronics/wp-content/uploads/Software/gol.elf" title="JuiceBox Game of Life Elf Binary">gol.elf</a><br />
I take absolutely no responsibility for any damage this software may cause.<br />
I will post the sources shortly&#8230;</p>
<p>Next project is learning to use those buttons and I/O ports on this ARM chip.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.frozeneskimo.com/electronics/2006/01/16/juicebox-game-of-life/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Custom Code via JTAG on JuiceBox Success</title>
		<link>http://www.frozeneskimo.com/electronics/2006/01/16/custom-code-via-jtag-on-juicebox-success/</link>
		<comments>http://www.frozeneskimo.com/electronics/2006/01/16/custom-code-via-jtag-on-juicebox-success/#comments</comments>
		<pubDate>Mon, 16 Jan 2006 10:24:58 +0000</pubDate>
		<dc:creator>vsergeev</dc:creator>
				<category><![CDATA[ARM]]></category>
		<category><![CDATA[JuiceBox]]></category>

		<guid isPermaLink="false">http://www.frozeneskimo.com/electronics/?p=35</guid>
		<description><![CDATA[Shortly after I got my JTAG Wiggler working with the JuiceBox, I hunted out some homebrew code precompiled for the JuiceBox. I found it here: http://www.elinux.org/wiki/JuiceBoxCodeTest Using OCD Commander you can easily upload the code to the processorâ€™s memory through a JTAG emulator, and it will automatically set the PC register to the start of [...]]]></description>
			<content:encoded><![CDATA[<p>Shortly after I got my JTAG Wiggler working with the JuiceBox, I hunted out some homebrew code precompiled for the JuiceBox. I found it here: <a href="http://www.elinux.org/wiki/JuiceBoxCodeTest">http://www.elinux.org/wiki/JuiceBoxCodeTest </a></p>
<p>Using OCD Commander you can easily upload the code to the processorâ€™s memory through a JTAG emulator, and it will automatically set the PC register to the start of the program. All you have to do is hit go, and your program is running.</p>
<p>I played with the LCD demos, and modified the second one to print a greeting message, which I took a picture of to post here:<br />
<a href="http://www.frozeneskimo.com/electronics/wp-content/uploads/2006/01/JuiceBoxCustomCode.jpg" title="Custom Code Upload onto JuiceBox via JTAG Thumb"><img src="http://www.frozeneskimo.com/electronics/wp-content/uploads/2006/01/JuiceBoxCustomCodeThumb.jpg" alt="Custom Code Upload onto JuiceBox via JTAG Thumb" /></a></p>
<p>My next familiarization project is to port, for the first time ever, the game of life to the JuiceBox. I will have pictures of this tomorrow when the project is complete. It shouldnâ€™t be too difficult, since the LCD demo code has shows how to drive the LCD and plot pixels.</p>
<p>In addition, I want to mess with the buttons. They are located on PORTG, but I still have yet to learn how I am supposed to properly manipulate the PORT registers on this ARM chipâ€¦</p>
<p>I love JTAG and $15 ARM development boards. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.frozeneskimo.com/electronics/2006/01/16/custom-code-via-jtag-on-juicebox-success/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JTAGing JuiceBox Success</title>
		<link>http://www.frozeneskimo.com/electronics/2006/01/15/jtaging-juicebox-success/</link>
		<comments>http://www.frozeneskimo.com/electronics/2006/01/15/jtaging-juicebox-success/#comments</comments>
		<pubDate>Mon, 16 Jan 2006 07:57:19 +0000</pubDate>
		<dc:creator>vsergeev</dc:creator>
				<category><![CDATA[ARM]]></category>
		<category><![CDATA[JuiceBox]]></category>

		<guid isPermaLink="false">http://www.frozeneskimo.com/electronics/?p=32</guid>
		<description><![CDATA[After realizing where I messed up in building my Wiggler JTAG dongle, I fixed the small problems and connected it back to the computer. I ran jtag (from openwince project) and detectâ€™d the Wigglerâ€¦ it worked flawlessly. Here was the output: jtag> cable parallel 0Ã—378 WIGGLER Initializing Macraigor Wiggler JTAG Cable on parallel port at [...]]]></description>
			<content:encoded><![CDATA[<p>After realizing where I messed up in building my Wiggler JTAG dongle, I fixed the small problems and connected it back to the computer. I ran jtag (from openwince project) and detectâ€™d the Wigglerâ€¦ it worked flawlessly. Here was the output:</p>
<p>jtag> cable parallel 0Ã—378 WIGGLER<br />
Initializing Macraigor Wiggler JTAG Cable on parallel port at 0Ã—378<br />
jtag> detect<br />
IR length: 4<br />
Chain length: 1<br />
Device Id: 00011111000011110000111100001111<br />
Manufacturer: Samsung<br />
Part: s3c44b0x<br />
Stepping: 0<br />
Filename: /usr/local/share/jtag/samsung/s3c44b0x/s3c44b0x<br />
jtag></p>
<p>In addition, I ran ocdremote, which recognized the Wiggler, connected to it immediately, and setup the local TCP server for GDB to connect to. I ran the arm-elf-insight (Insight is a standalone frontend to GDB) that is packaged with the GNUARM toolchain, and connected to OCDRemote. After the connection I could view all of the juiceboxâ€™s CPU registers and internal RAM. I could also step through the program instructions.</p>
<p>Now Iâ€™m compiling jtager over cygwin so I can dump the internal RAM of the CPU and compare some of it to the chunks that are posted on the linuxhacker forumsâ€¦</p>
<p>Soon Iâ€™ll write a tutorial for integrating OCDRemote with GDB with Code::Blocks, so people can easily develop and debug all ARM7 projects through Code::Blocks. Finally, I can uninstall eclipse.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.frozeneskimo.com/electronics/2006/01/15/jtaging-juicebox-success/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Update on JuiceBox Dev</title>
		<link>http://www.frozeneskimo.com/electronics/2006/01/14/update-on-juicebox-dev/</link>
		<comments>http://www.frozeneskimo.com/electronics/2006/01/14/update-on-juicebox-dev/#comments</comments>
		<pubDate>Sun, 15 Jan 2006 04:54:23 +0000</pubDate>
		<dc:creator>vsergeev</dc:creator>
				<category><![CDATA[ARM]]></category>
		<category><![CDATA[JuiceBox]]></category>

		<guid isPermaLink="false">http://www.frozeneskimo.com/electronics/?p=27</guid>
		<description><![CDATA[After frying my last juicebox (long story), I bought another one off ebay and it recently arrived. Finally I have had some time to get it up to speed (open it up, solder the sd/mmc lines, solder the UART lines). It is working great, and for the first time I am seeing the kernel boot [...]]]></description>
			<content:encoded><![CDATA[<p>After frying my last juicebox (long story), I bought another one off ebay and it recently arrived. Finally I have had some time to get it up to speed (open it up, solder the sd/mmc lines, solder the UART lines). It is working great, and for the first time I am seeing the kernel boot messages, which I have posted here. Read on to see pictures and more information.</p>
<p><span id="more-27"></span></p>
<p>Here is a picture of my current setup:<br />
<a class="imagelink" href="http://www.frozeneskimo.com/electronics/wp-content/uploads/2006/01/juiceboxsetup.jpg" title="Juicebox Setup 01/14/06"><img id="image28" src="http://www.frozeneskimo.com/electronics/wp-content/uploads/2006/01/juiceboxsetupthumb.jpg" alt="Juicebox Setup 01/14/06" /></a></p>
<p>On the breadboard is the sparkfun sd/mmc breakout board, my own custom max232 board (this one rigged with a max3232 since juicebox operates at 3.3v). Since I&#8217;m currently stuck with a laptop that doesn&#8217;t have a serial port, I&#8217;m using a cheap serial-USB converter which apparently works fine with the juicebox UART/max3232.</p>
<p>Here is a picture of the wiring on the back of the juicebox board:<br />
<a class="imagelink" href="http://www.frozeneskimo.com/electronics/wp-content/uploads/2006/01/juiceboxback.jpg" title="JuiceBox Back Wiring 01/14/06"><img id="image30" src="http://www.frozeneskimo.com/electronics/wp-content/uploads/2006/01/juiceboxbackthumb.jpg" alt="JuiceBox Back Wiring 01/14/06" /></a></p>
<p>Here are the captured kernel messages, captured from HyperTerminal: <a href="http://www.frozeneskimo.com/electronics/JuiceBoxSerialOutput.txt">http://www.frozeneskimo.com/electronics/JuiceBoxSerialOutput.txt</a></p>
<p>For more information on JuiceBox dev, see the eLinux Wiki page on it here: <a href="http://www.elinux.org/wiki/JuiceBox">http://www.elinux.org/wiki/JuiceBox</a>. Also, check out the JuiceBox section on the Linux-Hacker forum: <a href="http://www.linux-hacker.net/cgi-bin/UltraBoard/UltraBoard.pl">http://www.linux-hacker.net/cgi-bin/UltraBoard/UltraBoard.pl</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.frozeneskimo.com/electronics/2006/01/14/update-on-juicebox-dev/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
