<?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>metablog &#187; hacking</title>
	<atom:link href="http://www.jakilevy.com/blog/category/hacking/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jakilevy.com/blog</link>
	<description>jaki levy auto-blogs on new media, iTV, and performance on the web. what's that? he doesn't know.</description>
	<lastBuildDate>Mon, 10 May 2010 20:23:47 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Talking Piano by Peter Ablinger</title>
		<link>http://www.jakilevy.com/blog/2009/10/08/talking-piano/</link>
		<comments>http://www.jakilevy.com/blog/2009/10/08/talking-piano/#comments</comments>
		<pubDate>Thu, 08 Oct 2009 17:34:02 +0000</pubDate>
		<dc:creator>jakilevy</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[hacking]]></category>

		<guid isPermaLink="false">http://www.jakilevy.com/blog/?p=344</guid>
		<description><![CDATA[
[via Gizmodo (via Neatorama, {via Make: Online}) ]
Austrian composer Peter Ablinger digitized a recording of a child speaking and then programmed a mechanical piano to replicate the sounds. The video above is in German, but Hack a Day has provided a translation:
I break down this phonography, meaning a recording of something the voice, in this [...]]]></description>
			<content:encoded><![CDATA[<!-- sphereit start --><p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/muCPjK4nGY4&#038;rel=0&#038;color1=0xb1b1b1&#038;color2=0xcfcfcf&#038;hl=en&#038;feature=player_embedded&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowScriptAccess" value="always"></param><embed src="http://www.youtube.com/v/muCPjK4nGY4&#038;rel=0&#038;color1=0xb1b1b1&#038;color2=0xcfcfcf&#038;hl=en&#038;feature=player_embedded&#038;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="425" height="344"></embed></object></p>
<p>[via <a href="http://gizmodo.com/5375773/austrians-must-make-great-interrogators-since-they-can-make-even-pianos-talk">Gizmodo</a> (via <a href="http://www.neatorama.com/2009/10/07/talking-piano/">Neatorama</a>, {via <a href="http://blog.makezine.com/archive/2009/10/mechanical_reproduction_of_digitize.html">Make: Online</a>}) ]</p>
<p>Austrian composer <a href="http://ablinger.mur.at/">Peter Ablinger</a> digitized a recording of a child speaking and then programmed a mechanical piano to replicate the sounds. The video above is in German, but Hack a Day has provided a translation:</p>
<blockquote><p>I break down this phonography, meaning a recording of something the voice, in this case -, in individual pixels, one can say. And if I have the possibility of a rendering in a fairly high resolution (and that I only get with a mechanical piano), then I in fact restore some kind of continuity. Therefore, with a little practice, or help or subtitling, we actually can hear a human voice in a piano sound.
</p></blockquote>
<p>The content of the speech is taken from the Proclamation of the European Environmental Criminal Court at World Venice Forum 2009.</p>
<p><a href="http://ablinger.mur.at/">Composer&#8217;s Webpage</a></p>
<!-- sphereit end --><span style="margin-bottom:40px; border-bottom:none;"><a class="iconsphere" title="Sphere: Related Content" onclick="return Sphere.Widget.search('http://www.jakilevy.com/blog/2009/10/08/talking-piano/')" href="http://www.sphere.com/search?q=sphereit:http://www.jakilevy.com/blog/2009/10/08/talking-piano/">Sphere: Related Content</a></span><br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.jakilevy.com/blog/2009/10/08/talking-piano/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Dot Matrix Scanner plays Bohemian Rhapsody</title>
		<link>http://www.jakilevy.com/blog/2009/05/10/dot-matrix-scanner-plays-bohemian-rhapsody/</link>
		<comments>http://www.jakilevy.com/blog/2009/05/10/dot-matrix-scanner-plays-bohemian-rhapsody/#comments</comments>
		<pubDate>Mon, 11 May 2009 07:41:32 +0000</pubDate>
		<dc:creator>jakilevy</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[atari hack]]></category>
		<category><![CDATA[digital hack]]></category>
		<category><![CDATA[dot matrix]]></category>
		<category><![CDATA[scanner hack]]></category>
		<category><![CDATA[wayne's world]]></category>

		<guid isPermaLink="false">http://www.jakilevy.com/blog/?p=331</guid>
		<description><![CDATA[For those who are in NYC, make sure to hit up the NYU-ITP show
In tribute to my alma mater, I submit to you, my wonderful readers this wonderful video (found via Erik Fabian of GoodMeet)

Description:
This is dedicated to all fans of Queen and hey let&#8217;s not forget about Mike Myers and Dana Carvey of Wayne&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<!-- sphereit start --><p>For those who are in NYC, make sure to hit up the <a href="http://itp.nyu.edu/show">NYU-ITP show</a></p>
<p>In tribute to my alma mater, I submit to you, my wonderful readers <a href="http://www.youtube.com/watch?v=Ht96HJ01SE4">this wonderful video</a> (found via Erik Fabian of <a href="http://www.goodmeet.org/Salt.html">GoodMeet</a>)</p>
<p><object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/Ht96HJ01SE4&#038;hl=en&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/Ht96HJ01SE4&#038;hl=en&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object></p>
<p><strong>Description:</strong><br />
This is dedicated to all fans of Queen and hey let&#8217;s not forget about Mike Myers and Dana Carvey of Wayne&#8217;s World.</p>
<p>No effects or sampling were used. What you see is what you hear (does that even make sense?)<br />
Atari 800XL was used for the lead piano/organ sound<br />
Texas Instruments TI-99/4a as lead guitar<br />
8 Inch Floppy Disk as Bass<br />
3.5 inch Harddrive as the gong</p>
<p>HP ScanJet 3C was used for all vocals. Please note I had to record the HP scanner 4 seperate times for each voice. I wanted to buy 4 HP scanners but for some reason sellers on E-Bay expect you to pay $80-$100, I got mine for $30.</p>
<p>I keep hearing parts of the song are out of tune. Keep in mind the scanner and floppy drive are not musical instruments. These are mechanical devices whose motors tend to drift and can cause some notes to be out of tune.</p>
<!-- sphereit end --><span style="margin-bottom:40px; border-bottom:none;"><a class="iconsphere" title="Sphere: Related Content" onclick="return Sphere.Widget.search('http://www.jakilevy.com/blog/2009/05/10/dot-matrix-scanner-plays-bohemian-rhapsody/')" href="http://www.sphere.com/search?q=sphereit:http://www.jakilevy.com/blog/2009/05/10/dot-matrix-scanner-plays-bohemian-rhapsody/">Sphere: Related Content</a></span><br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.jakilevy.com/blog/2009/05/10/dot-matrix-scanner-plays-bohemian-rhapsody/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Open Source Hardware ?</title>
		<link>http://www.jakilevy.com/blog/2007/12/06/open-source-hardware/</link>
		<comments>http://www.jakilevy.com/blog/2007/12/06/open-source-hardware/#comments</comments>
		<pubDate>Thu, 06 Dec 2007 20:34:39 +0000</pubDate>
		<dc:creator>jakilevy</dc:creator>
				<category><![CDATA[Analog Digital]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[hacking]]></category>

		<guid isPermaLink="false">http://www.jakilevy.com/blog/?p=226</guid>
		<description><![CDATA[BugLabs shows off its impressive prototype. This is a modular physical device. Meaning if you want it to be a PDA, gaming device, or video recorder, you simply change the physical configurations.  
Definitely worth watching the first few minutes&#8230;
 
I think this is a nice approach for &#8220;the consumer&#8217;s desires for an all-in-one device.&#8221; [...]]]></description>
			<content:encoded><![CDATA[<!-- sphereit start --><p>BugLabs shows off its impressive prototype. This is a modular physical device. Meaning if you want it to be a PDA, gaming device, or video recorder, you simply change the physical configurations.  </p>
<p>Definitely worth watching the first few minutes&#8230;</p>
<p><embed style="width:400px; height:326px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=-1932063822649530376&#038;hl=en" flashvars=""> </embed></p>
<p>I think this is a nice approach for &#8220;the consumer&#8217;s desires for an all-in-one device.&#8221; Let the buyer build, and innovators innovate.</p>
<p>For more, visit <a href="http://BugLabs.net">BugLabs.net</a></p>
<p>[seen via <a href="http://avc.blogs.com/a_vc/">A VC</a>]</p>
<!-- sphereit end --><span style="margin-bottom:40px; border-bottom:none;"><a class="iconsphere" title="Sphere: Related Content" onclick="return Sphere.Widget.search('http://www.jakilevy.com/blog/2007/12/06/open-source-hardware/')" href="http://www.sphere.com/search?q=sphereit:http://www.jakilevy.com/blog/2007/12/06/open-source-hardware/">Sphere: Related Content</a></span><br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.jakilevy.com/blog/2007/12/06/open-source-hardware/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Afterthoughts</title>
		<link>http://www.jakilevy.com/blog/2006/06/22/afterthoughts/</link>
		<comments>http://www.jakilevy.com/blog/2006/06/22/afterthoughts/#comments</comments>
		<pubDate>Thu, 22 Jun 2006 20:20:01 +0000</pubDate>
		<dc:creator>jakilevy</dc:creator>
				<category><![CDATA[hacking]]></category>

		<guid isPermaLink="false">http://www.jakilevy.com/blog/?p=38</guid>
		<description><![CDATA[Track the progress of the tape.
Reveal the &#8220;narrative&#8221; of the tape. Highlite its path and let the user see its path &#8211; do not obscure its path with wires.
Perhaps add a DSP (digital signal processor) Chip  &#8211; add a video feedback loop in addition to the audio feedback loop.
Add an electromagnet instead of a [...]]]></description>
			<content:encoded><![CDATA[<!-- sphereit start --><p>Track the progress of the tape.</p>
<p>Reveal the &#8220;narrative&#8221; of the tape. Highlite its path and let the user see its path &#8211; do not obscure its path with wires.</p>
<p>Perhaps add a DSP (digital signal processor) Chip  &#8211; add a video feedback loop in addition to the audio feedback loop.</p>
<p>Add an electromagnet instead of a regular static magnet.</p>
<p>Pulse the record head on the first VCR &#8211; investigate what it is to &#8220;record&#8221; an image &#8211; and then recall / &#8220;playback&#8221; this same image.</p>
<!-- sphereit end --><span style="margin-bottom:40px; border-bottom:none;"><a class="iconsphere" title="Sphere: Related Content" onclick="return Sphere.Widget.search('http://www.jakilevy.com/blog/2006/06/22/afterthoughts/')" href="http://www.sphere.com/search?q=sphereit:http://www.jakilevy.com/blog/2006/06/22/afterthoughts/">Sphere: Related Content</a></span><br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.jakilevy.com/blog/2006/06/22/afterthoughts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PDF Presentation</title>
		<link>http://www.jakilevy.com/blog/2006/06/22/pdf-presentation/</link>
		<comments>http://www.jakilevy.com/blog/2006/06/22/pdf-presentation/#comments</comments>
		<pubDate>Thu, 22 Jun 2006 16:22:47 +0000</pubDate>
		<dc:creator>jakilevy</dc:creator>
				<category><![CDATA[hacking]]></category>

		<guid isPermaLink="false">http://www.jakilevy.com/blog/?p=37</guid>
		<description><![CDATA[vhs Hack presentation
]]></description>
			<content:encoded><![CDATA[<!-- sphereit start --><p><a id="p36" href="http://www.jakilevy.com/blog/wp-content/uploads/2006/06/vhspresentation.pdf">vhs Hack presentation</a></p>
<!-- sphereit end -->]]></content:encoded>
			<wfw:commentRss>http://www.jakilevy.com/blog/2006/06/22/pdf-presentation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pictures of VHS Installation</title>
		<link>http://www.jakilevy.com/blog/2006/06/22/pictures-of-vhs-installation/</link>
		<comments>http://www.jakilevy.com/blog/2006/06/22/pictures-of-vhs-installation/#comments</comments>
		<pubDate>Thu, 22 Jun 2006 15:49:04 +0000</pubDate>
		<dc:creator>jakilevy</dc:creator>
				<category><![CDATA[hacking]]></category>

		<guid isPermaLink="false">http://www.jakilevy.com/blog/?p=34</guid>
		<description><![CDATA[ Click here for pictures of our VHS installation
]]></description>
			<content:encoded><![CDATA[<!-- sphereit start --><p><a href="http://homepage.mac.com/jakilevy/PhotoAlbum11.html"> Click here for pictures of our VHS installation</a></p>
<!-- sphereit end -->]]></content:encoded>
			<wfw:commentRss>http://www.jakilevy.com/blog/2006/06/22/pictures-of-vhs-installation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HPWM &#8211; Final Code</title>
		<link>http://www.jakilevy.com/blog/2006/06/21/hpwm-final-code/</link>
		<comments>http://www.jakilevy.com/blog/2006/06/21/hpwm-final-code/#comments</comments>
		<pubDate>Wed, 21 Jun 2006 19:18:54 +0000</pubDate>
		<dc:creator>jakilevy</dc:creator>
				<category><![CDATA[hacking]]></category>

		<guid isPermaLink="false">http://www.jakilevy.com/blog/?p=33</guid>
		<description><![CDATA[This code controls a DC motor with a switch. When the switch is pressed, the motor moves one way for 3 seconds. When the switch is pressed again, the motor moves in the reverses direction for 3 seconds.
	From: 	  jakilevy@mac.com
	Subject: 	final code
	Date: 	June 20, 2006 10:12:30 PM EDT
	To: 	  jakilevy@mac.com
&#8216;******************************************************************************
&#8216;Some explanations:   [...]]]></description>
			<content:encoded><![CDATA[<!-- sphereit start --><p>This code controls a DC motor with a switch. When the switch is pressed, the motor moves one way for 3 seconds. When the switch is pressed again, the motor moves in the reverses direction for 3 seconds.</p>
<p>	From: 	  jakilevy@mac.com<br />
	Subject: 	final code<br />
	Date: 	June 20, 2006 10:12:30 PM EDT<br />
	To: 	  jakilevy@mac.com</p>
<p>&#8216;******************************************************************************<br />
&#8216;Some explanations:                                                           *<br />
&#8216;For my HPWM dutycycle                                                        *<br />
&#8216;I Chose 0 because 0 is reverse &#8211; explanation follows:                        *<br />
&#8216;128 is SLOW fwd  &#8230; 255 is fast fwd                                         *<br />
&#8216;126 is SLOW REV &#8230; 0 fast rev                                               *<br />
&#8216; 0(rev)&#8230;..126(slow rev)&#8230;..127(stop)&#8230;&#8230;128(slow fwd)&#8230;..255(fast fwd) *<br />
&#8216;                                                                             *<br />
&#8216;EXAMPLE HPWM                                                                 *<br />
&#8216;HPWM 1,0,330    &#8216;pwm at 0% duty cycle @ 330Hz on CCP1 (portc.2)              *<br />
&#8216;HPWM 2,127,330  &#8216;pwm at 50% duty cycle @ 330Hz on CCP2 (portc.1)             *<br />
&#8217;some code pulled off of                                                      *<br />
&#8216;http://www.grayfuse.com/blog/wp-content/code/simpleHPWM_452.bas              *<br />
&#8216; Another good link for stepper motors:                                       *<br />
&#8216;http://www.embeddedrelated.com/groups/piclist/show/9220.php                  *<br />
&#8216;******************************************************************************</p>
<p>&#8216;http://www.melabs.com/resources/articles/boolean.htm<br />
&#8216; ~ is not<br />
&#8216; | is OR<br />
&#8216;Todd suggested using a ROLLER SWITCH to DETECT the position of my motor</p>
<p>&#8216;in subroutine, dir = !dir<br />
&#8216; speed = 255<br />
&#8216; in subroutine ,  dutycycle = speed*dir<br />
&#8216;thanks to Rob Faludi for helping with this code</p>
<p>DEFINE OSC 4</p>
<p>&#8216;Enable HPWM on PORTC.1 (HPWM 2)<br />
DEFINE CCP2_REG PORTC<br />
DEFINE CCP2_BIT 1</p>
<p>&#8216;THIS IS FOR A POTENTIOMETER<br />
&#8216; Define ADCIN parameters<br />
&#8216; Set number of bits in result<br />
DEFINE ADC_BITS 10<br />
&#8216; Set clock source (3=rc)<br />
DEFINE ADC_CLOCK 3<br />
&#8216; Set sampling time in microseconds<br />
DEFINE ADC_SAMPLEUS 10<br />
&#8216; Set PORTA to all input<br />
TRISA = %11111111<br />
&#8216; Set up ADCON1 analog and right justify the result<br />
adcon1 = %10000010</p>
<p>&#8216;****************<br />
&#8216;DEFINE VARIABLES<br />
&#8216;****************<br />
&#8216;define adc vars<br />
adcVar VAR WORD &#8216; Create variable to store result</p>
<p>i var BYTE      &#8216;this sets i as a variable &#8211; COUNTER<br />
dir VAR bit     &#8216;Boolean variable dir<br />
speed VAR BYTE  &#8216;0-255</p>
<p>&#8216;Initialize the direction<br />
dir = 0<br />
&#8216;Initialize speed<br />
speed = 255</p>
<p>start:<br />
INCLUDE &#8220;modedefs.bas&#8221;</p>
<p>OUTPUT PORTB.7 &#8216; Test LED<br />
OUTPUT PORTB.6 &#8216; Test LED</p>
<p>INPUT PORTD.2   &#8216;Switch 1<br />
INPUT PORTD.3   &#8216;Roller Switch &#8211; 0<br />
INPUT PORTD.4   &#8216;Roller Switch &#8211; 255</p>
<p>&#8216;BLINK AN LED to Test the PIC<br />
high portd.0<br />
pause 500<br />
low portd.0<br />
pause 500<br />
high portd.0<br />
pause 500<br />
low portd.0<br />
Pause 500</p>
<p>main:<br />
&#8216;Read channel 0<br />
&#8216;ADCIN 0, adcVar<br />
HPWM 2, 127, 1000 &#8216; Frequency of 1000 suggested by Todd Holoubek</p>
<p>&#8216;IF Switch 1 is pressed<br />
&#8216;TURN MOTOR<br />
&#8216;FOR a motor &#8211; 127 is 0 point<br />
if portd.2 = 1 then<br />
    GOSUB motorGo<br />
endif</p>
<p>&#8216;If Switch 1 is NOT pressed &#8211; turn LED off &#8211; just as a test<br />
if portd.2 = 0 then<br />
    &#8216;Test LED&#8217;s<br />
    low PORTB.7<br />
    HIGH PORTD.6<br />
endif</p>
<p>GoTo main </p>
<p>&#8216;Subroutine<br />
motorGo:<br />
&#8216;Drive motor for 3 seconds</p>
<p>    &#8216;test LED&#8217;S<br />
    higH PORTB.7<br />
    LOW PORTB.6</p>
<p>    &#8216;HPWM Channel,Dutycycle,Frequency<br />
    HPWM 2, dir*speed, 1000 &#8216; Frequency of 1000 suggested by Todd Holoubek<br />
    pause 3000</p>
<p>    &#8216;REVERSE Direction<br />
    dir = ~dir</p>
<p>&#8216;My regulator started overheating when the switch was NOT pressed<br />
&#8216;because the motor was getting stuck<br />
&#8217;so I decided to do HPWM for only 3 seconds<br />
&#8216;which is how long I needed to motor to run<br />
&#8216;After 3 seconds, I reverse the direction</p>
<p>return</p>
<!-- sphereit end --><span style="margin-bottom:40px; border-bottom:none;"><a class="iconsphere" title="Sphere: Related Content" onclick="return Sphere.Widget.search('http://www.jakilevy.com/blog/2006/06/21/hpwm-final-code/')" href="http://www.sphere.com/search?q=sphereit:http://www.jakilevy.com/blog/2006/06/21/hpwm-final-code/">Sphere: Related Content</a></span><br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.jakilevy.com/blog/2006/06/21/hpwm-final-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HPWM</title>
		<link>http://www.jakilevy.com/blog/2006/06/20/hpwm/</link>
		<comments>http://www.jakilevy.com/blog/2006/06/20/hpwm/#comments</comments>
		<pubDate>Tue, 20 Jun 2006 14:19:09 +0000</pubDate>
		<dc:creator>jakilevy</dc:creator>
				<category><![CDATA[hacking]]></category>

		<guid isPermaLink="false">http://www.jakilevy.com/blog/?p=32</guid>
		<description><![CDATA[from micro code studio help option:



HPWM
PRO
STD



 HPWM  Channel,Dutycycle,Frequency
HPWM run continuously in the background while the program  is doing other things. Channel specifies which hardware PWM channel to use. Some  devices have 1, 2 or 3 PWM channels. On devices with 2 channels, the Frequency  must be the same on both channels. [...]]]></description>
			<content:encoded><![CDATA[<!-- sphereit start --><p>from micro code studio help option:</p>
<div align="center"><center></p>
<table width="100%" cellpadding="0" border="0" bgcolor="#000000">
<tr>
<td style="width: 86%"><font face="Arial" color="#ffffff" style="background-color: #316ac5"><small><strong>HPWM</strong></small></font></td>
<td nowrap="nowrap" bgcolor="#ffffff" align="center" style="width: 50px"><font face="Arial" color="#000000"><strong><small>PRO</small></strong></font></td>
<td nowrap="nowrap" bgcolor="#c0c0c0" align="center" style="width: 50px"><font face="Arial" color="#808080"><strong><small>STD</small></strong></font></td>
</tr>
</table>
<p></center></div>
<p><strong><font size="2" face="Courier New"> </font></strong><strong><font size="2" face="Courier New"><font color="#ffffff" style="background-color: #316ac5">HPWM</font></font></strong>  <font size="2" face="Courier New"><em>Channel</em><strong>,</strong><em>Dutycycle</em><strong>,</strong><em>Frequency</em></font></p>
<p><small><font face="Arial"><font color="#ffffff" style="background-color: #316ac5">HPWM</font> run continuously in the background while the program  is doing other things. Channel specifies which hardware PWM channel to use. Some  devices have 1, 2 or 3 PWM channels. On devices with 2 channels, the Frequency  must be the same on both channels. Dutycycle specifies the on/off (high/low)  ratio of the signal. It ranges from 0 to 255, where 0 is off (low all the time)  and 255 is on (high) all the time. A value of 127 gives a 50% duty cycle (square  wave). Frequency is the desired frequency of the PWM signal. Not all frequencies  are available at all oscillator settings. The lowest frequency at 4MHz is 245Hz.  The highest frequency at any oscillator speed is 32767Hz.</font></small></p>
<p><font size="2" face="arial">The lowest usable <font color="#ffffff" style="background-color: #316ac5">HPWM</font> Frequency at each  oscillator setting is shown in the following table:</font></p>
<div align="center"><center></p>
<table cellspacing="0" cellpadding="6" border="2">
<tr>
<td align="center"><font size="2" face="Arial">OSC</font></td>
<td align="center"><font size="2" face="Arial">14-bit core and 18Cxxx</font></td>
<td align="center"><font size="2" face="Arial">17Cxxx</font></td>
</tr>
<tr>
<td align="center"><font size="2" face="Arial">4MHz</font></td>
<td align="center"><font size="2" face="Arial">145Hz</font></td>
<td align="center"><font size="2" face="Arial">3907Hz</font></td>
</tr>
<tr>
<td align="center"><font size="2" face="Arial">8MHz</font></td>
<td align="center"><font size="2" face="Arial">489Hz</font></td>
<td align="center"><font size="2" face="Arial">7813Hz</font></td>
</tr>
<tr>
<td align="center"><font size="2" face="Arial">10MHz</font></td>
<td align="center"><font size="2" face="Arial">611Hz</font></td>
<td align="center"><font size="2" face="Arial">9766Hz</font></td>
</tr>
<tr>
<td align="center"><font size="2" face="Arial">12MHz</font></td>
<td align="center"><font size="2" face="Arial">733Hz</font></td>
<td align="center"><font size="2" face="Arial">11719Hz</font></td>
</tr>
<tr>
<td align="center"><font size="2" face="Arial">16MHz</font></td>
<td align="center"><font size="2" face="Arial">977Hz</font></td>
<td align="center"><font size="2" face="Arial">15625Hz</font></td>
</tr>
<tr>
<td align="center"><font size="2" face="Arial">20MHz</font></td>
<td align="center"><font size="2" face="Arial">1221Hz</font></td>
<td align="center"><font size="2" face="Arial">19531Hz</font></td>
</tr>
<tr>
<td align="center"><font size="2" face="Arial">24MHz</font></td>
<td align="center"><font size="2" face="Arial">1465Hz</font></td>
<td align="center"><font size="2" face="Arial">23438Hz</font></td>
</tr>
<tr>
<td align="center"><font size="2" face="Arial">33MHz</font></td>
<td align="center"><font size="2" face="Arial">2015Hz</font></td>
<td align="center"><font size="2" face="Arial">32227Hz</font></td>
</tr>
<tr>
<td align="center"><font size="2" face="Arial">40MHz</font></td>
<td align="center"><font size="2" face="Arial">2442Hz</font></td>
<td align="center"><font size="2" face="Arial">na</font></td>
</tr>
</table>
<p></center></div>
<p><font size="2" face="arial">Some devices, such as the PIC18C452, have alternate  pins that may be used for <font color="#ffffff" style="background-color: #316ac5">HPWM</font>. The following <a href="http://www.jakilevy.com/blog/wp-admin/define.html">DEFINE</a>s allow  using these pins:</font></p>
<p><small><font face="Courier New"><strong>DEFINE</strong> CCP1_REG PORTC <font color="#000080"><em>&#8216;Hpwm 1 pin port</em></font><br />
<strong>DEFINE</strong>  CCP1_BIT 2 <font color="#000080"><em>&#8216;Hpwm 1 pin  bit</em></font><br />
<strong>DEFINE</strong> CCP2_REG PORTC <font color="#000080"><em>&#8216;Hpwm 2 pin port</em></font><br />
<strong>DEFINE</strong>  CCP2_BIT 1 <font color="#000080"><em>&#8216;Hpwm 2 pin  bit</em></font></font></small></p>
<p><font size="2" face="arial">The following DEFINEs specify which timer, 1 or 2, to  use with PWM channel 2 and PWM channel 3 for the PIC17C7xx devices. The default  is timer 1 if no DEFINE is specified.</font></p>
<p><small><font face="Courier New"><strong>DEFINE</strong> HPWM2_TIMER 1 <font color="#000080"><em>&#8216;Hpwm 2 timer select</em></font><br />
<strong>DEFINE</strong>  HPWM3_TIMER 1 <font color="#000080"><em>&#8216;Hpwm 3 timer  select</em></font></font></small></p>
<p><small><font face="Arial"><strong>Example</strong></p>
<p></font><font face="Courier New"><strong><font color="#ffffff" style="background-color: #316ac5">HPWM</font></strong> 1,127,1000 <font color="#000080"><em>&#8216; Send a  50% duty cycle PWM signal at 1kHz</em></font><br />
<strong><font color="#ffffff" style="background-color: #316ac5">HPWM</font></strong> 1,64,200  <em><font color="#000080">  &#8216; Send a 25% duty cycle PWM signal at  2kHz</font></em></font></small></p>
<p><strong><font face="Arial" color="#000000"><small>See  Also</small></font></strong></p>
<p><font face="Arial"><a href="http://www.jakilevy.com/blog/wp-admin/pwm.html"><small>PWM</small></a></font></p>
<pre><font size="1" face="Arial">Copyright © 2001 microEngineering Labs, Inc.
All rights reserved.</font></pre>
<!-- sphereit end --><span style="margin-bottom:40px; border-bottom:none;"><a class="iconsphere" title="Sphere: Related Content" onclick="return Sphere.Widget.search('http://www.jakilevy.com/blog/2006/06/20/hpwm/')" href="http://www.sphere.com/search?q=sphereit:http://www.jakilevy.com/blog/2006/06/20/hpwm/">Sphere: Related Content</a></span><br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.jakilevy.com/blog/2006/06/20/hpwm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Controlling a DC Motor</title>
		<link>http://www.jakilevy.com/blog/2006/06/14/controlling-a-dc-motor/</link>
		<comments>http://www.jakilevy.com/blog/2006/06/14/controlling-a-dc-motor/#comments</comments>
		<pubDate>Thu, 15 Jun 2006 01:38:52 +0000</pubDate>
		<dc:creator>jakilevy</dc:creator>
				<category><![CDATA[hacking]]></category>

		<guid isPermaLink="false">http://www.jakilevy.com/blog/?p=30</guid>
		<description><![CDATA[Here is a good article on H-Bridges
I am using an allegro motor driver
Click for Datasheet 
PIC BASIC PRO CODE:
DEFINE OSC 4
start:
INCLUDE &#8220;modedefs.bas&#8221;
&#8216;break
OUTPUT PORTD.0
INPUT PORTD.2   &#8216;Switch 1
INPUT PORTB.0
i var byte
&#8216;Wait .5 second
&#8216;BLINK AN LED to Test the PIC
high portd.0
pause 500
low portd.0
pause 500
high portd.0
pause 500
low portd.0
Pause 500
main:
&#8216;IF Switch 1 is pressed
if portd.2 = 1 then
&#8216;test [...]]]></description>
			<content:encoded><![CDATA[<!-- sphereit start --><p>Here is a good <a href="http://www.acroname.com/robotics/info/articles/drivers/drivers.html#s3">article </a>on H-Bridges</p>
<p>I am using an allegro motor driver<br />
<a href="http://www.allegromicro.com/sf/3953/">Click for Datasheet </a></p>
<p>PIC BASIC PRO CODE:</p>
<p>DEFINE OSC 4<br />
start:<br />
INCLUDE &#8220;modedefs.bas&#8221;<br />
&#8216;break</p>
<p>OUTPUT PORTD.0<br />
INPUT PORTD.2   &#8216;Switch 1<br />
INPUT PORTB.0<br />
i var byte<br />
&#8216;Wait .5 second</p>
<p>&#8216;BLINK AN LED to Test the PIC<br />
high portd.0<br />
pause 500<br />
low portd.0<br />
pause 500<br />
high portd.0<br />
pause 500<br />
low portd.0<br />
Pause 500</p>
<p>main:<br />
&#8216;IF Switch 1 is pressed<br />
if portd.2 = 1 then</p>
<p>&#8216;test LED’S<br />
low portb.7<br />
higH PORTD.0</p>
<p>&#8216;TURN MOTOR 1 &#8211; REVERSE<br />
HIGH PORTD.1<br />
&#8216;For i =  0 to 255 step 1<br />
&#8216;FOR a motor &#8211; 127 is 0 point<br />
&#8216;128 is SLOW fwd  &#8230; 255 is fast fwd<br />
&#8216;126 is SLOW REV &#8230; 0 fast rev</p>
<p>&#8216;PWM Pin,Duty,Cycle<br />
PWM PORTD.1,0, 10<br />
next<br />
endif<br />
&#8216;If Switch 1 is NOT pressed &#8211; TURN MOTOR OTHER WAY<br />
if portd.2 = 0 then</p>
<p>&#8216;TEST LED<br />
low PORTD.0</p>
<p>&#8216;TURN MOTOr 1 &#8211; FWD<br />
&#8216;For i =  255 to 0 step -1<br />
&#8216;PWM Pin,Duty,Cycle<br />
PWM PORTD.1,255, 10<br />
next<br />
endif</p>
<p>GoTo main</p>
<!-- sphereit end --><span style="margin-bottom:40px; border-bottom:none;"><a class="iconsphere" title="Sphere: Related Content" onclick="return Sphere.Widget.search('http://www.jakilevy.com/blog/2006/06/14/controlling-a-dc-motor/')" href="http://www.sphere.com/search?q=sphereit:http://www.jakilevy.com/blog/2006/06/14/controlling-a-dc-motor/">Sphere: Related Content</a></span><br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.jakilevy.com/blog/2006/06/14/controlling-a-dc-motor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fixing the tape</title>
		<link>http://www.jakilevy.com/blog/2006/06/07/fixing-the-tape/</link>
		<comments>http://www.jakilevy.com/blog/2006/06/07/fixing-the-tape/#comments</comments>
		<pubDate>Thu, 08 Jun 2006 05:08:42 +0000</pubDate>
		<dc:creator>jakilevy</dc:creator>
				<category><![CDATA[hacking]]></category>

		<guid isPermaLink="false">http://www.jakilevy.com/blog/?p=27</guid>
		<description><![CDATA[Today we modified the first VHS cassette for use in the project.  Because our first version had open spools of tape, we had to thread the tape through the whole VCR each time.  By modifying the VHS cassette, we were able to spend much less time fumbling with the tape and more time [...]]]></description>
			<content:encoded><![CDATA[<!-- sphereit start --><p>Today we modified the first VHS cassette for use in the project.  Because our first version had open spools of tape, we had to thread the tape through the whole VCR each time.  By modifying the VHS cassette, we were able to spend much less time fumbling with the tape and more time on the VCR itself.</p>
<p>The main challenge in adding more VCR&#8217;s to the project is maintaining tape tension.  If we can find a way to maintain the tension in the tape, we could very easily add more VCR&#8217;s with our newly modified VHS cassette holder.</p>
<!-- sphereit end --><span style="margin-bottom:40px; border-bottom:none;"><a class="iconsphere" title="Sphere: Related Content" onclick="return Sphere.Widget.search('http://www.jakilevy.com/blog/2006/06/07/fixing-the-tape/')" href="http://www.sphere.com/search?q=sphereit:http://www.jakilevy.com/blog/2006/06/07/fixing-the-tape/">Sphere: Related Content</a></span><br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.jakilevy.com/blog/2006/06/07/fixing-the-tape/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.313 seconds -->
