<?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>DIY DMCole &#187; Macintosh</title>
	<atom:link href="http://www.dmcole.net/index.php/tag/macintosh/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dmcole.net</link>
	<description>Circuits, microcontrollers, LEDs, do-it-yourself style</description>
	<lastBuildDate>Wed, 09 Jun 2010 23:16:22 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Thoughts on schematics and software</title>
		<link>http://www.dmcole.net/index.php/thoughts-on-schematics-and-software/</link>
		<comments>http://www.dmcole.net/index.php/thoughts-on-schematics-and-software/#comments</comments>
		<pubDate>Sat, 15 May 2010 23:15:50 +0000</pubDate>
		<dc:creator>dmcole</dc:creator>
				<category><![CDATA[Musing]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[DipTrace]]></category>
		<category><![CDATA[Macintosh]]></category>
		<category><![CDATA[McCad]]></category>

		<guid isPermaLink="false">http://www.dmcole.net/?p=262</guid>
		<description><![CDATA[Last July I wrote about using Adobe Illustrator to design the schematics I publish here and why I prefer it (you can read that post here). In recent weeks I&#8217;ve come to realize two things: despite a great deal of effort on my part, I can&#8217;t really design printed circuit boards with Illustrator, and I [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Last</strong> July I wrote about using Adobe Illustrator to design the schematics I publish here and why I prefer it (you can read that post <a href="http://www.dmcole.net/index.php/its-an-led-matrix/" target="_blank">here</a>). In recent weeks I&rsquo;ve come to realize two things: despite a great deal of effort on my part, I can&rsquo;t really design printed circuit boards with Illustrator, and I had completely missed that I wasn&rsquo;t drawing <em>schematics</em>; I was drawing <em>wiring diagrams</em>.</p>
<p>Let us address the second point first: I had always wondered why, in a schematics application (such as Eagle), when you placed an integrated circuit, for example, the pins were not displayed in sequence. Pins 12-18 might be, for example, in the upper-left-hand corner, while pins 1, 2, 8 and 11 might be in the lower left-hand corner, with pins  3-7, 9 and 10, might be scattered to what seemed like the wind.</p>
<p>I have lost the actual link, but somewhere recently I read a forum posting where it was patiently explained to we non-electrical engineers, that the pins are grouped by internal logical function rather than arranged physically. Also, many integrated circuits are available in a variety of formats &ndash; through-hole and surface mount and sometimes in a variety of surface-mount formats as well, where the pin numbers are not the same.</p>
<p>So, what I have been drawing have been diagrams that make it easier for me to breadboard (or perf-board) circuits. While those are beneficial, rarely can they be used for anything else.</p>
<p>My other major gripe with schematics programs (aside from the lack of choices in the Macintosh world) was the difficulty I had in making the wires actually attach. I can&rsquo;t remember any specific applications, but I definitely remember that the large part of what turned me off to schematics applications was the actual difficulty I had in making wires connect.</p>
<p>Further, I had deluded myself into believing that I could create PCB files that could be sent to board manufacturing companies (called &ldquo;Gerber files&rdquo;) by using Illustrator. I had run across a <a href="http://swannman.wordpress.com/projects/pdf2gerb/" target="_blank">set of instructions</a> for converting Illustrator files to Gerber files and believed they would work.</p>
<p>And, after extensive experimentation, I found that they did &#8230; almost. The one part that doesn&rsquo;t work is the ability to put text onto the silkscreen layer. If I were building PCBs exclusively for myself, that wouldn&rsquo;t be a problem, but I have envisioned that the DMX/LED matrix circuit I hope to one day design will be something that I can give back to the community, and for those types of boards, you really need to indicate component positions with silkscreened text.</p>
<p>So, that was out.</p>
<p>A few weeks back I stumbled across a conversation on a forum where folks were talking about a schematics and PCB application called <a href="http://www.diptrace.com/" target="_blank">DipTrace</a>. Most of the comments were positive; there were plenty of people who said it was easy to use; it had a free version for non-profit use that topped out at 300 pins (about twice what I&#8217;d need) and it created Gerber files.</p>
<p>The only downside was that it ran under Windows (patooie!), not on the Mac. I do have an old Compaq sitting here that I use to test web sites out on and to run the Christmas lights, so I thought I could actually break down and try to use DipTrace on it.</p>
<p>I was able to go through the tutorial in about an hour and had both a schematic and a Gerber file (albeit of only seven components, but nonetheless &#8230;) to show for it.</p>
<p>I&rsquo;ve recently begun work on a new matrix circuit and rather than draw it in Illustrator, I decided to use DipTrace. I&rsquo;ll post when I have something I feel comfortable showing.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dmcole.net/index.php/thoughts-on-schematics-and-software/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>It&#8217;s an LED matrix!</title>
		<link>http://www.dmcole.net/index.php/its-an-led-matrix/</link>
		<comments>http://www.dmcole.net/index.php/its-an-led-matrix/#comments</comments>
		<pubDate>Thu, 02 Jul 2009 01:55:49 +0000</pubDate>
		<dc:creator>dmcole</dc:creator>
				<category><![CDATA[How-to]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Atmel]]></category>
		<category><![CDATA[ATTiny13]]></category>
		<category><![CDATA[DMX-512]]></category>
		<category><![CDATA[Macintosh]]></category>
		<category><![CDATA[McCad]]></category>

		<guid isPermaLink="false">http://www.dmcole.net/?p=172</guid>
		<description><![CDATA[So, I&#8217;m going to use Henne&#8217;s transceiver for an LED matrix. You coulda probably guessed, if you&#8217;d thought about it for a minute or three.
Anyway, I fell back on my &#8211; ahem &#8211; process: first, draw the circuit in Adobe Illustrator and then build it on a breadboard.
(I have been asked in the past why [...]]]></description>
			<content:encoded><![CDATA[<p><b>So,</b> I&rsquo;m going to use Henne&rsquo;s <a href="index.php/hennes-dmx-transceiver/" target="_new">transceiver</a> for an LED matrix. You coulda probably guessed, if you&rsquo;d thought about it for a minute or three.</p>
<div id="attachment_191" class="wp-caption alignright" style="width: 310px"><a href="http://www.dmcole.net/wp-content/uploads/2009/07/Hendrik-DMX-LED-matrix-schematic-v2.pdf" target="_new"><img src="http://www.dmcole.net/wp-content/uploads/2009/07/Hendrik-DMX-LED-mtrx-schem-300x195.jpg" alt="Henne&rsquo;s DMX LED matrix schematic (click to download PDF)." title="Hendrik-DMX-LED-mtrx-schem" width="300" height="195" class="size-medium wp-image-191" /></a><p class="wp-caption-text">Henne&rsquo;s DMX LED matrix schematic (click to download PDF).</p></div>
<p>Anyway, I fell back on my &ndash; ahem &ndash; <em>process</em>: first, draw the circuit in <a href="http://www.adobe.com/products/illustrator/" target="_new">Adobe Illustrator</a> and then build it on a breadboard.</p>
<p>(I have been asked in the past why I use Illustrator and not a regular schematic-drawing application such as <a href="http://www.cadsoftusa.com/" target="_new">Eagle</a> or <a href="http://www.mccad.com/" target="_new">McCad</a>. My first line of defense is the same as when I&#8217;m asked why I use <a href="http://www.adobe.com/products/indesign/" target="_new">InDesign</a> to make slides rather than use the ubiquitous <a href="http://www.microsoft.com/mac/products/PowerPoint2008/default.mspx#/themes_templates/" target="_new">Microsoft PowerPoint</a>: I use the Adobe Creative Suite on a daily basis and am something of an expert with its components. I can create a schematic [or slideshow] faster with the Adobe product than with anything else. Secondarily, I think I get a much better, graphically pleasing, schematic from Illustrator.)</p>
<p>So, there are some changes in this version of the schematic that aren&rsquo;t electronically or function-driven: instead of the 10-position DIP switch, I have substituted a 2&#215;10 header. This will save only a few cents (around 50) on the bill of materials, but will save some space on the board as well.</p>
<p>These switches signal to the ATMega8515 the DMX start channel to use. They&rsquo;re set infrequently (probably only once a holiday season, maybe less) and the user (probably someone as unsophisticated as me) needs only to shunt the correct pairs depending upon the channel. How do you calculate the DMX start address? Just Google &ldquo;<a href="http://www.google.com/search?q=dmx+dip+switch+calculator" target="_new">DMX DIP switch calculator</a>&rdquo;.</p>
<p>Also, I eliminated a couple of superfluous components, including the potentiometer, its associated resistor and the J3, J4 and J5 headers (which are now direct connections to the shift register (74HC164).</p>
<p>The additional set of goodies that makes this an LED matrix circuit are the <a href="http://www.allaboutcircuits.com/vol_4/chpt_12/1.html" target="_new">shift register</a>, serial-in, parallel-out chip (U3 &ndash; the 74HC164), which in turn drives the <a href="http://focus.ti.com/docs/prod/folders/print/uln2803a.html" target="_new">sink chip</a> (U4 &ndash; the ULN2803A). The shift-register gets us six extra wires (taking the two serial ouput lines and turning them into eight), while the sink-chip (a Darlington transistor array) allows the current load to increase to 500mA per line.</p>
<p>Otherwise, this is the exact same circuit as the <a href="index.php/hennes-dmx-transceiver/" target="_new">transceiver</a>.</p>
<p>Because I&rsquo;m overtly ambitious, I&rsquo;m going to redraw this circuit one more time &ndash; in McCad PCB-ST, so that I can make <a href="http://en.wikipedia.org/wiki/Gerber_File" target="_new">Gerber files</a> and then, onward, to a printed circuit board.</p>
<p>Woo-hoo.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dmcole.net/index.php/its-an-led-matrix/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Taking the ATMega8for an introductory spin</title>
		<link>http://www.dmcole.net/index.php/taking-the-atmega8-for-an-introductory-spin/</link>
		<comments>http://www.dmcole.net/index.php/taking-the-atmega8-for-an-introductory-spin/#comments</comments>
		<pubDate>Sat, 07 Mar 2009 21:23:53 +0000</pubDate>
		<dc:creator>dmcole</dc:creator>
				<category><![CDATA[How-to]]></category>
		<category><![CDATA[ATMega8]]></category>
		<category><![CDATA[Atmel]]></category>
		<category><![CDATA[Macintosh]]></category>
		<category><![CDATA[Microchip]]></category>
		<category><![CDATA[PICAXE]]></category>
		<category><![CDATA[USBtinyISP]]></category>

		<guid isPermaLink="false">http://www.dmcole.net/?p=18</guid>
		<description><![CDATA[In 2007 I played around with the PICAXE, a microprocessor sold by a non-profit in the United Kingdom that comes loaded with a BASIC-like interpreter (you can read more about it here and here). I built some lighthouse beacons and a railroad crossing light using the device. It had one drawback: I had to write [...]]]></description>
			<content:encoded><![CDATA[<p>In 2007 I played around with the PICAXE, a microprocessor sold by a non-profit in the United Kingdom that comes loaded with a BASIC-like interpreter (you can read more about it <a href="http://www.rev-ed.co.uk/picaxe/" target="_blank">here</a> and <a href="http://www.phanderson.com/picaxe/picaxe.html" target="_blank">here</a>). I built some lighthouse beacons and a railroad crossing light using the device. It had one drawback: I had to write the code and program the chip using, sigh, Windows.<br />
<div id="attachment_48" class="wp-caption alignright" style="width: 310px"><a href="http://www.dmcole.net/wp-content/uploads/2009/03/atmega8-sample-schematic.pdf" target="_new"><img src="http://www.dmcole.net/wp-content/uploads/2009/03/atmega8-sample-schematic-300x193.jpg" alt="Sample schematic to connect ATMega8 to 6-pin ISP (click to download PDF)" title="atmega8-sample-schematic" width="300" height="193" class="size-medium wp-image-48"  border="0" /></a><p class="wp-caption-text">Sample schematic to connect ATMega8 to 6-pin ISP (click to download PDF)</p></div></p>
<p>In 2008 I learned a little about Microchip’s PIC series of microprocessors because that was the favored chip by most of the developers in the DIY Christmas lighting world. Though I didn&#8217;t actually program PICs, I did learn how to burn HEX code into them using an ADM programmer. These too, had a drawback: you had to write the code and program the chip using, ugh, Windows.</p>
<p>Along the way, though, I heard about the AVR series of chips from <a href="http://www.atmel.com/" target="_blank">Atmel Corp.</a>, which had a distinct advantage over PICAXEn and PICs: there was a small community of people who used Macintoshes to make them go. There was a full tool-chain for programming in C (a language I had no experience in) and there were USB devices that allowed for burning the code. Well, hello, sweetheart.</p>
<p>So, somewhere along the line in 2008 I bought myself an <a href="http://www.adafruit.com/index.php?main_page=product_info&amp;products_id=46&amp;sessid=40d5826a4b87847bc855d0f28dcbee74" target="_blank">USBtinyISP</a> programmer from Adafruit Industries; today&#8217;s price in March 2009 is $22 but I think I paid a little less for it than that. I didn&#8217;t build it after I got it; the board and components sat unworking for a couple of months while I finished the Christmas lights.</p>
<p>But once the lights were up and running, I decided to get moving on learning to program an AVR in C (maybe someday I&#8217;ll tackle assembly code, but I&#8217;m really a path-of-least-resistance guy). My first step was to set up a breadboard and get a chip in a position to program.</p>
<p>And herein I ran into a small problem: I had bought a bunch of ATMega8s to learn on and lo and behold, I couldn&#8217;t find how to connect a USBtinyISP to a Mega8.</p>
<p>Through trial-and-error and posting questions on Adafruit&#8217;s <a href="http://www.ladyada.net/forums/" target="_new">forums</a>, I worked out a method to hook them together, but thought it would be worthwhile to post here not only the method, but draw up a schematic as well.</p>
<p>I should point out that for my initial set up I used a six-pin header that I soldered to six wires, which I then plugged into the breadboard; today I would advocate buying the header adapter sold by <a href="http://www.sparkfun.com/commerce/product_info.php?products_id=8508" target="_blank">Sparkfun Electronics</a>. Though initially designed to be an interface between 10-pin and six-pin headers, it has been adapted to allow you to put a row of header pins into one side that can plug directly into a breadboard. They&#8217;re only a buck, so I was forced to buy some other stuff to justify the postage <img src='http://www.dmcole.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  &#8230;</p>
<p>The code that I wrote for the ATMega8 is pretty rudimentary (it flashes a single LED) but I reproduce it here for full disclosure.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p18code2'); return false;">View Code</a> C</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p182"><td class="code" id="p18code2"><pre class="c" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/* Name: main.c
 * Author: David M. Cole
 * License: 2008-2009 Creative Commons Attribution-Noncommercial-Share Alike 3.0 U.S.
 * Target: ATMega8
 * Compiler: AVR-GCC
 */</span>
&nbsp;
<span style="color: #339933;">#include &lt;avr/io.h&gt;									/* A file that defines inputs and outputs */</span>
&nbsp;
<span style="color: #993333;">void</span> delay_ms<span style="color: #009900;">&#40;</span>uint16_t x<span style="color: #009900;">&#41;</span>								<span style="color: #808080; font-style: italic;">/* Declare substitute delay function, bring in variable x */</span>
	<span style="color: #009900;">&#123;</span>
		uint8_t y<span style="color: #339933;">,</span> z<span style="color: #339933;">;</span>								<span style="color: #808080; font-style: italic;">/* Declare the variables y, z */</span>
		<span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">;</span> x <span style="color: #339933;">&gt;</span> <span style="color: #0000dd;">0</span> <span style="color: #339933;">;</span> x<span style="color: #339933;">--</span><span style="color: #009900;">&#41;</span>							<span style="color: #808080; font-style: italic;">/* Loop while x is less than zero; decrement */</span>
			<span style="color: #009900;">&#123;</span>
				<span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span> y <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span> <span style="color: #339933;">;</span> y <span style="color: #339933;">&lt;</span> <span style="color: #0000dd;">90</span> <span style="color: #339933;">;</span> y<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span>				<span style="color: #808080; font-style: italic;">/* Loop while y is less than 90; increment */</span>
					<span style="color: #009900;">&#123;</span>
						<span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span> z <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span> <span style="color: #339933;">;</span> z <span style="color: #339933;">&lt;</span> <span style="color: #0000dd;">6</span> <span style="color: #339933;">;</span> z<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span>		<span style="color: #808080; font-style: italic;">/* Loop while z is less than six */</span>
							<span style="color: #009900;">&#123;</span>
								asm <span style="color: #993333;">volatile</span> <span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;nop&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>	<span style="color: #808080; font-style: italic;">/* Inline assembler code: no operation performed; i.e.: do nothing */</span>
							<span style="color: #009900;">&#125;</span>
					<span style="color: #009900;">&#125;</span>
			<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #993333;">int</span> main<span style="color: #009900;">&#40;</span><span style="color: #993333;">void</span><span style="color: #009900;">&#41;</span>										<span style="color: #808080; font-style: italic;">/* Main function; every program has a main */</span>
	<span style="color: #009900;">&#123;</span>
		DDRD <span style="color: #339933;">=</span> <span style="color: #0000dd;">1</span> <span style="color: #339933;">&lt;&lt;</span> <span style="color: #0000dd;">4</span><span style="color: #339933;">;</span>								<span style="color: #808080; font-style: italic;">/* make Pin 6 (PortD4) an output */</span>
			<span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">;;</span><span style="color: #009900;">&#41;</span>								<span style="color: #808080; font-style: italic;">/* Loop like forever */</span>
				<span style="color: #009900;">&#123;</span>
					<span style="color: #993333;">char</span> i<span style="color: #339933;">;</span>						<span style="color: #808080; font-style: italic;">/* Define the variable i */</span>
					<span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span>i <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> <span style="color: #0000dd;">10</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span>				<span style="color: #808080; font-style: italic;">/* Loop while i is less than 10 */</span>
						<span style="color: #009900;">&#123;</span>
							delay_ms<span style="color: #009900;">&#40;</span><span style="color: #0000dd;">50</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>			<span style="color: #808080; font-style: italic;">/* Hang on for a moment */</span>
						<span style="color: #009900;">&#125;</span>
					PORTD <span style="color: #339933;">^=</span> <span style="color: #0000dd;">1</span> <span style="color: #339933;">&lt;&lt;</span> <span style="color: #0000dd;">4</span><span style="color: #339933;">;</span>				<span style="color: #808080; font-style: italic;">/* toggle the LED; if it's off, turn it on */</span>
				<span style="color: #009900;">&#125;</span>
		<span style="color: #b1b100;">return</span><span style="color: #009900;">&#40;</span><span style="color: #0000dd;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>								<span style="color: #808080; font-style: italic;">/* never reached */</span>
	<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.dmcole.net/index.php/taking-the-atmega8-for-an-introductory-spin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>And now, for somethingcompletely undifferent &#8230;</title>
		<link>http://www.dmcole.net/index.php/and-now-for-something-completely-undifferent-2/</link>
		<comments>http://www.dmcole.net/index.php/and-now-for-something-completely-undifferent-2/#comments</comments>
		<pubDate>Wed, 04 Mar 2009 00:27:55 +0000</pubDate>
		<dc:creator>dmcole</dc:creator>
				<category><![CDATA[Musing]]></category>
		<category><![CDATA[Macintosh]]></category>

		<guid isPermaLink="false">http://www.dmcole.net/?p=11</guid>
		<description><![CDATA[It isn&#8217;t that I was dying to have a blog — in fact, I&#8217;ve tried to stay away from blogging for years.
A few months back it became clear that this electronics thing wasn&#8217;t going to go away. I was, in fact, going to be building more circuits over time and perhaps even designing them. I [...]]]></description>
			<content:encoded><![CDATA[<p>It isn&#8217;t that I was dying to have a blog — in fact, I&#8217;ve tried to stay away from blogging for years.</p>
<p>A few months back it became clear that this electronics thing wasn&#8217;t going to go away. I was, in fact, going to be building more circuits over time and perhaps even designing them. I had chronicled the lighting of the backyard railroad at <a href="http://www.45mm.com/lighting/" target="_blank">45mm.com</a>, while the Christmas lights project was at <a href="http://www.PacificaLights.info/ target=">PacificaLights.info</a>.</p>
<p>But that scattered stuff all over the map and I didn&#8217;t have a good place to put things that fell in between. Plus, I had never installed <a href="http://www.wordpress.org/" target="_blank">WordPress</a> and was interested in giving it a try (we won&#8217;t talk about the ill-fated, three-day attempt to get Movable Type to work).</p>
<p>Plus, I had all these iterations of the domain name dmcole — so why not use one for its own content?</p>
<p>I don&#8217;t expect to post here often; I don&#8217;t expect the material to be earth-shattering. I do expect it to be of mild interest to those who are interested in do-it-yourself digital lighting solutions and those who are microcontroller hobbyists.</p>
<p>Now, I&#8217;ve set up by blog and I&#8217;m ready to go.</p>
<p>Onward.</p>
<p>\dmc</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dmcole.net/index.php/and-now-for-something-completely-undifferent-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
