min

Rebecca -- The lab went well - the hardest thing was trying to fit in those 8 LEDs? in Step 6! I'm a bit unclear about where in the code you use channel #s vs. port for analog. Also, why is it ADC_CLOCK 3? The analog clock is set at 3, while the crystal clock oscillator is 4?...

I'm really liking some of the body part switch ideas that people have posted. It seems like as a class we could wire someone up so their every twitch is met with insane blinks and noises.

Lisa - The lab went okay. It was kind of neat to see the serout2 print stuff working. Before I could get too far though, the pic programmer I was using decided to stop working. I'll have to go back and play around some more. But I feel a lot more comfortable with this stuff now. And Rebecca, I want to say that the ADC_CLOCK is set to 3 because it counts from 0? I'm probably wrong. I know Michael told us why in class, but I can't remember what he said now.

MLUCK I wish it were obvious why ADC_CLOCK is 3 but what 3 specifies is which clock to use to count out the 20 uS we are using for our sample rate, different there are a number of clocks to choose from, I believe that clock 3 is one that is built into the chip

Kate - I'm having one of those weeks where it took me an embarassingly long amount of time to figure out that the fact that I wasn't getting anything in serial communicator wasn't a result of my terrible soldering job or various other issues, but rather that I simply hadn't hit the "connect" button. Oh boy. After that, things went pretty well but I need to spend some more time messing around with this stuff, perhaps tonight after class.

Joo Youn - I did the same thing, Kate. Thanks to Alex. If it was not you, I would have spent hours to check other stuff on the code and on the board again and again. 3rd week

Alex - I actually got through the lab without any difficulties (for once). Like lisa said, it was pretty satisfying to see all that reactionary information. Used a flex sensor through most of it. i have BLURRY pictures up on my blog-thing... http://homepages.nyu.edu/~alb426/pcomp.html

Catherine's Lab

Todd- I got going pretty quickly once I figured out that I could just jam a header into a serial connector by clipping off pins, thereby avoiding tiny solders. My power supply was misappropriated also in the midst of this thing, but I finally made a device and program that measures ranges of resistance from a variable resistor, outputs resistance values to a PC via serial, and makes distinct LEDs? light up and generates distinct tones for pre-determined ranges of values. For more info (including code) and pics of the Lil Bastard in his new configuration, Check my journal.

Chris - I hooked up a round FSR and a 10K-Pot to my circuit for this lab. It worked out pretty well. My FSR has 8-bit values from 0-246, but I bet if I tried hard enough, I could get it closer to 255. I divided up the that range and had each division controlling different LEDs?. This is the first lab where I started to get frustrated with the set up of the bread board - I want to be able to spread things out more. I didn't quite get Step 6 of Tom Igoe's lab, either. Until I gave it another shot yesterday. I like registers. I hooked my FSR to output to PortB? and got a reading on how hard I was pressing in LEDs?. Here are some photos.

==============================

- Rolf : Enclosed is the code:

define OSC 4

DEFINE ADC_BITS 8 '

DEFINE ADC_CLOCK 3

DEFINE ADC_SAMPLEUS 20

TRISA = %11111111 'this makes them all A input

ADCON1?? = %00000010 'IF 10 BIT %10000010

output portd.0

output portd.1

adcvar VAR byte

CLEAR

OUTPUT portd.0

OUTPUT portd.1

Main:

adcin 0, adcvar

serout2 portc.6, 16468, [DEC adcvar, 10, 13]

if (adcvar < 125) then

 high portd.0

 low portd.1

else

 low portd.0

 high portd.1

endif

goto main

Great - it works!!! I think I am starting to get some of it. I just wish I had more time to PLAY with this stuff.

=============================

Jury Hahn

Jury Hahn


Page last modified January 31, 2006, at 10:23 PM