index.html 5.38 KB
Newer Older
1
<html>
Grace Copplestone's avatar
Grace Copplestone committed
2 3 4
<head>
	<link rel="stylesheet" href="https://copplestone.pages.cba.mit.edu/styling/stylesheet.css">
</head>
5
<body id="main">
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34

<h1>XMega Learning</h1>

<h2>Toolchain Installation</h2>

<h3>Linux</h3>
<p>This installation is more or less straightforward:</p>
<ul>
	<li><p>sudo apt get install ...</p></li>
</ul>
<p>TODO: do a fresh install and make notes.</p>

<h3>Mac</h3>
<p>Cross pack is a great bundle available via homebrew for these tools.  Unfortunately, currently (3/21/2016) it doesn't include avr-libc v2.0, and so doesn't include support for the xmega8e5.  I made an experimental  homebrew tap with avr-libc v2.0 and arg-gcc 5.3.0.  To get it, run:</p>
<ul>
	<li><p>brew tap calischs/homebrew-avr</p></li>
	<li><p>brew install calischs/avr/avr-gcc53</p></li>
	<li><p>brew install calischs/avr/avr-libc20</p></li>
</ul>

<p>Also, as of 10/31/2016, there seems to be some strange behavior when trying to use an Atmel Ice programmer from a mac.  When you try to program, you may see an error message from usbdev_open() about not claiming the interface.  I used the answer posted <a href='http://www.avrfreaks.net/comment/1421981#comment-1421981'>here (post 32 and 33)</a> -- the attached kext file already has the correct VID and PID.  A full restart was required.</p>



<h2>Examples</h2>
<p>Below are projects using the xmega peripherals as I'm learning about them.  They definitely aren't minimal "hello world" examples, but at some point hopefully I'll get around to boiling them down.  For the moment, however, hopefully they demonstrate how to use each capability of the mcu.</p>

<h3>DAC</h3>
<ul>
Grace Copplestone's avatar
Grace Copplestone committed
35 36 37 38 39 40 41 42
	<li><a href='functionality/dac/sine.png'>Sine Wave</a></li>
	<li><a href='functionality/dac/hello.8E5.dac.c'>hello.8E5.dac.c</a></li>
	<li><a href='functionality/dac/hello.8E5.dac.make'>hello.8E5.dac.make</a></li>
	<li><a href='functionality/dac/make_lookup.py'>make_lookup.py</a></li>
	<li><a href='functionality/dac/xmega-8e5-dac-layout.png'>Layout</a></li>
	<li><a href='functionality/dac/xmega-8e5-dac-traces.png'>Traces</a></li>
	<li><a href='functionality/dac/xmega-8e5-dac-outline.png'>Outline</a></li>
	<li><a href='functionality/dac/xmega-8e5-dac-board.jpg'>Board</a></li>
43 44 45 46 47
</ul>


<h3>Quadrature Decoding with Timer/Counters</h3>
<ul>
Grace Copplestone's avatar
Grace Copplestone committed
48 49 50 51 52 53 54 55
	<li><a href='functionality/qdec/qdec.mp4'>Operation</a></li>
	<li><a href='functionality/qdec/hello.16a4u.qdec.c'>hello.16a4u.qdec.c</a></li>
	<li><a href='functionality/qdec/hello.16a4u.qdec.make'>hello.16a4u.qdec.make</a></li>
	<li><a href='functionality/qdec/serial.h'>serial.h</a></li>
	<li><a href='functionality/qdec/xmega-16a4u-qdec-layout.png'>Layout</a></li>
	<li><a href='functionality/qdec/xmega-16a4u-qdec-traces.png'>Traces</a></li>
	<li><a href='functionality/qdec/xmega-16a4u-qdec-interior.png'>Outline</a></li>
	<li><a href='functionality/qdec/xmega-16a4u-qdec-board.jpg'>Board</a></li>
56 57 58 59
</ul>

<h3>ADC</h3>
<ul>
Grace Copplestone's avatar
Grace Copplestone committed
60 61 62 63 64 65 66 67
	<li><a href='functionality/adc/adc.8E5.c'>adc.8E5.c</a></li>
	<li><a href='functionality/adc/adc.8E5.make'>adc.8E5.make</a></li>
	<li><a href='functionality/adc/serial.h'>serial.h</a></li>
	<li><a href='functionality/adc/adc.h'>adc.h</a></li>
	<li><a href='functionality/adc/adc.8E5.layout.png'>Layout</a></li>
	<li><a href='functionality/adc/adc.8E5.traces.png'>Traces</a></li>
	<li><a href='functionality/adc/adc.8E5.interior.png'>Outline</a></li>
	<li><a href='functionality/adc/adc.8E5.board.jpg'>Board</a></li>
68
	<li><a href='http://www.tag-connect.com/'>Tag Connect Programming connector</a></li>
Grace Copplestone's avatar
Grace Copplestone committed
69
	<li><a href='functionality/adc/load-cell-small.mp4'>Force measurement using onboard 64x gain.</a></li>
70 71 72 73 74
	<li><a href='http://www.phidgets.com/products.php?category=34&product_id=3133_0'>$7 load cell</a></li>
</ul>

<h3>USART</h3>
<ul>
Grace Copplestone's avatar
Grace Copplestone committed
75 76 77 78 79 80
	<li><a href='functionality/usart/usart.32a4u.c'>usart.32a4u.c</a></li>
	<li><a href='functionality/usart/usart.32a4u.make'>usart.32a4u.make</a></li>
	<li><a href='functionality/usart/serial.h'>serial.h</a></li>
	<li><a href='functionality/usart/usart.32a4u.layout.png'>Layout</a></li>
	<li><a href='functionality/usart/usart.32a4u.traces.png'>Traces</a></li>
	<li><a href='functionality/usart/usart.32a4u.interior.png'>Outline</a></li>
81 82 83 84 85
	<li><a href='http://www.tag-connect.com/'>Tag Connect Programming connector</a></li>
</ul>

<h3>XCL</h3>
<ul>
Grace Copplestone's avatar
Grace Copplestone committed
86 87 88 89 90 91
	<li><a href='functionality/xcl/xcl.8e5.c'>xcl.8e5.c</a></li>
	<li><a href='functionality/xcl/xcl.8e5.make'>xcl.8e5.make</a></li>
	<li><a href='functionality/xcl/xcl.8e5.layout.png'>Layout</a></li>
	<li><a href='functionality/xcl/xcl.8e5.traces.png'>Traces</a></li>
	<li><a href='functionality/xcl/xcl.8e5.interior.png'>Outline</a></li>
	<li><a href='functionality/xcl/xcl.8e5.scope.png'>ANDing square waves (without power supplied to VCC!)</a></li>
92 93 94

</ul>

Sam Calisch's avatar
Sam Calisch committed
95 96
<h3>I2C</h3>
<ul>
Grace Copplestone's avatar
Grace Copplestone committed
97 98 99 100 101 102 103 104 105
	<li><a href='functionality/i2c/hall-encoder.c'>hall-encoder.c</a></li>
	<li><a href='functionality/i2c/serial.h'>serial.h</a></li>
	<li><a href='functionality/i2c/hall-encoder.make'>hall-encoder.make</a></li>
	<li><a href='functionality/i2c/hall-encoder-layout.png'>hall-encoder-layout.png</a></li>
	<li><a href='functionality/i2c/hall-encoder-traces.png'>hall-encoder-traces.png</a></li>
	<li><a href='functionality/i2c/hall-encoder-interior.png'>hall-encoder-interior.png</a></li>
	<li><a href='functionality/i2c/load.py'>load.py</a></li>
	<li><a href='functionality/i2c/testing.jpg'>Testing</a></li>
	<li><a href='functionality/i2c/loadcell-reading-v-force.png'>Results</a></li>
Sam Calisch's avatar
Sam Calisch committed
106
</ul>
107 108 109 110 111 112 113 114


<h3>USB</h3>

<h3>DMA</h3>

<h3>WEX</h3>

Grace Copplestone's avatar
Grace Copplestone committed
115

116 117 118

</body>
</html>