Life@ITP

December 17, 2005

Week 6 Lab

Filed under: Physical Computing

I finally had a chance to work on my week 6 lab assignment. I couldn’t get my hands on a H-bridge so I did the next best thing…use a TIP120 which only allowed me to vary the speed of the motor by receiving pause intervals. After finals I was basically broke so I got the cheapest DC motor I could find at Radio Shack, a 1.5 - 3v DC hobby motor.

I got the DC motor to do what it’s supposed to do, which is to spin. The ER room was out of still camera’s so I didn’t have a chance to take any photos but below is the code I used to program my PIC chip.

‘define oscillator @ 4mhz
DEFINE OSC 4

‘ make ports D1 output

output PORTD.1

pause 500 ‘ start program with a half-second delay

main:

high PORTD.1

pause 1000 ‘ turns motor power on for 1 second

low PORTD.1

pause 1000 ‘ turns power off for 1 second

goto main

Comments »

The URI to TrackBack this entry is: http://words.blogsome.com/2005/12/17/week-6-lab/trackback/

No comments yet.

RSS feed for comments on this post.

Leave a comment

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>























Get free blog up and running in minutes with Blogsome | Theme designs available here