<?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; AVR</title>
	<atom:link href="http://www.frozeneskimo.com/electronics/category/avr/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>LC7981/HD61830 Driver for EL Backlit Samsung LCD</title>
		<link>http://www.frozeneskimo.com/electronics/2007/03/30/lc7981hd61830-driver-for-el-backlit-samsung-lcd/</link>
		<comments>http://www.frozeneskimo.com/electronics/2007/03/30/lc7981hd61830-driver-for-el-backlit-samsung-lcd/#comments</comments>
		<pubDate>Sat, 31 Mar 2007 06:47:42 +0000</pubDate>
		<dc:creator>vsergeev</dc:creator>
				<category><![CDATA[AVR]]></category>

		<guid isPermaLink="false">http://www.frozeneskimo.com/electronics/2007/03/30/lc7981hd61830-driver-for-el-backlit-samsung-lcd/</guid>
		<description><![CDATA[I&#8217;ve found the time to post this LC7981/HD61830 driver (only graphics mode implemented) and some images of this Samsung LCD I&#8217;m using. I bought the LCD off of ebay ( http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&#038;rd=1&#038;item=230070938443 ) and shortly after I wrote the driver for it from scratch. I finished this driver about a month and a half ago, but [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve found the time to post this LC7981/HD61830 driver (only graphics mode implemented) and some images of this Samsung LCD I&#8217;m using. I bought the LCD off of ebay ( <a href="http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&#038;rd=1&#038;item=230070938443">http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&#038;rd=1&#038;item=230070938443</a> ) and shortly after I wrote the driver for it from scratch. I finished this driver about a month and a half ago, but I have just been too busy lately to post anything about it till now.</p>
<p>This is will eventually be a part of my GPS project, which I will get into later next week.</p>
<p>For now, here are the specs: an EL backlit 160&#215;80 monochrome graphics LCD that supports text and graphics mode (I just coded for graphics mode and found a font/character pixel set online), controlled by an ATMega32. The LCD is driven by an LC7981/HD61830 controller (easy parallel interface). I&#8217;ll try to get the pinout up, including the EL connections with the inverter as soon as possible.</p>
<p>Pictures (no, I&#8217;m not running linux, the linux penguin just happened to be a convenient pixmap to demonstrate):<br />
<a class="imagelink" href="http://www.frozeneskimo.com/electronics/wp-content/uploads/2007/03/lcd-prototype-board.jpg" title="LCD Prototype Board"><img id="image95" src="http://www.frozeneskimo.com/electronics/wp-content/uploads/2007/03/lcd-prototype-board-thumb.jpg" alt="LCD Prototype Board" /></a><br />
<a  class="imagelink" href="http://www.frozeneskimo.com/electronics/wp-content/uploads/2007/03/lcd-closeup-flash2.jpg" title="LCD Close Up Flash<br />
 #2"><img id="image94" src="http://www.frozeneskimo.com/electronics/wp-content/uploads/2007/03/lcd-closeup-flash2-thumb.jpg" alt="LCD Close Up Flash #2" /></a><br />
<a class="imagelink" href="http://www.frozeneskimo.com/electronics/wp-content/uploads/2007/03/lcd-closeup-flash1.jpg" title="LCD Close Up Flash #1"><img id="image93" src="http://www.frozeneskimo.com/electronics/wp-content/uploads/2007/03/lcd-closeup-flash1-thumb.jpg" alt="LCD Close Up Flash #1" /></a><br />
<a class="imagelink" href="http://www.frozeneskimo.com/electronics/wp-content/uploads/2007/03/lcd-closeup-dark.jpg" title="LCD Close Up Dark"><img id="image92" src="http://www.frozeneskimo.com/electronics/wp-content/uploads/2007/03/lcd-closeup-dark-thumb.jpg" alt="LCD Close Up Dark" /></a></p>
<p>And the free source, currently coded for the ATMega32 but can be easily adapted to other uCs: <a href="http://www.frozeneskimo.com/avr-lc7981-v1.tar.gz">avr-lc7981.tar.gz</a>.</p>
<p>Alternatively, feel free to browse the images and source here: <a href="http://www.frozeneskimo.com/samsunglcd/">http://www.frozeneskimo.com/samsunglcd/</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.frozeneskimo.com/electronics/2007/03/30/lc7981hd61830-driver-for-el-backlit-samsung-lcd/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>USBasp Perf. Board Build</title>
		<link>http://www.frozeneskimo.com/electronics/2007/02/18/usbasp-perf-board-build/</link>
		<comments>http://www.frozeneskimo.com/electronics/2007/02/18/usbasp-perf-board-build/#comments</comments>
		<pubDate>Mon, 19 Feb 2007 00:04:54 +0000</pubDate>
		<dc:creator>vsergeev</dc:creator>
				<category><![CDATA[AVR]]></category>

		<guid isPermaLink="false">http://www.frozeneskimo.com/electronics/2007/02/18/usbasp-perf-board-build/</guid>
		<description><![CDATA[The computer Iâ€™m currently on (intel mac mini) doesnâ€™t have a parallel port, so I canâ€™t use the STK-200 style AVR-ISP to program/flash AVR chips. So, looking for the USB alternative, I stumbled across the USBasp. From the site, â€œUSBasp is a USB in-circuit programmer for Atmel AVR controllers. It simply consists of an ATMega48 [...]]]></description>
			<content:encoded><![CDATA[<p>The computer Iâ€™m currently on (intel mac mini) doesnâ€™t have a parallel port, so I canâ€™t use the STK-200 style AVR-ISP to program/flash AVR chips. So, looking for the USB alternative, I stumbled across the <a href="http://www.fischl.de/usbasp/">USBasp</a>. From the site, â€œUSBasp is a USB in-circuit programmer for Atmel AVR controllers. It simply consists of an ATMega48 or an ATMega8 and a couple of passive components. The programmer uses a firmware-only USB driver, no special USB controller is needed.â€</p>
<p>Itâ€™s cross-platform (Linux, Windows, Mac OS X), and since it implements USB as firmware in the AVR, it keeps the parts count pretty low.</p>
<p>Iâ€™ve gotten around to building the USBasp on a perf board, since Iâ€™m too cheap for a real pcb. I have confirmed it working on both Windows and Mac OS X (and as of today Linux too), and have used it extensively the last couple of days to write an LC7981/HD61830 driver on an ATMega32 (will post this up soon) without any problems.</p>
<p>There is also <a href="http://www.xs4all.nl/~dicks/avr/usbtiny/">USBtiny</a>, which is probably the fastest way to get up and running with USB AVR programming if you already have a parallel port STK200 clone. Like the USBasp, it implements USB entirely on the AVR firmware, but is actually more of a parallel-port to USB converter (it interfaces to an existing STK200-style AVR-ISP parallel port programmer).</p>
<p>USBasp Perf. Board Build &#8211; click for a high-res picture:<br />
<a class="imagelink" href="http://www.frozeneskimo.com/electronics/wp-content/uploads/2007/02/usbasp1.png" title="USBasp Perf Board Build"><img id="image89" src="http://www.frozeneskimo.com/electronics/wp-content/uploads/2007/02/usbasp1t.png" alt="USBasp Perf Board Build" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.frozeneskimo.com/electronics/2007/02/18/usbasp-perf-board-build/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>AVR Servo Control</title>
		<link>http://www.frozeneskimo.com/electronics/2006/06/14/avr-servo-control/</link>
		<comments>http://www.frozeneskimo.com/electronics/2006/06/14/avr-servo-control/#comments</comments>
		<pubDate>Thu, 15 Jun 2006 02:29:52 +0000</pubDate>
		<dc:creator>vsergeev</dc:creator>
				<category><![CDATA[AVR]]></category>
		<category><![CDATA[Robot]]></category>

		<guid isPermaLink="false">http://www.frozeneskimo.com/electronics/?p=64</guid>
		<description><![CDATA[Well, my two days worth of figuring out AVR timers and PWM produced a very small and clean servo driver. Today my two 5g servos arrived and I hooked up one of them to the chip. I setup a test program and it worked out of the box. If you care to see it, just [...]]]></description>
			<content:encoded><![CDATA[<p>Well, my two days worth of figuring out AVR timers and PWM produced a very small and clean servo driver. Today my two 5g servos arrived and I hooked up one of them to the chip. I setup a test program and it worked out of the box. If you care to see it, just watch this:</p>
<p><a href="http://www.frozeneskimo.com/electronics/wp-content/uploads/Videos/avrservo.avi">http://www.frozeneskimo.com/electronics/wp-content/uploads/Videos/avrservo.avi</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.frozeneskimo.com/electronics/2006/06/14/avr-servo-control/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://www.frozeneskimo.com/electronics/avrservo.avi" length="1109824" type="video/x-msvideo" />
<enclosure url="http://www.frozeneskimo.com/electronics/wp-content/uploads/Videos/avrservo.avi" length="1109824" type="video/x-msvideo" />
		</item>
		<item>
		<title>Manchester Encoding/Decoding</title>
		<link>http://www.frozeneskimo.com/electronics/2006/06/11/manchester-encodingdecoding/</link>
		<comments>http://www.frozeneskimo.com/electronics/2006/06/11/manchester-encodingdecoding/#comments</comments>
		<pubDate>Sun, 11 Jun 2006 09:36:57 +0000</pubDate>
		<dc:creator>vsergeev</dc:creator>
				<category><![CDATA[AVR]]></category>

		<guid isPermaLink="false">http://www.frozeneskimo.com/electronics/?p=63</guid>
		<description><![CDATA[Like I said in the previous post, the RF receiver will pick up junk data when the transmitter isn&#8217;t transmitting anything. This means that you need some sort of encoding or decoding method of the data to differentiate from junk in the air and actual data. This can be easily done through Manchester Encoding, which [...]]]></description>
			<content:encoded><![CDATA[<p>Like I said in the previous post, the RF receiver will pick up junk data when the transmitter isn&#8217;t transmitting anything. This means that you need some sort of encoding or decoding method of the data to differentiate from junk in the air and actual data. This can be easily done through <a href="http://en.wikipedia.org/wiki/Manchester_encoding">Manchester Encoding</a>, which was used in Ethernet until 100Base-TX came along.</p>
<p>Manchester Encoding actually halves the data rate. The encoding is extremely simple, though. If you have a 1 in your data, it will be followed by a 0, if you have a 0 in your data, it will be followed by a 1. So the ASCII letter &#8216;A&#8217;, or 0100 0001 in binary, would be encoded as 01 10 01 01 01 01 01 10.</p>
<p>This allows for easy error checking- if a bit in the received data is not followed by its inverse, you know that the data is invalid. In other words, there are an equal number of ones and zeroes in the Manchester encoded data. Of course, there is that small chance that one byte of the random junk floating around is actually properly encoded, but these bytes can be avoided with a basic protocol on top of the encoding (possibly with a checksum).</p>
<p><span id="more-63"></span></p>
<p>Tonight I coded an implementation of manchester encoding/decoding to be encapsulated by a hardware UART from scratch. It was actually really easy, but it could probably be heavily optimized with some clever bitwise operations. I made direct calls to UART send and receive routines from the Manchester Encoding and Decoding functions so I wouldn&#8217;t have to pass around variables in main() or wherever I&#8217;m calling it from. For some reason, I wanted to write my own soft bit bang&#8217;d UART implementation, so I ended up doing that too. With the exception of optimization of the delay system, it works great.</p>
<p>I tested the code with a wired serial connection, and it works perfectly. Tomorrow I&#8217;ll hook up the whole wireless setup and confirm it&#8217;s working there. Other than that, I can start working on the I2C code for the digital temperature sensor that will be on my robot. After that&#8211;servo motor control (PWM stuff).</p>
<p>Note: my application of Manchester Encoding isn&#8217;t exactly what it officially should be used for. I&#8217;m just using it to encode/decode data blocks in order to distinguish junk data from real data, which doesn&#8217;t exactly fulfill the entire purpose of Manchester Encoding. I might also write a CRC sort-of implementation and use that instead if it takes up less bandwith (which I think it should).<br />
One of the more important aspects of Manchester Encoding is that the clock can be extracted from Manchester encoded data from every other bit. Every bit in Manchester encoding is followed by its inverse, but in the electronics side of this, this means that there is a voltage level transition after every bit (1 -> 0 or 0 -> 1). One of the issues with digital communication over a wireless connection or a long distance connection is that the clock will often lose synchronization due to the lack of voltage level transitions (data might stay 1 or 0 for a prolonged period of time). Having a voltage level transition after every bit of data, however, means that the receiving end can precisely distinguish between each data bit and easily maintain synchronization during the data transfer.<br />
USART, on the other hand, only synchronizes on every start bit of the packet frame. The trade-off with the implementation that I wrote is that I can use the built-in hardware UART, instead of bothering with bit banging my own serial interface with the wireless transmitters/receivers. I&#8217;ll see how this works out and whether or not it is reliable enough to stick with. Or maybe I should just enable parity in my UART connections instead of cutting my bandwith in half with Manchester encoding?, there are a few options.</p>
<p>Anyway, here is the code that should work for most AVR devices (with a USART): <a id="p62" href="http://www.frozeneskimo.com/software/2313manchester.zip">AVR Pseudo-Manchester-Encoding with Hardware UART</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.frozeneskimo.com/electronics/2006/06/11/manchester-encodingdecoding/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
