Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Feb 10th, 2012  |  syntax: None  |  size: 3.50 KB  |  hits: 58  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. physical design
  2. two jacks each side (one in one out)/two jacks on left (one in one out), 2 jacks (one in one out) + 2 din on right
  3. dins could be top and bottom I guess
  4. top
  5. <-||<-
  6. ->||->
  7. bottom
  8. both jack sockets have a switch
  9. 3 position switch on top, learn,lock, auto
  10. 1 button start auto detect
  11. 2 led's led 1 indicates configured, led 2 indicates power.
  12.  
  13. use trs jack to be compatible with simple cheap extension cables
  14. s = power
  15. r = data
  16. t = ground
  17.  
  18. this should allow hot plug with minimal risk
  19.  
  20. use midi protocol compatible serial signalling, this would allow us to link multiple units using midi cabling for physical separation if we desired, this also allows us to convert to standard midi signalling easily for sending to device to be controlled, potential host side application to read device configuration sysex
  21.  
  22. if switch = auto
  23. bottom  top     meaning
  24. F       F       isolated, start at channel 1 output your own channels only, write chan 1 to eeprom
  25. F       T       end unit on chain, output to bottom socket (use switch to redirect to bottom socket on left electrically), wait for sysex                       from unit on right, this will define all currently used channels pick next sequential, build and transmit                       onwards sysex to left, write start channel to eeprom, set configured flag
  26. T       F       Righthand unit transmit on channel 1 + send sysex on power up or "start auto detect", write channel 1 to eeprom, if button                      start auto is pressed send configuration sysex, set configured flag.
  27. T       T       mid span unit, wait for sysex from unit on right, this will define all currently used channels pick next sequential, build                      and transmit onwards sysex to left, write start channel to eeprom, set configured flag
  28.  
  29. if switch = lock
  30. set configured flag
  31. read channel data from eeprom, if sysex revived or auto config button pressed whilst right hand unit transmit channel configuration information but don't change eeprom value
  32.  
  33. if switch = learn
  34. set channel as per next revived midi message, set configured flag
  35.  
  36.  
  37. when configured flag is set
  38. light led 1
  39. if top = true revive sequential channel data from channel on right, append own data and transmit out to left
  40.  
  41.  
  42. unit software
  43. configuration specific to input hardware done via define
  44. define covers,
  45. input device type: analogue voltage, digital switch, quadrature encoder, absolute encoder etc
  46. signal generated by device, eg note, controller,pitch bend etc
  47. pin(s)/adc to read, number and type governed by device type, shouldn't prevent an analogue signal generating notes if so desired
  48. analogue scaling method: (low bits, high bits) not mutually exclusive, eg bits could be used to drive two different controller messages (use bit                                masking?), divide by factor.
  49. sequence number, for internal use in device to define order controller work with inside device
  50.  
  51. sysex generated from above, only channel numbers should need to be recalculated on the fly
  52.  
  53. main loop,
  54. read inputs, in sequence generate output messages, place in buffer, order of midi messages insignificant so place at start of buffer area
  55. isr timer 1
  56. if channel = 1
  57.         send current data
  58.         else return to main
  59.  
  60. isr received data
  61. read incoming data into lowest available slot in buffer (can be allocated at compile time, configuration is known), transmit full buffer.
  62. return to main
  63.  
  64.  
  65.  
  66. interface unit(to avoid cost of two dins + voltage --> current loop signaling chip/hardware per unit)
  67. 2 jacks left side, two standard midi din right side, use of an interface unit would require some changes to the way the auto detect logic works
  68.  
  69. <-||=
  70. ->||=