|
|
|
|||||||||||||||||||||||||||||||||
Modifying Receive ChannelTechnical note for Callipygian Sight and
Sound MIDI PIC Project Robert Swirsky, November 11, 2004 The software has the channel hard-coded to ;
wait 32 clocks and see if we have a STOP bit (FRAMING ERROR CHECK) ; 8 bits x 32 cycles + 10 = 266 clocks at
this point frame_chk: movf ichar, w ;
266 xorlw 0x99 ; 267 btfss STATUS,
Z ; 268 goto inc_state ; 269, 270 clrf serial_state ; 270 (we
have a 0x99! Set the state to 1... ; ...by zeroing
it here and incrementing below inc_state: incf serial_state, f ;
271 That code is checking for a command starting with
hex 99 which is 99 means “Note On”. We want to leave that alone. The second digit 99 means channel 10. (Why 10?
Because To change the channel to
So if you want this PIC to respond to channel 13, you want hex digit “C”. Replace that line of code with xorlw 0x9C ; 267 …recompile, link, and burn, and you’re in business! |
||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||