<?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/"
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>BMF's blog &#187; Sudoku Solving Robot</title>
	<atom:link href="http://borja.wordpress.com/category/sudoku-solving-robot/feed/" rel="self" type="application/rss+xml" />
	<link>http://borja.wordpress.com</link>
	<description>Just another boring blog</description>
	<lastBuildDate>Mon, 30 Jun 2008 18:43:48 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='borja.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/cebd4b16f6efc0d5de3d1aac6fbf3ff7?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>BMF's blog &#187; Sudoku Solving Robot</title>
		<link>http://borja.wordpress.com</link>
	</image>
			<item>
		<title>Solving the sudoku</title>
		<link>http://borja.wordpress.com/2008/06/10/solving-the-sudoku/</link>
		<comments>http://borja.wordpress.com/2008/06/10/solving-the-sudoku/#comments</comments>
		<pubDate>Tue, 10 Jun 2008 21:05:05 +0000</pubDate>
		<dc:creator>iambmf</dc:creator>
				<category><![CDATA[Sudoku Solving Robot]]></category>

		<guid isPermaLink="false">http://borja.wordpress.com/?p=34</guid>
		<description><![CDATA[I know you were eager to taste some source code, so here you have a first version of the solver.
To try it, just follow the steps described in the post below (PIC Simulator, Assembler, Assemble &#38; Load, Run).
To verify it works, you take a look at the status of the GPRs, and if you remember [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=borja.wordpress.com&blog=3398864&post=34&subd=borja&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I know you were eager to taste some source code, so <a href="http://bmf.veloren.com/files/sudokuv1.asm">here you have a first version of the solver</a>.<br />
To try it, just follow the steps described <a href="http://borja.wordpress.com/2008/06/10/hello-programmer/">in the post below</a> (PIC Simulator, Assembler, Assemble &amp; Load, Run).</p>
<p>To verify it works, you take a look at the status of the GPRs, and if you remember what was said <a href="http://borja.wordpress.com/2008/05/07/the-data-memory-map/">here</a>, you&#8217;ll know if it has properly solved the sudoku or not.</p>
<p>The sudoku it solves is defined by the few hundred lines of code enclosed in the region &#8217;sudoku input&#8217;.<br />
If you want to try another sudoku, just do <a href="http://borja.wordpress.com/2008/05/11/sudokusweb-to-asm/">what needs to be done</a>.</p>
<p>This is a first version of the solver, and managed to solve &#8216;very easy&#8217;, &#8216;easy&#8217;, &#8216;medium&#8217; and some &#8216;hard&#8217; sudokus of those at <a href="http://www.sudokusweb.com/">this site</a>. It did solve an &#8216;expert&#8217; one , too. We are currently working on an improved version.</p>
<p>The following flowchart shows the strategy the program uses in order to solve the sudokus:<br />
<a href="http://borja.files.wordpress.com/2008/06/flowchart-esquema-2c2ba.png"><img src="http://borja.files.wordpress.com/2008/06/flowchart-esquema-2c2ba.png?w=47&#038;h=300" alt="" width="47" height="300" class="aligncenter size-medium wp-image-35" /></a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/borja.wordpress.com/34/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/borja.wordpress.com/34/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/borja.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/borja.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/borja.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/borja.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/borja.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/borja.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/borja.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/borja.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/borja.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/borja.wordpress.com/34/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=borja.wordpress.com&blog=3398864&post=34&subd=borja&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://borja.wordpress.com/2008/06/10/solving-the-sudoku/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3a168c9c1475179ad22d1a5cbfb7f89c?s=96&#38;d=identicon" medium="image">
			<media:title type="html">iambmf</media:title>
		</media:content>

		<media:content url="http://borja.files.wordpress.com/2008/06/flowchart-esquema-2c2ba.png?w=47" medium="image" />
	</item>
		<item>
		<title>Hello, programmer</title>
		<link>http://borja.wordpress.com/2008/06/10/hello-programmer/</link>
		<comments>http://borja.wordpress.com/2008/06/10/hello-programmer/#comments</comments>
		<pubDate>Tue, 10 Jun 2008 19:05:16 +0000</pubDate>
		<dc:creator>iambmf</dc:creator>
				<category><![CDATA[Sudoku Solving Robot]]></category>

		<guid isPermaLink="false">http://borja.wordpress.com/?p=30</guid>
		<description><![CDATA[You&#8217;ve seen that we have already used some PICs (that colour sensor video some posts ago?), so we have programmed them. You&#8217;ve seen, too, that we have made a program (in Perl) that generates some assembly code to load the information of a sudoku into memory.
But, we haven&#8217;t really got into programming yet, have we?
Since [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=borja.wordpress.com&blog=3398864&post=30&subd=borja&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>You&#8217;ve seen that we have already used some PICs (that colour sensor video some posts ago?), so we have programmed them. You&#8217;ve seen, too, that we have made a program (in Perl) that generates some assembly code to load the information of a sudoku into memory.</p>
<p>But, we haven&#8217;t really got into programming yet, have we?</p>
<p>Since we have already coded a first version of our sudoku solving program (and a second version too, actually), the time for a &#8217;source code&#8217;-post is not far. But before that, let&#8217;s get ready to code!<br />
In this post, we&#8217;ll explain how to set some tools up to ease the coding process.</p>
<p>Firstly, we will need <a href="http://www.oshonsoft.com/pic.html">PIC Simulator</a> to test our programs. Let&#8217;s explain a bit how it works.</p>
<p><a href="http://borja.files.wordpress.com/2008/06/picsim1.png"><img src="http://borja.files.wordpress.com/2008/06/picsim1.png?w=270&#038;h=300" alt="" width="270" height="300" class="alignnone size-medium wp-image-32" /></a></p>
<p>That&#8217;s what it looks like when you start PIC Simulator. You can select there which microcontroller you are going to be working with, and at which clock speed. Also, note the section dedicated to General Purpose Registers (GPRs).</p>
<p>If you go to Tools -&gt; Assembler, a text editor will open. Here&#8217;s where you are supposed to write the code. Or you can File -&gt; Open another .asm file. Then, Tools -&gt; Assemble &amp; Load and the program gets loaded and ready to be run.</p>
<p>At this point, one basically uses Simulation and Rate tabs at the main window of the program.<br />
The breakpoints manager (Tools -&gt; Breakpoints Manager) is also very helpful (particularly, if you are bug-hunting). This is how it looks:</p>
<p><a href="http://borja.files.wordpress.com/2008/06/picsim2.png"><img src="http://borja.files.wordpress.com/2008/06/picsim2.png?w=300&#038;h=179" alt="" width="300" height="179" class="alignnone size-medium wp-image-33" /></a></p>
<p>So far, so good. But the editor that comes with PIC Simulator kind of sucks, and you do realize that when you are writing a program with many lines of code.</p>
<p>We didn&#8217;t like it&#8217;s poor color-coding, or the fact that it didn&#8217;t have code regions. So we decided to move on to an editor that had it all: <a href="http://notepad-plus.sourceforge.net">Notepad++</a>.</p>
<p>It&#8217;s a great text editor and, best of all, allows you to define your own languages (user defined languages, yay!).<br />
So we defined a PIC16F language, and that way we had colour coding that we liked, and regions! (They start with the keyword &#8216;;region&#8217; and end with &#8216;;endregion&#8217;)</p>
<p>If you want to use yourself this language with Notepad++, you just have to download <a href="http://bmf.veloren.com/files/userDefineLang.xml">the userDefineLange.xml file</a> and paste it into the folder that opens when you type &#8216;%APPDATA%\Notepad++&#8217; and press OK at Start-&gt;Run.</p>
<p>Well, I think that&#8217;s all. You learnt how to use the basic functionality on PIC Simulator and you have a powerful editor to program in. Next, we&#8217;ll give you some source code to play around. Later dudes and dudettes!</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/borja.wordpress.com/30/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/borja.wordpress.com/30/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/borja.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/borja.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/borja.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/borja.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/borja.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/borja.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/borja.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/borja.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/borja.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/borja.wordpress.com/30/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=borja.wordpress.com&blog=3398864&post=30&subd=borja&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://borja.wordpress.com/2008/06/10/hello-programmer/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3a168c9c1475179ad22d1a5cbfb7f89c?s=96&#38;d=identicon" medium="image">
			<media:title type="html">iambmf</media:title>
		</media:content>

		<media:content url="http://borja.files.wordpress.com/2008/06/picsim1.png?w=270" medium="image" />

		<media:content url="http://borja.files.wordpress.com/2008/06/picsim2.png?w=300" medium="image" />
	</item>
		<item>
		<title>SudokusWeb to asm!</title>
		<link>http://borja.wordpress.com/2008/05/11/sudokusweb-to-asm/</link>
		<comments>http://borja.wordpress.com/2008/05/11/sudokusweb-to-asm/#comments</comments>
		<pubDate>Sun, 11 May 2008 12:06:39 +0000</pubDate>
		<dc:creator>iambmf</dc:creator>
				<category><![CDATA[Sudoku Solving Robot]]></category>

		<guid isPermaLink="false">http://borja.wordpress.com/?p=27</guid>
		<description><![CDATA[When we started working on our sudoku solving assembly (PIC16F648A) program we found we needed a simple way to load the initial data of the sudoku (in order to have something to solve!).
(For those who have read the post &#8220;The Data Memory Map&#8221;, the following will make more sense)
Loading the initial data of the sudoku [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=borja.wordpress.com&blog=3398864&post=27&subd=borja&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>When we started working on our sudoku solving assembly (PIC16F648A) program we found we needed a simple way to load the initial data of the sudoku (in order to have something to solve!).</p>
<p>(For those who have read the post <a href="http://borja.wordpress.com/2008/05/07/the-data-memory-map/">&#8220;The Data Memory Map&#8221;</a>, the following will make more sense)<br />
Loading the initial data of the sudoku basically consists of storing the input data about columns 1-3 at bank 0 (using 2 bytes per sudoku cell), moving on to bank 1, writing input data about columns 4-6, moving on to bank 2 and writing input data about columns 7-9.</p>
<p>The first time we did it manually, but that was a hell of a job. So we looked for a website that could supply us with daily sudokus, from very easy to expert, <a href="http://www.sudokusweb.com">found one</a>, and wrote a Perl program that, taking one of that site&#8217;s images as input, produces the assembly code we need as output.</p>
<p>Then we just paste this code into the part of our sudoku solving assembly program that&#8217;s destined to &#8216;input&#8217;, and voila, we can test different sudokus really easily.</p>
<p><a href="http://bmf.veloren.com/files/sudokusweb.rar">Here you can download the source code of this program, as well as an example image to test it.</a></p>
<p>By the way, the example sudoku that comes in that .rar is already solved by our program. =D<br />
Expect a post about the solver itself soon! (Among a few others hardware-related posts, yay!)</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/borja.wordpress.com/27/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/borja.wordpress.com/27/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/borja.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/borja.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/borja.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/borja.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/borja.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/borja.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/borja.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/borja.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/borja.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/borja.wordpress.com/27/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=borja.wordpress.com&blog=3398864&post=27&subd=borja&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://borja.wordpress.com/2008/05/11/sudokusweb-to-asm/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3a168c9c1475179ad22d1a5cbfb7f89c?s=96&#38;d=identicon" medium="image">
			<media:title type="html">iambmf</media:title>
		</media:content>
	</item>
		<item>
		<title>The Data Memory Map</title>
		<link>http://borja.wordpress.com/2008/05/07/the-data-memory-map/</link>
		<comments>http://borja.wordpress.com/2008/05/07/the-data-memory-map/#comments</comments>
		<pubDate>Wed, 07 May 2008 18:40:16 +0000</pubDate>
		<dc:creator>iambmf</dc:creator>
				<category><![CDATA[Sudoku Solving Robot]]></category>

		<guid isPermaLink="false">http://borja.wordpress.com/?p=26</guid>
		<description><![CDATA[The following image has been extracted from the datasheet of the PIC16F648A, as it&#8217;s the PIC we are currently using as &#8216;main brain&#8217;.

It&#8217;s main task (and the one that&#8217;s currently being coded) is to solve a given sudoku. In order to solve a sudoku, we need to store it&#8217;s data into memory. That&#8217;s what I&#8217;ll [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=borja.wordpress.com&blog=3398864&post=26&subd=borja&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>The following image has been extracted from the datasheet of the PIC16F648A, as it&#8217;s the PIC we are currently using as &#8216;main brain&#8217;.</p>
<p><img src='http://bmf.veloren.com/images/memorymap.PNG' alt='Data Memory Map of the PIC16F648' class='aligncenter' /></p>
<p>It&#8217;s main task (and the one that&#8217;s currently being coded) is to solve a given sudoku. In order to solve a sudoku, we need to store it&#8217;s data into memory. That&#8217;s what I&#8217;ll cover on this post.</p>
<p>As you can see, the data memory map is divided into 4 banks.</p>
<p>The GPRs (General Purpose Registers) are basically where you can store whatever you want to. There are three groups of GPRs (banks 0-2).<br />
Positions 70h-7Fh are globally accessible (which means they can be accessed no matter which block you are currently at), so they are great for &#8216;global variables&#8217;.</p>
<p>So yea, 3 groups of GPRs (not taking 70h-7Fh into consideration):</p>
<ul>
<li>Bank 0: 20h-6Fh</li>
<li>Bank 1: A0h-EFh</li>
<li>Bank 2: 120h-16Fh</li>
</ul>
<p>A sudoku is composed of 81 cells (9 rows and 9 columns). Each of these cells can have a value ranging from 1 to 9 (or it could be still unknown if it&#8217;s not been solved).</p>
<p>We are going to store columns 1-3 at bank 0, columns 4-6 at bank 1 and columns 7-9 at bank 2.<br />
That means 27 (81/3) cells per bank.</p>
<p>Now, what to store per cell? We are going to do it like this:<br />
2 bytes per cell.</p>
<p>First byte: each bit (let&#8217;s name them from 1 to 8) will indicate if that given number can be (or is) the value of that cell.<br />
Second byte: first bit will indicate if number 9 can be (or is) the value of that cell, and the other 7 bits will be used for other purposes (such as a flag indicating if that number has a sure value [aka one and only one of the previous bits equals 1], a flag indicating if it has removed its sure value as possible from the rest of the cells of its column/row/zone already, etc.).</p>
<p>So, for example, if a cell has a value of 3, its corresponding 2 bytes in memory will look like:</p>
<p>0010 0000 0XXX XXXX (X at the flags, since you don&#8217;t care about their values =P)</p>
<p>If a cell had a value of 9, it would look like:</p>
<p>0000 0000 1XXX XXXX</p>
<p>And so on. Also, if a cell is unknown (aka it wasn&#8217;t one of those whose value they give you at a start):</p>
<p>1111 1111 1XXX XXXX</p>
<p>So, there are 3 banks with GPRs, three columns of the sudoku will be stored at each, and each cell of the sudoku takes 2 bytes.</p>
<p>This means that we will need 2 bytes * 3 columns * 9 cells = 54 bytes for sudoku data at each memory bank.<br />
We will use:</p>
<ul>
<li>Bank 0: Positions 20h-55h</li>
<li>Bank 1: Positions A0h-D5h</li>
<li>Bank 2: Positions 120h-155h</li>
</ul>
<p>The GPRs that the sudoku itself won&#8217;t cover will be used to store temporal values (&#8216;variables&#8217;).</p>
<p>So, basically, that&#8217;s how it&#8217;ll be organized. More to come!</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/borja.wordpress.com/26/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/borja.wordpress.com/26/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/borja.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/borja.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/borja.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/borja.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/borja.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/borja.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/borja.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/borja.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/borja.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/borja.wordpress.com/26/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=borja.wordpress.com&blog=3398864&post=26&subd=borja&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://borja.wordpress.com/2008/05/07/the-data-memory-map/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3a168c9c1475179ad22d1a5cbfb7f89c?s=96&#38;d=identicon" medium="image">
			<media:title type="html">iambmf</media:title>
		</media:content>

		<media:content url="http://bmf.veloren.com/images/memorymap.PNG" medium="image">
			<media:title type="html">Data Memory Map of the PIC16F648</media:title>
		</media:content>
	</item>
		<item>
		<title>Hello PICs!</title>
		<link>http://borja.wordpress.com/2008/04/22/hello-pics/</link>
		<comments>http://borja.wordpress.com/2008/04/22/hello-pics/#comments</comments>
		<pubDate>Tue, 22 Apr 2008 22:09:09 +0000</pubDate>
		<dc:creator>iambmf</dc:creator>
				<category><![CDATA[Sudoku Solving Robot]]></category>

		<guid isPermaLink="false">http://borja.wordpress.com/?p=25</guid>
		<description><![CDATA[We are going to use PIC microcontrollers to control our robot, and we are going to program them in assembly (yay for low-level coolness and total control!).
We plan to use a PIC16F648A (256 bytes of RAM for us to use, not much, just for it to be more exciting) as the main brain. It would [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=borja.wordpress.com&blog=3398864&post=25&subd=borja&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>We are going to use <a href="http://en.wikipedia.org/wiki/PIC_microcontroller">PIC microcontrollers</a> to control our robot, and we are going to program them in assembly (yay for low-level coolness and total control!).</p>
<p>We plan to use a PIC16F648A (256 bytes of RAM for us to use, not much, just for it to be more exciting) as the main brain. It would be in charge of solving the sudoku and controlling (asking for information, and receiving information from) other, smaller PICs (12F675).</p>
<p>We had our first meeting (the trigeeks at my basement!) last Sunday, and since then we&#8217;ve started working harder!</p>
<p>Now I&#8217;m going to show you some videos so you can see some of what we have been doing. Follow the links (click on the videos) for a more detailed description of what&#8217;s going on in them.</p>
<p>Our very first test with a PIC (we had never used one before!):</p>
<p><span style="text-align:center; display: block;"><a href="http://borja.wordpress.com/2008/04/22/hello-pics/"><img src="http://img.youtube.com/vi/rsg_TXGaeYQ/2.jpg" alt="" /></a></span></p>
<p>Dealing with 7-segment displays:</p>
<p><span style="text-align:center; display: block;"><a href="http://borja.wordpress.com/2008/04/22/hello-pics/"><img src="http://img.youtube.com/vi/8p303syNobE/2.jpg" alt="" /></a></span></p>
<p>And finally, our current masterpiece in terms of hardware. A first prototype of the colour sensor that will be used to detect different pieces (1-9). Also, note that here we have two PICs working together. =)</p>
<p><span style="text-align:center; display: block;"><a href="http://borja.wordpress.com/2008/04/22/hello-pics/"><img src="http://img.youtube.com/vi/e28G3h_XevA/2.jpg" alt="" /></a></span></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/borja.wordpress.com/25/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/borja.wordpress.com/25/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/borja.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/borja.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/borja.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/borja.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/borja.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/borja.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/borja.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/borja.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/borja.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/borja.wordpress.com/25/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=borja.wordpress.com&blog=3398864&post=25&subd=borja&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://borja.wordpress.com/2008/04/22/hello-pics/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3a168c9c1475179ad22d1a5cbfb7f89c?s=96&#38;d=identicon" medium="image">
			<media:title type="html">iambmf</media:title>
		</media:content>

		<media:content url="http://img.youtube.com/vi/rsg_TXGaeYQ/2.jpg" medium="image" />

		<media:content url="http://img.youtube.com/vi/8p303syNobE/2.jpg" medium="image" />

		<media:content url="http://img.youtube.com/vi/e28G3h_XevA/2.jpg" medium="image" />
	</item>
		<item>
		<title>Movement: Decision taken</title>
		<link>http://borja.wordpress.com/2008/04/12/movement-decision-taken/</link>
		<comments>http://borja.wordpress.com/2008/04/12/movement-decision-taken/#comments</comments>
		<pubDate>Sat, 12 Apr 2008 22:26:21 +0000</pubDate>
		<dc:creator>iambmf</dc:creator>
				<category><![CDATA[Sudoku Solving Robot]]></category>

		<guid isPermaLink="false">http://borja.wordpress.com/?p=23</guid>
		<description><![CDATA[We are going to use the system they used in the checkers bot I mentioned a few posts ago.

       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=borja.wordpress.com&blog=3398864&post=23&subd=borja&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>We are going to use the system they used in the checkers bot I mentioned a few posts ago.</p>
<p><span style="text-align:center; display: block;"><a href="http://borja.wordpress.com/2008/04/12/movement-decision-taken/"><img src="http://img.youtube.com/vi/fTcM5CkdkjY/2.jpg" alt="" /></a></span></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/borja.wordpress.com/23/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/borja.wordpress.com/23/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/borja.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/borja.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/borja.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/borja.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/borja.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/borja.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/borja.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/borja.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/borja.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/borja.wordpress.com/23/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=borja.wordpress.com&blog=3398864&post=23&subd=borja&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://borja.wordpress.com/2008/04/12/movement-decision-taken/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3a168c9c1475179ad22d1a5cbfb7f89c?s=96&#38;d=identicon" medium="image">
			<media:title type="html">iambmf</media:title>
		</media:content>

		<media:content url="http://img.youtube.com/vi/fTcM5CkdkjY/2.jpg" medium="image" />
	</item>
		<item>
		<title>Movement and design</title>
		<link>http://borja.wordpress.com/2008/04/09/movement-and-design/</link>
		<comments>http://borja.wordpress.com/2008/04/09/movement-and-design/#comments</comments>
		<pubDate>Wed, 09 Apr 2008 16:59:00 +0000</pubDate>
		<dc:creator>iambmf</dc:creator>
				<category><![CDATA[Sudoku Solving Robot]]></category>

		<guid isPermaLink="false">http://borja.wordpress.com/?p=16</guid>
		<description><![CDATA[Just some thoughts.
Our robot needs to be able to move both on the x axis and the y axis in order to be able to go through the whole board. It would optimally be able to move diagonally but it&#8217;s not required.
It could either be sort of an independent vehicle that moves on the board [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=borja.wordpress.com&blog=3398864&post=16&subd=borja&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Just some thoughts.</p>
<p>Our robot needs to be able to move both on the x axis and the y axis in order to be able to go through the whole board. It would optimally be able to move diagonally but it&#8217;s not required.</p>
<p>It could either be sort of an independent vehicle that moves on the board (1), or it could move over the board, suspended on some structure (2).</p>
<p>(1) Would require cells to be quite separate, so that the robot can move among them without touching/moving them. Diagonal movement isn&#8217;t that simple to achieve. Actually, having both horizontal and vertical movement isn&#8217;t that easy to achieve either&#8230; you either need some sort of wheels that can change the direction they are facing, or have both wheels pointing horizontally and vertically, and activate only the ones needed&#8230; not too fond on that.</p>
<p>(2) Sort of the same system they use on <a href="http://www.valumatic.es/imagesdb/gruaweb.JPG">these things</a>.<br />
A friend of mine made a checkers bot some time ago, and he used that scheme, you can take a look at his robot (youtube video) <a href="http://es.youtube.com/watch?v=fTcM5CkdkjY">here</a>.</p>
<p>Option (2) is the one I will vote for. =P<br />
(Note how it uses electromagnets to pick pieces, too. Our robot should behave similarly in that aspect aswell.)</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/borja.wordpress.com/16/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/borja.wordpress.com/16/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/borja.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/borja.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/borja.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/borja.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/borja.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/borja.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/borja.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/borja.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/borja.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/borja.wordpress.com/16/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=borja.wordpress.com&blog=3398864&post=16&subd=borja&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://borja.wordpress.com/2008/04/09/movement-and-design/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3a168c9c1475179ad22d1a5cbfb7f89c?s=96&#38;d=identicon" medium="image">
			<media:title type="html">iambmf</media:title>
		</media:content>
	</item>
		<item>
		<title>Harder than we expected?</title>
		<link>http://borja.wordpress.com/2008/04/07/harder-than-we-expected/</link>
		<comments>http://borja.wordpress.com/2008/04/07/harder-than-we-expected/#comments</comments>
		<pubDate>Mon, 07 Apr 2008 20:45:41 +0000</pubDate>
		<dc:creator>iambmf</dc:creator>
				<category><![CDATA[Sudoku Solving Robot]]></category>

		<guid isPermaLink="false">http://borja.wordpress.com/?p=15</guid>
		<description><![CDATA[It&#8217;s taking us a bit to get started. 
We first thought about using Lego NXT, but oh well, we don&#8217;t really have direct access to one (even though they have some at the University but hmm&#8230;) and they are expensive, way too expensive for our limited budget. =P
So now we are going to try to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=borja.wordpress.com&blog=3398864&post=15&subd=borja&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>It&#8217;s taking us a bit to get started. </p>
<p>We first thought about using Lego NXT, but oh well, we don&#8217;t really have direct access to one (even though they have some at the University but hmm&#8230;) and they are expensive, way too expensive for our limited budget. =P</p>
<p>So now we are going to try to go the cheap way. That means using microcontrollers (I personally hadn&#8217;t used one before, and neither had my friends&#8230;).</p>
<p>We found <a href="http://www.instructables.com/id/EJ8JIPTWC9EUKIKVMA/">some sort of good introduction tutorial</a> for Atmel ATtiny2313, and there&#8217;s where we&#8217;ll start. Soon (quite a few exams arriving, oh no!).</p>
<p>So what problems will we have to face? Many. Some of them are:</p>
<ul>
<li>Movement</li>
<li>Piece detection</li>
<li>Piece picking and dropping</li>
</ul>
<p>About movement, well, we want it to be able to move both on the x and y axis, so that it can easily go through the entire board (first for an analysis of which pieces are given as initial data, and then to pick and drop the appropiate pieces on the adequate locations). </p>
<p>Piece detection? We want the robot to know what number the piece below it represents. We are thinking about using cromatic sensors.</p>
<p>Piece picking and dropping: we could have the robot physically grab pieces, or we could use an electromagnet.</p>
<p>I&#8217;ll elaborate more on those topics in future posts.</p>
<p>It&#8217;s cool that we are finding some support. Actually, whenever we tell someone about the project, they want to help. Guess it&#8217;s a charismatic robot, ours (at least in our imagination, wahey!). But really, there are a couple of guys that will be of great help, I&#8217;m sure. ^^</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/borja.wordpress.com/15/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/borja.wordpress.com/15/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/borja.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/borja.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/borja.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/borja.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/borja.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/borja.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/borja.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/borja.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/borja.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/borja.wordpress.com/15/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=borja.wordpress.com&blog=3398864&post=15&subd=borja&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://borja.wordpress.com/2008/04/07/harder-than-we-expected/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3a168c9c1475179ad22d1a5cbfb7f89c?s=96&#38;d=identicon" medium="image">
			<media:title type="html">iambmf</media:title>
		</media:content>
	</item>
		<item>
		<title>Brief introduction</title>
		<link>http://borja.wordpress.com/2008/04/06/brief-introduction/</link>
		<comments>http://borja.wordpress.com/2008/04/06/brief-introduction/#comments</comments>
		<pubDate>Sun, 06 Apr 2008 22:26:57 +0000</pubDate>
		<dc:creator>iambmf</dc:creator>
				<category><![CDATA[Sudoku Solving Robot]]></category>

		<guid isPermaLink="false">http://borja.wordpress.com/?p=7</guid>
		<description><![CDATA[Yo dudes. 
So I&#8217;m going to work with some friends (mainly jacano and minolo3ds I guess) on a robot.
We made a Guitar Hero bot a while back and enjoyed the experience, so we thought we could work on a new project and have some more geeky fun!
We want to make a sudoku solving robot. That [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=borja.wordpress.com&blog=3398864&post=7&subd=borja&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Yo dudes. </p>
<p>So I&#8217;m going to work with some friends (mainly jacano and minolo3ds I guess) on a robot.<br />
We made a Guitar Hero bot a while back and enjoyed the experience, so we thought we could work on a new project and have some more geeky fun!</p>
<p>We want to make a sudoku solving robot. That is one that solves sudokus. &gt;: D</p>
<p>So I think that counts as a brief introduction. More to come.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/borja.wordpress.com/7/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/borja.wordpress.com/7/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/borja.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/borja.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/borja.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/borja.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/borja.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/borja.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/borja.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/borja.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/borja.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/borja.wordpress.com/7/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=borja.wordpress.com&blog=3398864&post=7&subd=borja&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://borja.wordpress.com/2008/04/06/brief-introduction/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3a168c9c1475179ad22d1a5cbfb7f89c?s=96&#38;d=identicon" medium="image">
			<media:title type="html">iambmf</media:title>
		</media:content>
	</item>
	</channel>
</rss>