Monday, March 20, 2006

w_8_group presentation

refer to
this page

Tuesday, March 07, 2006

w_7_midi




If ASCII is a protocol for text MIDI is for music. MIDI synthesizer decodes binary codes from PIC into musical notes. We can experience more defined sound by plugging it in synthesizer equipped with various sound module.
As I have worked in a place where I can witness developments of digital instruments for music, I can tell how MIDI has been improved. About 10 years ago, keyboard players had to install a separate MIDI box near their keyboards. But after synthesizer with built-in midi (i.e. Yamaha SY-99, musician's longtime favorite) came into world, keyboard players lessened their carriage weight for concerts.

The problem I encountered while wiring this circuit was from wrong configuration settings. I should have changed configuration option to HS. Joseph helped me when I almost gave up after tens of errors.

I found wiring circuit or slodering MIDI connector was basically same as for DB9 serial connector. MIDI is for exchnaging data between PIC and other device as DB9 is between PIC and PC.

I did not have 7404 Hex inverter. I made simple circuit using Michael's code example. Experiment of changing instrument type, note or volume by varying arguments is set aside for future.

w_7_midi_code from Michael

'****************************************************************
'* Name : midi.BAS *
'* Author : Michael Luck Schneider *
'* Notice : Copyright (c) 2006 Michael Luck Schneider *
'* : All Rights Reserved *
'* Date : 2/28/2006 *
'* Version : 1.0 *
'* Notes : *
'* : *
'****************************************************************
define OSC 20 'midi needs a 20 mhz clock

txPin var portc.6
LED var portd.0
Sw1 var portb.7

output led
output txpin
input sw1

x var byte
lastSw1 var byte


for x = 0 to 6
high led
pause 100
low led
pause 200
next

lastsw1 = sw1

main:
if sw1 != lastsw1 then 'if there has been a change of state
pause 10 'debounce
if sw1 = 1 then 'see if the button has been pushed
serout2 txpin, 12, [144, 80, 127] 'noteon channel 1, note 80, full volume
else 'or released
serout2 txpin, 12, [144, 80, 0] 'noeton channel 1, note 80, 0 velocity (same as note off)
endif
lastsw1 = sw1 'for change of state
endif

goto main

w_6_servo motor



Please click the image to start.


I tried this LAb without H-bridge. To my understanding, H-bridge is necessary to change the direction of servor mortor. I borrowed code from Todd and the motor changed it's direction without H-bridge. I vaguely understood that "if" statement in code programming has made it possible. I will give it a try again with H-bridge.

Monday, March 06, 2006

w_6_servo motor_code from Todd

''****************************************************************
'* Name : UNTITLED.BAS *
'* Author : Todd Holoubek *
'* Notice : Copyright (c) 2004 Todd Holoubel *
'* : All Rights Reserved *
'* Date : 6/7/2004 *
'* Version : 1.0 *
'* Notes : *
'* : *
'****************************************************************
DEFINE OSC 4
start:
pulseWidth var byte
'thes values can be vary with different motors
minPulse CON 75
maxPulse CON 250
refreshPeriod CON 5
'pulsewidth = maxPulse
myDir var byte
myDir = 1
main:
low PORTD.2
PulsOut PORTD.2, pulseWidth
pause refreshPeriod
if myDir = 1 then
pulsewidth = pulseWidth + 1
else
pulsewidth = pulseWidth - 1
endif
IF pulseWidth <= minPulse THEN
myDir = 1
ENDIF
IF pulseWidth >= maxPulse THEN
myDir = 0
ENDIF
GOTO main

Sunday, March 05, 2006

w_5_serial out_ascii text



Please click the image to start.


I learned that English characters need to be changed into binary numbers to be exchanged between digital device. ASCII is a protocol, or an agreement, which is setup for this. Call and response worked well. But I failed in making it work with photocell and potentiometer.

w_5_serial out_ascii text_code from Michael

DEFINE OSC 4
myvar var byte

main:

serout2 portc.6, 16468, ["myvar = ", myvar, 13, 10, "mydec = ", dec myvar, 13, 10]
myvar = myvar + 1
pause 200
goto main

w_4_simple pwm_blinking LED



Blinking LED

Please click the image to start.


PWM (Pulse Width Modulation) was understandable conceptually. To implement in the code was another matter.

w_4_simple PWM_code from Michael

'****************************************************************
'* Name : UNTITLED.BAS *
'* Author : [select VIEW...EDITOR OPTIONS] *
'* Notice : Copyright (c) 2005 [select VIEW...EDITOR OPTIONS] *
'* : All Rights Reserved *
'* Date : 9/29/2005 *
'* Version : 1.0 *
'* Notes : *
'* : *
'****************************************************************
DEFINE OSC 4

output portc.0

arf var byte
duty var byte
counter var byte

for arf = 0 to 3
high portc.0
pause 100
low portc.0
pause 200
next

main:

for duty = 0 to 255
pwm portc.0, duty, 1
next

goto main

Wednesday, March 01, 2006

w_6_Reading

Response to "Testing Beyond Usability" by Elizabeth B.N. Sanders

Elizabeth B.N. Sanders’ “Testing Beyond Usability” shows a whole process of designing a new product – school lunch kits. Reading her essay I was amazed too many researches are executed for design requirements. A research, especially on users’ feedback has been on the top of marketing department’s task list. Emphasis on design research, to my knowledge, is quite a new trend. However, this essay proves that design researches affect no less than marketing researches.
I think finding out users’ insight into a product will be more precisely and efficiently acquired by design research. Yet my experience tells that in too many cases designers are not asked to attend meetings for deciding whether to make a new product or not. Sanders’ essay also implies that Fitch RS, design company, was asked to embark on research only after Thermos had decided to make new lunch kits.
I think early involvement of designing team is critical for securing success of new products. This practice will save many tasks that followed initial engagement of designing team.