<?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>edeca.net</title>
	<atom:link href="http://edeca.net/wp/feed/" rel="self" type="application/rss+xml" />
	<link>http://edeca.net/wp</link>
	<description>Musings of a geek</description>
	<lastBuildDate>Sun, 05 Feb 2012 21:28:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>The ST7565 display controller</title>
		<link>http://edeca.net/wp/2012/02/the-st7565-display-controller/</link>
		<comments>http://edeca.net/wp/2012/02/the-st7565-display-controller/#comments</comments>
		<pubDate>Sun, 05 Feb 2012 20:36:18 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[electronics]]></category>
		<category><![CDATA[glcd]]></category>
		<category><![CDATA[st7565]]></category>

		<guid isPermaLink="false">http://edeca.net/wp/?p=695</guid>
		<description><![CDATA[This post covers the theory of using a graphic LCD based on the ST7565 controller. These are widely available with popular sizes of 132&#215;32 and 128&#215;64, a number cost below £10. (Image © Electronic Assembly, lcd-module.de) The tutorial follows the same path I took whilst developing a simple library for a screen I had bought. [...]]]></description>
			<content:encoded><![CDATA[<p>This post covers the theory of using a graphic LCD based on the ST7565 controller. These are widely available with popular sizes of 132&#215;32 and 128&#215;64, a number cost below £10.</p>
<p><img class="aligncenter size-full wp-image-725" title="EADOGL28B" src="http://edeca.net/wp/wp-content/uploads/2012/02/ea_dogl128b-6.jpg" alt="" width="150" height="146" /></p>
<p><em>(Image © Electronic Assembly, lcd-module.de)</em></p>
<p>The tutorial follows the same path I took whilst developing a simple library for a screen I had bought. I set myself the challenge of doing this from scratch, rather than using code from the internet.</p>
<p><span id="more-695"></span></p>
<p>Whilst this post uses a 128&#215;64 screen as an example it is equally applicable to different sizes. <em></em></p>
<h4>Pros:</h4>
<ul>
<li>Easy to interface using fewer pins than other graphic LCDs</li>
<li>Onboard voltage booster for the liquid crystal display</li>
<li>Software controlled contrast and rotation</li>
<li>Works at faster clock speeds</li>
<li>Good selection of backlight colours</li>
</ul>
<h4>Cons:</h4>
<ul>
<li>3.3v logic only (not such a problem any more)</li>
<li>In SPI mode a large buffer is required in local memory</li>
</ul>
<h2>Getting started</h2>
<p>The most important thing needed when developing a library is a good datasheet. The information provided by screen manufacturers is often lacking in detail or quality.  The datasheet I used can be <a href="http://edeca.net/downloads/electronics/ST7565R_V17_960601.pdf" target="_blank">found here</a>.</p>
<h2>Basic operation (hardware)</h2>
<p>The most basic pinout for the ST7565 is shown below.  To drive it from a microcontroller in SPI mode 5 pins are required.  All of these pins are outputs from the microcontroller and inputs to the screen.  Because it is not possible to read from the screen there is no requirement for inputs.</p>
<p><a href="http://edeca.net/wp/wp-content/uploads/2012/02/ST7565-SPI-pinout.png"><img class="aligncenter size-medium wp-image-834" title="ST7565 - SPI pinout" src="http://edeca.net/wp/wp-content/uploads/2012/02/ST7565-SPI-pinout-300x273.png" alt="" width="300" height="273" /></a></p>
<p>It is necessary to connect RESET to the microcontroller as the initialisation procedure involves toggling this pin.  This pin should not be tied high or low or it may not be possible to reset the screen correctly.</p>
<p>Depending on your GLCD module it may be necessary to connect a number of capacitors, this is discussed in the next section.</p>
<h4>Voltage boosting and regulation</h4>
<p>The ST7565 has an integrated voltage booster (charge pump) circuit that can provide the high voltages needed by the liquid crystal display. If the circuit only has a single supply such as 3.3v then the charge pump is the easiest way to power the screen. If the circuit contains a voltage source of between 9v and 12v then it is possible to reduce the number of external components needed by using this directly.</p>
<p>The internal booster can provide from 2x to 6x the input voltage depending on how capacitors are connected between the CAPxx terminals. Full details are provided on page 31 to 34 of the datasheet above. The only limitation is that the maximum voltage after boosting must not exceed Vout, which is 13.5v.</p>
<p>Many LCD specific datasheets will provide the exact capacitors required for a particular model. For some display modules these capacitors are included on the circuit board and do not need to be added.  Check the datasheet carefully!  For example, the image below is taken from the datasheet for an inexpensive model available from Mouser, the EA DOGM132-5:</p>
<p><a href="http://edeca.net/wp/wp-content/uploads/2012/02/Screen-Shot-2012-02-04-at-14.44.02.png"><img class="aligncenter size-medium wp-image-762" title="Example capacitors for an ST7565 screen" src="http://edeca.net/wp/wp-content/uploads/2012/02/Screen-Shot-2012-02-04-at-14.44.02-300x135.png" alt="" width="300" height="135" /></a></p>
<p><em>(© Electronic Assembly, lcd-module.de)</em></p>
<p>In addition to the voltage booster the ST7565 contains an integrated voltage regulator. This has 8 steps and regulates the reference voltage used to drive the liquid crystal display. It is necessary to find a value between 0 and 7 which works well with the specific hardware as this is used with the dynamic contrast feature.  Typically a &#8220;middle&#8221; value such as 3 will work with any screen.</p>
<h2>Basic operation (software)</h2>
<p>SPI mode provides an easy mechanism to drive the screen using few pins.  A single bit is written to the data pin and the clock is pulsed high then low.  The implementation of SPI by the ST7565 is fairly standard, more information can be found on the <a href="http://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus">Wikipedia SPI Bus</a> page.</p>
<p>One limitation of using the screen in SPI mode is that it only supports writing commands or data. It is not possible to read from the screen therefore it is necessary to keep a copy of the current screen data in memory on the microcontroller. The size of this software buffer can be calculated easily, there are 128 columns and 64 rows for a total of 8192 bits (1 bit per pixel for black and white). Therefore 1024 bytes in total are required to store a copy of the screen, which can be a large amount on many smaller microcontrollers.</p>
<p>With software (&#8216;bit banged&#8217;) SPI it is possible to use the screen at very fast clock speeds. On an PIC 18F I have used my screen with a 64Mhz internal oscillator and it works absolutely fine. It is possible to calculate (or simulate/measure) whether the microcontroller can exceed the ST7565 minimum clock period.</p>
<h4>Screen layout</h4>
<p>Unlike displays using the KS0108 the ST7565 has a single controller for the whole screen. There is no need to swap between the left and right in order to send commands.</p>
<p>A 128&#215;64 screen is made up of 8 pages, each of which is 8 pixels high and 132 wide. This maps nicely to the software buffer required for caching the screen contents because each page is a byte high.</p>
<p><a href="http://edeca.net/wp/wp-content/uploads/2012/02/ST7565-outline-light-pixels-pages.png"><img class="aligncenter size-medium wp-image-753" title="ST7565 - pages" src="http://edeca.net/wp/wp-content/uploads/2012/02/ST7565-outline-light-pixels-pages-300x170.png" alt="" width="300" height="170" /></a></p>
<p><em></em>It is easiest to imagine the top left of the screen as 0,0 and the bottom right as 127,63. This makes some of the maths required in software much easier.  To write data at (0,0) it is necessary to select page 0, column 0 and then set the individual bit.  In contrast the location (32,32) is in page 5.  The simplest method of writing data to the screen is to send a whole page at a time, starting from the left in column 0 and continuining to the right at column 127.</p>
<h4>Sending a command to the screen</h4>
<p>Issuing a single command to the screen is the most basic building block of the interface code.  The steps required are:</p>
<ul>
<li>Set the A0 pin low to indicate that command data is being sent</li>
<li>Set the chip select (CS) pin low</li>
<li>Send each bit of the command, starting with the <em>most significant</em> bit and working down to the <em>least significant</em></li>
<li>Set the chip select (CS) pin high, to free the bus</li>
</ul>
<p>Therefore the &#8220;display on&#8221; command (which is 0xAF or 0b10101111) should be sent as: 1, 0, 1, 0, 1, 1, 1, 1.</p>
<p>As long as the SPI timings are not violated there is no need to introduce any delays as the screen will never be &#8220;busy&#8221;.</p>
<h4>Screen initialisation</h4>
<p>Now that we can send a single command to we need to follow a number of steps to setup the screen.</p>
<ul>
<li>Strobe the RESET pin low then high, to initiate a hardware reset</li>
<li>Setup the duty cycle (either 1/7 or 1/9) depending on the physical LCD</li>
<li>Set the horizontal and vertical orientation to a known state</li>
<li>Configure the internal resistor divider which is used by the voltage regulator</li>
<li>Turn on the internal voltage booster to provide power to the LCD glass</li>
<li>Initialise the dynamic contrast to a default value</li>
<li>Reset the current display position to the top left</li>
</ul>
<p>The commands for these are a single byte except the dynamic contrast, which is explained later.  Below is an image captured from a logic analyser while the initialisation code runs.</p>
<p><a href="http://edeca.net/wp/wp-content/uploads/2012/02/ST7565-Screen-initialisation1.png"><img class="aligncenter size-medium wp-image-805" title="ST7565 - Screen initialisation" src="http://edeca.net/wp/wp-content/uploads/2012/02/ST7565-Screen-initialisation1-300x58.png" alt="" width="300" height="58" /></a></p>
<p>In this trace the following things can be seen:</p>
<ul>
<li>Command 0xA2: set the LCD bias to 1/9th</li>
<li>Command 0xA0: horizontally &#8220;normal&#8221; (not flipped)</li>
<li>Command 0xC8: vertically &#8220;flipped&#8221; (complements the command above)</li>
<li>Command 0&#215;23: the internal resistor divider set to 3 (from 0..7)</li>
<li>Command 0x2F: power control, all internal blocks ON</li>
<li>Command 0&#215;81: enter dynamic contrast mode</li>
<li>Data for the dynamic contrast mode, set to 31 (from 0..63)</li>
<li>Command 0&#215;40: go back to the top left of the display</li>
</ul>
<p>When power is first applied to the screen it is also important to clear the onboard screen memory. As it is non-volatile RAM it will start in an unknown state.</p>
<h4>Sending data to the screen</h4>
<p>The only difference between sending a command and data is the A0 pin.  When sending data the A0 pin must be high to differentiate</p>
<p>To start we send a command to reset the position to the top left corner (0,0). After this a quick trick is to write a single byte and see how it is displayed. It is important to know which way round the screen will display the data it receives, whether the &#8220;most significant bit&#8221; or &#8220;least significant bit&#8221; is displayed at the top.  The illustration below shows the output if the byte 0&#215;80 is sent four times to the screen:</p>
<p><a href="http://edeca.net/wp/wp-content/uploads/2012/02/ST7565-Basic-data.png"><img class="aligncenter size-medium wp-image-779" title="ST7565 - Basic data" src="http://edeca.net/wp/wp-content/uploads/2012/02/ST7565-Basic-data-300x190.png" alt="" width="300" height="190" /></a></p>
<p>From this it can be seen that the <em>most</em> significant bit displays at the bottom of the page.  That is the first bit we send is at the bottom, then subsequent bits work upwards toward the top of the page.  This will be important later when we try to set an individual pixel.</p>
<h4>Displaying a basic test pattern</h4>
<p>The easiest way to test if the driver code is working is to send a very basic test pattern. A quick check is to send constant bytes of 0xFF to fill the screen. If this works then variations can be tried, such as 0xF0 or 0xAA.</p>
<p>At the end of each row, after every 128 bytes, it is necessary to select the next page and move to the start of the row.  The following image is the basic test card I used to demonstrate that my display was wired up correctly.</p>
<p><a href="http://edeca.net/wp/wp-content/uploads/2012/02/IMG_0631.jpg"><img class="aligncenter size-medium wp-image-825" title="ST7565 - Test card" src="http://edeca.net/wp/wp-content/uploads/2012/02/IMG_0631-300x225.jpg" alt="" width="300" height="225" /></a></p>
<h4>Writing to specific pixels</h4>
<p>Writing specific pixels opens up a whole world of possibilities from lines, circles, 1 bit-per-pixel graphics and variable height fonts. As these graphics functions are not dependant on a specific controller or screen it is best to split them out into a separate library which is portable across any screen.  This is perhaps the most difficult portion whilst developing a library to work with any screen.</p>
<p>In order to set a specific pixel it is necessary to break the process into a number of steps:</p>
<ul>
<li> Find the corresponding byte in the software buffer</li>
<li>Calculate the bit within this byte</li>
<li>Use logical XOR (to set the bit) or AND (to clear the bit)</li>
</ul>
<p>Finding the correct byte is straightforward.  The first position in our array is at the top left of the screen.  The 128th byte in the array (Array[127]) is on the first page at the right hand side of the screen.  The next bit &#8220;wraps&#8221; to the next page, at page 1 column 1.</p>
<p><a href="http://edeca.net/wp/wp-content/uploads/2012/02/ST7565-Relationship-to-software-buffer1.png"><img class="aligncenter size-medium wp-image-842" title="ST7565 - Relationship to software buffer" src="http://edeca.net/wp/wp-content/uploads/2012/02/ST7565-Relationship-to-software-buffer1-300x192.png" alt="" width="300" height="192" /></a></p>
<p>To calculate which byte we need to use we need to divide the Y position by 8 and multiple the result by 128.  To this we add the X position, then subtract 1 (as C arrays start from 0).  The equation X + ( ( Y / 8 ) * 128 ) &#8211; 1 works well in C.  To verify this is correct:</p>
<ul>
<li>(1,1) on the screen would give 1 + ( 1 / 8 ) * 128 &#8211; 1 = 0</li>
<li>(61,52) on the screen would give 61 + ( 52 / 8 ) * 128 &#8211; 1 = 828</li>
</ul>
<p>To calculate the bit inside this byte we must remember that the 8th (most significant) bit appears at the bottom of the page.  So to write to Y location 8 we need to set the 8th bit of a byte on the first page.  To write to Y location 16 we need to write to the 8th bit of the corresponding byte on the second page.  Therefore we need the remainder after the Y position is divided by 8, which can be found using the <a href="http://en.wikipedia.org/wiki/Modulo_operation">modulo operator</a>.  This is as simple as Y % 8:</p>
<ul>
<li>(1,1) means setting 1 % 8 = the 1st bit</li>
<li>(61,49) means setting 49 % 8 = the 1st bit</li>
<li>(61,53) means setting 53 % 8 = the 5th bit</li>
</ul>
<p>It is now possible to set the correct bit inside the byte, on PIC microcontrollers this can be achieved using very efficient bit operators such as bsf or bcf.</p>
<h4>Displaying text</h4>
<p>Like many other graphic LCDs the ST7565 has no built-in font.  The quickest &amp; easiest way of displaying text on this screen is to define an 8 pixel high font. This maps directly to one page (or &#8216;line&#8217;) of the display and therefore we can use very fast instructions to copy the data from a predefined font to the right area of the screen.</p>
<p>However this limits us to a fixed height and only 8 lines of the screen. Now that we know how to set individual pixels there are much nicer ways of displaying text. Consider the following image:</p>
<p><a href="http://edeca.net/wp/wp-content/uploads/2012/02/IMG_0629.jpg"><img class="aligncenter size-medium wp-image-824" title="ST7565 - Variable size fonts" src="http://edeca.net/wp/wp-content/uploads/2012/02/IMG_0629-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>Larger fonts take up more room but can be used to provide a much nicer looking user interface for a project.  With the knowledge that we can set a specific pixel it is easy to make advanced graphics functions.  However these are separate to the ST7565 screen itself, so I will cover them in a future blog post.  Impatient readers can check my <a href="https://github.com/edeca/Electronics/blob/master/Include/graphics.h">graphics library</a> (Doxygen documentation <a href="http://edeca.net/temp/Documentation/html/graphics_8h.html">can be found here</a>).</p>
<h2>Using advanced features</h2>
<p>So far all of the features are common to all standard graphic LCDs. However there are a number of additional tricks that ST7565 based displays can offer.</p>
<h4>Inverting the screen</h4>
<p>With a single command the ST7565 can be instructed to invert the display.  This can be useful for emphasis or to make the screen easier to read in certain situations.  The command &#8220;display normal or reverse&#8221; is 0b1010011X, where X is 1 for reversed or 0 for normal.</p>
<p>The picture below shows the same font demonstration as above, but with the inverse feature turned on.</p>
<p><a href="http://edeca.net/wp/wp-content/uploads/2012/02/IMG_0626.jpg"><img class="aligncenter size-medium wp-image-823" title="ST7565 - Inverse screen" src="http://edeca.net/wp/wp-content/uploads/2012/02/IMG_0626-300x225.jpg" alt="" width="300" height="225" /></a></p>
<h4>Blacking the screen</h4>
<p>The ST7565 is capable of setting all points on the display to black without affecting the screen RAM.  Whilst it is hard to think of a situation where this might be useful the command &#8220;display all points&#8221; is a single byte and can be used to turn the display black if required.</p>
<h4>Dynamic contrast control</h4>
<p>Unlike other common graphic LCDs the contrast for the ST7565 is set by an internal resistor divider. This means that it can be set in software and altered dynamically. To change the contrast we need to send two commands. The first enters &#8220;volume mode set&#8221; and the second sets the contrast from 0..63.</p>
<p>The number of useful steps may be less than 64, on my test screen the visible steps are from 12 (very light) to 40 (very dark). Lower values are not visible as the voltage is too low, higher values make the screen completely black as there is no distinction between pixels which are off or on.</p>
<p>This feature could be used with a light sensor to dim the screen depending on ambient conditions. It can also be used to fade the screen in or out.</p>
<h4>Screen rotation and mirroring</h4>
<p>In the same way that the screen can be inverted without affecting the display data it is possible to flip the screen in either the horizontal or vertical direction.  This means that the screen can be used either way up with no changes required to the software except sending extra two commands to the screen.</p>
<p>Flipping the screen horizontally (from left to right) is achieved with the confusingly named &#8220;ADC Select&#8221; command.  Flipping the screen vertically (from top to bottom) is possible with the &#8220;COM Output Mode Select&#8221; command.  Unless you want to view the screen in a mirror it is necessary to use both commands at once!</p>
<p>As mentioned earlier the memory on the screen is actually 132 columns wide, to support a maximum screen size of 132&#215;64.  On 128 pixel wide models there is an important consideration if rotating the display.  If the screen is not rotated as the extra 4 rows are on the right hand side and not visible, as illustrated below:</p>
<p><a href="http://edeca.net/wp/wp-content/uploads/2012/02/ST7565-Normal-screen.png"><img class="aligncenter size-medium wp-image-741" title="ST7565 - Normal orientation" src="http://edeca.net/wp/wp-content/uploads/2012/02/ST7565-Normal-screen-300x202.png" alt="" width="300" height="202" /></a><em class="aligncenter size-medium wp-image-741" title="ST7565 - Normal orientation"></em></p>
<p>&nbsp;</p>
<p>When the screen is rotated the controller outputs these columns in the opposite order, <em>starting with the last column</em>.  Therefore the unused 4 columns from the screen memory are output first, leaving an empty space on the left hand side.</p>
<p>&nbsp;</p>
<p><a href="http://edeca.net/wp/wp-content/uploads/2012/02/ST7565-Rotated-screen.png"><img class="aligncenter size-medium wp-image-742" title="ST7565 - Rotated screen" src="http://edeca.net/wp/wp-content/uploads/2012/02/ST7565-Rotated-screen-300x202.png" alt="" width="300" height="202" /></a><em></em></p>
<p>In order fix this it is necessary to keep track in software of whether the screen is rotated or not.  When it is rotated the column address should be incremented by 4 each time a new line is sent to the screen, skipping the extra columns which would otherwise be displayed.</p>
<h2>Improving efficiency</h2>
<p>Refreshing the screen involves sending the entire local buffer to the screen RAM. If only a few changes have been made then this is a very inefficient way to update the screen.</p>
<p>It would be possible to send each individual write to the screen, simply by copying the single byte that has changed each time a pixel is written. However this is inefficient if more than a single bit (or pixel) is set in the same byte in subsequent operations. Changes to the screen would also be very visible at slower speeds.</p>
<p>As the screen has 8 pages the most efficient method on a small microcontroller is to send only the pages which have changed. Each time a pixel is set or cleared the corresponding page in the local buffer is marked as &#8216;dirty&#8217;. When it comes to refreshing the screen only the dirty pages are transferred.</p>
<p><a href="http://edeca.net/wp/wp-content/uploads/2012/02/ST7565-Improving-efficiency.png"><img class="aligncenter size-medium wp-image-746" title="ST7565 - Improving efficiency" src="http://edeca.net/wp/wp-content/uploads/2012/02/ST7565-Improving-efficiency-300x175.png" alt="" width="300" height="175" /></a><em></em></p>
<p>In the example above only pages 2 and 5 have had changes made.  Therefore these will be sent to the screen, which takes 1/4 of the time as sending all 8 pages.</p>
<p>The screen could be subdivided into even smaller regions, for example 16 half pages. The trade-off of extra code each time a pixel is set and the reduced bus time sending data should be considered carefully.</p>
<p>&nbsp;</p>
<h3>Verifying speeds</h3>
<p>Above I commented that it was possible to run a PIC at 64Mhz and not violate the SPI timings.  The important values are shown in Table 28 of the datasheet:</p>
<p><a href="http://edeca.net/wp/wp-content/uploads/2012/02/ST7565-SPI-timings.png"><img class="aligncenter size-medium wp-image-784" title="ST7565 - SPI timings" src="http://edeca.net/wp/wp-content/uploads/2012/02/ST7565-SPI-timings-300x116.png" alt="" width="300" height="116" /></a></p>
<p>We are interested in Tscyc, Tshw and Tslw.  These relate to the total clock cycle, the HIGH portion of the cycle and the LOW portion respectively.  The overall clock pulse must be <em>at least</em> 50ns and the high and low portions must be <em>at least</em> 25ns each.</p>
<h4>Crunching the numbers</h4>
<p>Assume that the SPI code turns ON the clock pin and then OFF again immediately in 2 instructions.  The pin will be HIGH at the end of the first instruction and LOW again after the second, therefore it is only HIGH for the period of 1 instruction.</p>
<p>On the PIC 12/16/18 family of microcontrollers each instruction takes 4 cycles.  At 64Mhz this means that each instruction takes 1/(64000000/4) seconds, or 62.5ns.  From this we can expect that the HIGH period of the clock pulse should be about 62.5ns, easily within the required timings.</p>
<h4>Checking with a logic analyser</h4>
<p>It is also possible to measure and see how long the pulse lasts on real hardware.  The screenshot below shows the HIGH portion of the clock pulse being measured, this is the shortest part of the cycle.  The PIC being used is an 18F25K22 running at 64Mhz.  The code toggles the pin ON and OFF in two instructions.</p>
<p><a href="http://edeca.net/wp/wp-content/uploads/2012/02/screenshot3.png"><img class="aligncenter size-medium wp-image-788" title="ST7565 - Verifying the clock pulse" src="http://edeca.net/wp/wp-content/uploads/2012/02/screenshot3-300x193.png" alt="" width="300" height="193" /></a></p>
<p>Remember that it must be at least 25ns long in order to be acceptable.  The measurement shows 41.7ns, which is shorter than calculated but still acceptable.  A number of reasons could produce the difference between our calculation and the physical measurement:</p>
<ul>
<li>The resolution of the logic analyser (24Mhz in this example) might not be sufficient for the measurement.</li>
<li>Setting or clearing bits in hardware might not take the entire 4 cycles.</li>
<li>The PIC might not be running at exactly 64Mhz due to instability of the oscillator or PLL.</li>
</ul>
<p>&nbsp;</p>
<h2>See also</h2>
<p>If you are interested in using a ST7565 based screen in an Arduino project then you should check out <a href="http://www.ladyada.net/learn/lcd/st7565.html" target="_blank">Ladyada&#8217;s tutorial</a> on Adafruit.  My <a href="https://github.com/edeca/Electronics/blob/master/Include/st7565.h">C library is available</a> which was designed for PIC 18F parts with HiTech C.  It would be trivial to change for another compiler or chip.</p>
]]></content:encoded>
			<wfw:commentRss>http://edeca.net/wp/2012/02/the-st7565-display-controller/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Eagle outline for the Evatron PC00 series enclosure</title>
		<link>http://edeca.net/wp/2011/12/eagle-outline-for-the-evatron-pc00-series-enclosure/</link>
		<comments>http://edeca.net/wp/2011/12/eagle-outline-for-the-evatron-pc00-series-enclosure/#comments</comments>
		<pubDate>Sun, 11 Dec 2011 21:35:54 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[eagle]]></category>
		<category><![CDATA[electronics]]></category>
		<category><![CDATA[enclosures]]></category>

		<guid isPermaLink="false">http://edeca.net/wp/?p=687</guid>
		<description><![CDATA[I found a neat plastic enclosure with a battery compartment that I plan on using for a current project. It is made by Evatron and comes from the PC00 series (I picked a PC003N). Below is a ZIP file containing the case drawn in Eagle to measurements from the datasheet. A dimension layer is included [...]]]></description>
			<content:encoded><![CDATA[<p>I found a neat plastic enclosure with a battery compartment that I plan on using for a current project.  It is made by Evatron and comes from the PC00 series (I picked <a href="http://tinyurl.com/c8j3d2n">a PC003N</a>).</p>
<p>Below is a ZIP file containing the case drawn in Eagle to measurements from the datasheet.  A dimension layer is included that makes the most of the internal space.<br />
<a href="http://edeca.net/wp/wp-content/uploads/2011/12/Evatron-PC00-series.png"><img src="http://edeca.net/wp/wp-content/uploads/2011/12/Evatron-PC00-series-300x102.png" alt="" title="Evatron PC00 series" width="300" height="102" class="aligncenter size-medium wp-image-689" /></a></p>
<p class="download"><a href="http://edeca.net/downloads/electronics/Evatron PC00 series.zip">Download the Eagle board file</a> &#8211; free for any use (but credit is nice)</p>
]]></content:encoded>
			<wfw:commentRss>http://edeca.net/wp/2011/12/eagle-outline-for-the-evatron-pc00-series-enclosure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fixing vim from macports</title>
		<link>http://edeca.net/wp/2011/12/fixing-vim-from-macports/</link>
		<comments>http://edeca.net/wp/2011/12/fixing-vim-from-macports/#comments</comments>
		<pubDate>Sat, 03 Dec 2011 16:41:29 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[macbook]]></category>
		<category><![CDATA[ports]]></category>

		<guid isPermaLink="false">http://edeca.net/wp/2011/12/fixing-vim-from-macports/</guid>
		<description><![CDATA[After installing vim from MacPorts I noticed that neither the arrow keys or backspace work as expected. The solution is simple, create a ~/.vimrc file with the following contents: set nocompatible set bs=2 Reload vim and voila, insert mode behaves as I&#8217;d expect it to. Note that you don&#8217;t really need to set nocompatible, simply [...]]]></description>
			<content:encoded><![CDATA[<p>After installing vim from <a href="http://www.macports.org/" title="MacPorts">MacPorts</a> I noticed that neither the arrow keys or backspace work as expected.</p>
<p>The solution is simple, create a ~/.vimrc file with the following contents:</p>
<p><div class="codecolorer-container text twitlight" 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">set nocompatible<br />
set bs=2</div></div>
</p>
<p>Reload vim and voila, insert mode behaves as I&#8217;d expect it to.</p>
<p>Note that you don&#8217;t really need to set nocompatible, simply having a .vimrc file in your home directory does this automatically. I&#8217;ve left it in to remember the solution in future.</p>
<p>Thanks to the <a href="http://linux-journal.blogspot.com/2005/04/fix-vim-backspace-doesnt-work.html" title="BLAH">linux-journal blog</a> and the <a href="http://vim.wikia.com/wiki/Fix_arrow_keys_that_display_A_B_C_D_on_remote_shell" title="vim tips wiki">vim tips wiki</a> for the answers.</p>
]]></content:encoded>
			<wfw:commentRss>http://edeca.net/wp/2011/12/fixing-vim-from-macports/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stupid password rules</title>
		<link>http://edeca.net/wp/2011/11/stupid-password-rules/</link>
		<comments>http://edeca.net/wp/2011/11/stupid-password-rules/#comments</comments>
		<pubDate>Thu, 24 Nov 2011 20:24:11 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[jive]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://edeca.net/wp/?p=675</guid>
		<description><![CDATA[Today I forgot the password for a site I use only occasionally. This is rare, as I have a number of password schemes that I use to create a password unique to each site. After clicking the reset password link, I am confronted with the &#8220;password strength checker&#8221; below: This list of rules doesn&#8217;t fit [...]]]></description>
			<content:encoded><![CDATA[<p>Today I forgot the password for a site I use only occasionally.  This is rare, as I have a number of password schemes that I use to create a password unique to each site.  After clicking the reset password link, I am confronted with the &#8220;password strength checker&#8221; below:</p>
<p><a href="http://edeca.net/wp/wp-content/uploads/2011/11/password_strength1.png"><img src="http://edeca.net/wp/wp-content/uploads/2011/11/password_strength1.png" alt="" title="Password strength verification" width="203" height="186" class="aligncenter size-full wp-image-676" /></a></p>
<p>This list of rules doesn&#8217;t fit very well with my password scheme, primarily because what I computed in my head fails the test for uppercase characters.  </p>
<p>Using the phrase &#8220;<i>this is an unbelievably long password that would take a very long time to crack</i>&#8221; fails this rule too, as well as the tests for a number and punctuation.  I&#8217;m not suggesting that this is a good password, but it&#8217;s certainly better than &#8220;<i>aA1!bcde</i>&#8221; which passes all the rules.  These 8 characters are trivial to brute force on any modern machine even if the underlying software uses a salted hash.</p>
<p>The offending software appears to be <a href="http://www.jivesoftware.com/">Jive</a>, who perhaps need to set some more sensible defaults on their login system.</p>
]]></content:encoded>
			<wfw:commentRss>http://edeca.net/wp/2011/11/stupid-password-rules/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>dban on a USB stick</title>
		<link>http://edeca.net/wp/2011/11/dban-on-a-usb-stick/</link>
		<comments>http://edeca.net/wp/2011/11/dban-on-a-usb-stick/#comments</comments>
		<pubDate>Thu, 10 Nov 2011 12:04:12 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://edeca.net/wp/?p=668</guid>
		<description><![CDATA[After a number of unsuccessful attempts to get dban on a USB stick using unetbootin, I found the Universal USB Installer instead. This appears to do a better job, making a bootable installation from the latest preview build of dban. It helps to remove the USB stick after boot, during the &#8220;Waiting for USB devices [...]]]></description>
			<content:encoded><![CDATA[<p>After a number of unsuccessful attempts to get <a href="http://dban.org">dban</a> on a USB stick using unetbootin, I found the <a href="http://www.pendrivelinux.com/universal-usb-installer-easy-as-1-2-3/">Universal USB Installer</a> instead.  This appears to do a better job, making a bootable installation from the latest preview build of dban.</p>
<p>It helps to remove the USB stick after boot, during the &#8220;Waiting for USB devices to register&#8221; stage.  This is an issue with how dban recognises mass storage on some motherboards, rather than a problem with the USB boot.  Unfortunately it doesn&#8217;t work properly in WINE right now, presumably because it can&#8217;t find the right drives.</p>
<p>Further instructions are available on the <a href="http://www.pendrivelinux.com/install-dban-to-a-usb-flash-drive-using-windows/">pendrivelinux.com</a> homepage, but it is simple enough that you wont need them.</p>
]]></content:encoded>
			<wfw:commentRss>http://edeca.net/wp/2011/11/dban-on-a-usb-stick/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reporting a phishing site, is it worth it?</title>
		<link>http://edeca.net/wp/2011/07/reporting-a-phishing-site-is-it-worth-it/</link>
		<comments>http://edeca.net/wp/2011/07/reporting-a-phishing-site-is-it-worth-it/#comments</comments>
		<pubDate>Sun, 03 Jul 2011 21:19:18 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Computing]]></category>

		<guid isPermaLink="false">http://edeca.net/wp/?p=660</guid>
		<description><![CDATA[So I thought I was being a good internet citizen when I received the following email a week ago: Dear User; Please update to our new server click here to begin http://glacierdesign.ca/phpform/forms/form1.html Thanks and have a wonderful day. Webmaster The site looked like this: For a while I was confused, after all I run my [...]]]></description>
			<content:encoded><![CDATA[<p>So I thought I was being a good internet citizen when I received the following email a week ago:</p>
<blockquote><p>Dear User;</p>
<p>Please update to our new server click here to begin</p>
<p>http://glacierdesign.ca/phpform/forms/form1.html</p>
<p>Thanks and have a wonderful day.</p>
<p>Webmaster</p></blockquote>
<p>The site looked like this:</p>
<p><a href="http://edeca.net/wp/wp-content/uploads/2011/07/PhishingScreenshot.png"><img src="http://edeca.net/wp/wp-content/uploads/2011/07/PhishingScreenshot-300x284.png" alt="Screenshot of a phishing website" title="Phishing screenshot" width="300" height="284" class="aligncenter size-medium wp-image-661" /></a></p>
<p>For a while I was confused, after all I run my own email.  Did I really need to remind myself of my password?  And what had happened to my unlimited quota?</p>
<p>Then I figured it was obviously a <a href="http://www.microsoft.com/security/online-privacy/phishing-symptoms.aspx">phishing email</a>, so I turned to &#8220;do no evil&#8221; Google to report it.  If the site was included on their block list then users of popular browsers would automatically receive a warning if they tried to go to it.</p>
<p>I tried using the <a href="http://www.google.com/safebrowsing/report_phish/">Google report phishing form</a>, even filling in the headers and body of the email in the comments box.  Unfortunately, a week later the site is still up and presumably conning less savvy users.</p>
<p>Surprised by Google I&#8217;ve just tried the <a href="https://badwarebusters.org/community/submit">badwarebusters.org report feature</a>, let&#8217;s hope it works slightly more efficiently!</p>
]]></content:encoded>
			<wfw:commentRss>http://edeca.net/wp/2011/07/reporting-a-phishing-site-is-it-worth-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding fake ethernet headers to pcap files</title>
		<link>http://edeca.net/wp/2011/06/adding-fake-ethernet-headers-to-pcap-files/</link>
		<comments>http://edeca.net/wp/2011/06/adding-fake-ethernet-headers-to-pcap-files/#comments</comments>
		<pubDate>Mon, 20 Jun 2011 10:32:48 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[pcap]]></category>
		<category><![CDATA[tcp]]></category>

		<guid isPermaLink="false">http://edeca.net/wp/?p=652</guid>
		<description><![CDATA[Occasionally I see packet captures which have been saved as Raw IP, which can really mess up many of the tools developed to deal with pcap. Anything based on libnids, including the Perl module I maintain, cannot deal with it and will produce no (or bizarre) results. Wireshark displays these captures just fine, with &#8220;Raw [...]]]></description>
			<content:encoded><![CDATA[<p>Occasionally I see packet captures which have been saved as Raw IP, which can really mess up many of the tools developed to deal with pcap.  Anything based on libnids, including the Perl module I maintain, cannot deal with it and will produce no (or bizarre) results.  Wireshark displays these captures just fine, with &#8220;Raw packet data &#8211; no link information available&#8221; just above the IP layer.</p>
<p>There are many situations where packet capture will lack the ethernet header for a good reason, but if you simply want to run it through other tools that deal only with IP and above then adding a fake header is a viable choice.  </p>
<p>Fortunately, adding a &#8220;fake&#8221; ethernet header to these pcap files using <a href="http://tcpreplay.synfin.net/wiki/tcprewrite">tcprewrite</a> (part of the tcpreplay suite) is simple:</p>
<div class="codecolorer-container text twitlight" 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">$ tcprewrite --dlt=enet --enet-dmac=00:11:22:33:44:55 --enet-smac=66:77:88:99:AA:BB --infile=input.pcap --outfile=output.pcap</div></div>
<p>Overriding the output data layer type is essential, as is providing the ethernet MAC addresses of the two endpoints.  That&#8217;s all there is to it.</p>
<p>tcprewrite is available as part of the Debian package <a href="http://packages.debian.org/squeeze/tcpreplay">tcpreplay</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://edeca.net/wp/2011/06/adding-fake-ethernet-headers-to-pcap-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Humax HDR-FOX T2</title>
		<link>http://edeca.net/wp/2011/04/humax-hdr-fox-t2/</link>
		<comments>http://edeca.net/wp/2011/04/humax-hdr-fox-t2/#comments</comments>
		<pubDate>Sun, 24 Apr 2011 20:43:52 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[freeview]]></category>
		<category><![CDATA[hd]]></category>
		<category><![CDATA[humax]]></category>

		<guid isPermaLink="false">http://edeca.net/wp/?p=646</guid>
		<description><![CDATA[I have just purchased a Humax HDR-FOX T2 as an upgrade to my trusty old PVR-9200, after my area was enabled for Freeview HD. What follows is a tiny review based on my experiences. On first view the interface is much nicer, the new on-screen display packs more information into the same space without compromising [...]]]></description>
			<content:encoded><![CDATA[<p>I have just purchased a Humax HDR-FOX T2 as an upgrade to my trusty old PVR-9200, after my area was enabled for Freeview HD.  What follows is a tiny review based on my experiences.<br />
<span id="more-646"></span><br />
On first view the interface is much nicer, the new on-screen display packs more information into the same space without compromising how easy it is to use.  The remote is less intuitive than the 9200 even though it is very similar, but I have a universal remote that I use instead.  </p>
<p>The screen on the front of the unit is slightly easier to read but scrolls, which can be distracting but my wife appreciates the feature that sorts recordings into folders.  No more will she need to scroll past pages of Family Guy to view her own choice of recorded TV!</p>
<p>After a few days use I am very pleased.  HD channels have perceptibly better image quality, even though I only have a &#8220;HD ready&#8221; (720p) TV.  The Indiana Jones film series was as good as DVD, with 5.1 and nice crisp images.  Later Live.. With Jools Holland is simply superb with a decent surround sound mix straight from the studio.  If the BBC starts broadcasting more shows with surround sound of this quality I&#8217;ll be very happy*!  </p>
<p>ITV HD could happily be swapped with Film4 or another Channel 4 variety as it seems to be a waste of bandwidth.</p>
<p>I haven&#8217;t yet tried media streaming from the network and there hasn&#8217;t been a Formula 1 Grand Prix since I bought it, which was one of the biggest selling factors.  Perhaps an update will follow if either of these disappoint.</p>
<p>The Humax portal needs some more work, whilst iPlayer is very smooth there aren&#8217;t very many other options yet.  In addition I am unsure if the &#8220;record two, watch another&#8221; is the same as the older 9200.  It seems that if two channels are recording then you can only watch a previously recorded programme.  I&#8217;ll edit this post if it turns out that assumption is wrong.</p>
<p>In summary this is clearly a worthwhile upgrade, even at £300.</p>
<p>* &#8211; Please note BBC: I specifically exclude The One Show.</p>
]]></content:encoded>
			<wfw:commentRss>http://edeca.net/wp/2011/04/humax-hdr-fox-t2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BatchPCB</title>
		<link>http://edeca.net/wp/2011/04/batchpcb/</link>
		<comments>http://edeca.net/wp/2011/04/batchpcb/#comments</comments>
		<pubDate>Sun, 17 Apr 2011 20:37:27 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[batchpcb]]></category>
		<category><![CDATA[pcb]]></category>

		<guid isPermaLink="false">http://edeca.net/wp/?p=641</guid>
		<description><![CDATA[I have previously raved about BatchPCB, a low cost prototyping service run by SparkFun out of the USA. However, it seems that you now can&#8217;t select shipping to the UK (and perhaps other parts of Europe) and they don&#8217;t seem to be doing too much about it. I emailed a few weeks ago and have [...]]]></description>
			<content:encoded><![CDATA[<p>I have previously raved about <a href="http://batchpcb.com">BatchPCB</a>, a low cost prototyping service run by SparkFun out of the USA.  However, it seems that you now can&#8217;t select shipping to the UK (and perhaps other parts of Europe) and they don&#8217;t seem to be doing too much about it.  </p>
<p>I emailed a few weeks ago and have received no reply, so all I have to go on is a few posts <a href="http://forum.sparkfun.com/viewtopic.php?f=16&#038;t=26198">on</a> <a href="http://forum.sparkfun.com/viewtopic.php?f=16&#038;t=25511&#038;start=15">their</a> <a href="http://forum.sparkfun.com/viewtopic.php?f=16&#038;t=26962">forums</a> which confirm I&#8217;m not the only one experiencing the issue.</p>
<p>So BatchPCB, unless you can get this fixed I&#8217;m afraid I&#8217;ll be seeking an alternative.  Comments suggesting other cheap PCB fabrication houses welcome, I&#8217;ll probably try <a href="http://dorkbotpdx.org/wiki/pcb_order">DorkbotPDX</a> first.</p>
]]></content:encoded>
			<wfw:commentRss>http://edeca.net/wp/2011/04/batchpcb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using the Razor view engine with S#arp architecture</title>
		<link>http://edeca.net/wp/2011/03/using-the-razor-view-engine-with-sarp-architecture/</link>
		<comments>http://edeca.net/wp/2011/03/using-the-razor-view-engine-with-sarp-architecture/#comments</comments>
		<pubDate>Sat, 12 Mar 2011 16:37:34 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[mvc]]></category>
		<category><![CDATA[razor]]></category>
		<category><![CDATA[sharp architecture]]></category>

		<guid isPermaLink="false">http://edeca.net/wp/?p=619</guid>
		<description><![CDATA[Whilst the Sharp Architecture maintainers have little interest in Razor (see here), I have been using it recently and like the syntax. Swapping out a default project to use Razor instead of (or in addition to) the default engine isn&#8217;t too difficult. Enabling the view engine In Global.asax, find the few lines below in Application_Start(): [...]]]></description>
			<content:encoded><![CDATA[<p>Whilst the Sharp Architecture maintainers have little interest in Razor (<a href="http://blog.sharparchitecture.net/post/Sharp-Architecture-Road-Map.aspx#id_00d1fece-196d-42bf-bd1e-5246391c881b">see here</a>), I have been using it recently and like the syntax.</p>
<p>Swapping out a default project to use Razor instead of (or in addition to) the default engine isn&#8217;t too difficult.</p>
<h3>Enabling the view engine</h3>
<p>In <tt>Global.asax</tt>, find the few lines below in <tt>Application_Start()</tt>:</p>
<div class="codecolorer-container csharp twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">ViewEngines<span style="color: #008000;">.</span><span style="color: #0000FF;">Engines</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Clear</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
ViewEngines<span style="color: #008000;">.</span><span style="color: #0000FF;">Engines</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Add</span><span style="color: #008000;">&#40;</span><a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> AreaViewEngine<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></div>
<p>We need to register Razor here, by adding the line below:</p>
<div class="codecolorer-container csharp twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">ViewEngines<span style="color: #008000;">.</span><span style="color: #0000FF;">Engines</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Add</span><span style="color: #008000;">&#40;</span><a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> RazorViewEngine<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></div>
<p>If you do not plan on using the default view engine then you can comment the existing line and remove all the <tt>.aspx</tt> files from the Views directory.</p>
<h3>Configuring the default layout</h3>
<p>Create an empty file called <tt>_ViewStart.cshtml</tt> in the root of your Views folder:</p>
<div class="codecolorer-container text twitlight" 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">@{<br />
Layout = &quot;~/Views/Shared/_Layout.cshtml&quot;;<br />
}</div></div>
<p>This code runs before any other view code in this directory or below and sets the default layout so you don&#8217;t have to set it manually in every view (see the <a href="http://www.asp.net/learn/whitepapers/mvc3-release-notes">MVC3 release notes</a> for more information).</p>
<h3>Create a basic template</h3>
<p>Lastly we need the layout which was referenced above, created as <tt>Views/Shared/_Layout.cshtml</tt>.  You could copy and paste this from a new MVC Razor application, which is what I did to end up with the template below:</p>
<div class="codecolorer-container html4strict twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:500px;"><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #00bbdd;">&lt;!DOCTYPE html&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/html.html"><span style="color: #000000; font-weight: bold;">html</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/head.html"><span style="color: #000000; font-weight: bold;">head</span></a>&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/title.html"><span style="color: #000000; font-weight: bold;">title</span></a>&gt;</span>MyApp - @ViewBag.Title<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/title.html"><span style="color: #000000; font-weight: bold;">title</span></a>&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/link.html"><span style="color: #000000; font-weight: bold;">link</span></a> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;@Url.Content(&quot;</span>~<span style="color: #66cc66;">/</span><span style="color: #000066;">Content</span><span style="color: #66cc66;">/</span>Site.css<span style="color: #ff0000;">&quot;)&quot;</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;@Url.Content(&quot;</span>~<span style="color: #66cc66;">/</span>Scripts<span style="color: #66cc66;">/</span>jquery-1.4.4.min.js<span style="color: #ff0000;">&quot;)&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/head.html"><span style="color: #000000; font-weight: bold;">head</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/body.html"><span style="color: #000000; font-weight: bold;">body</span></a>&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;page&quot;</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;header&quot;</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;title&quot;</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/h1.html"><span style="color: #000000; font-weight: bold;">h1</span></a>&gt;</span>MyApp<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/h1.html"><span style="color: #000000; font-weight: bold;">h1</span></a>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;main&quot;</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; @RenderBody()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;footer&quot;</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/body.html"><span style="color: #000000; font-weight: bold;">body</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/html.html"><span style="color: #000000; font-weight: bold;">html</span></a>&gt;</span></div></div>
<h3>Conclusion</h3>
<p>This is all that should be necessary to enable Razor and start to return basic views from your controllers.  From here on you can create views just like in the MVC3 tutorials.</p>
]]></content:encoded>
			<wfw:commentRss>http://edeca.net/wp/2011/03/using-the-razor-view-engine-with-sarp-architecture/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

