Jump to content

bilderbuchi

Programmer
  • Posts

    87
  • Joined

  • Last visited

Everything posted by bilderbuchi

  1. so, an update, and questions: The setup: I now have one core, the stagebox (with a DIN), and one core, the distributor (with a DOut with LEDs on the pins), and linked them with a CAN/wired-and interface on a protoboard (as per the mbsid v2 communication pdf). I have adapted midio128 (2.2c) with code from midibox_sid_v2_0_rc37. Included mbnet.inc, and hopefully added all the necessary stuff (in main.inc, app_defines.h. at least i have no errors when make'ing. Initialized the CAN interface, and in USER_Tick, call MBNET_Handler. I took the function CS_MENU_MBNET_Tx_SendEvent (sends midi event over CAN, exactly what i want), adapted it a bit, and included it in midi_evnt.inc in the function MIDI_EVNT_Send, so that when a midi event is sent, it's also transmitted via CAN. The distributor reacts to incoming midi signals, and switches dout LEDs (as per midio128 standard functionality). The problem: I have sucessfully triggered LEDs via CAN with this setup. The problem is, this does not happen consistently, I only get a triggered LED in about 20-30% of button presses. I don't know why, MIDI gets transmitted correctly every time. Diagnosis: I took a simple oscope to check the CAN bus. when an LED is triggered, there is activity on the CAN bus. Suspecting an error in my hardware setup, I connected the CAN pins directly to the jumpers on the core pcb (not via the flat cable), no change. Apparently the problem lies with the sender in the stagebox core, since there's only activity on the Tx pin when an LED is triggered, too (so not on every button press as it should be). so the bus transmission seems to work well, so i suggest a software problem. Correct? I don't know what to look at, assembly coding feels like building a model airplane with a chainsaw and a caulking gun.... I'd be glad if someone could help me, since the functionality I need does not seem too complicated (basically send Midi also via CAN on every button press). Many thanks for any efforts! I have to applaud the very well-commented code! Without those comments any efforts on my part would have been doomed from the start. Btw I wasn't sure if I should split this off into another thread in the programming section, or not. Code snippets: MIDI_EVNT_Send ;; -------------------------------------------------------------------------- ;; MBNet stuff (BB) ;; hope this is functional code: call CS_MENU_MBNET_Tx_SimpleSend ;; -------------------------------------------------------------------------- call MIOS_MIDI_BeginStream ..... ;; -------------------------------------------------------------------------- ;; simpler routine modified from CS_MENU_MBNET_Tx_SendEvent ;; IN: slave target already in MBNET_SLAVE_ID? ;; MIDI event in : ;; o first MIDI event byte in MIDI_EVNT0 ;; o second MIDI event byte (if applicable) in MIDI_EVNT1 ;; o value in MIDI_EVNT_VALUE ;; -------------------------------------------------------------------------- CS_MENU_MBNET_Tx_SimpleSend ;; movff CS_MENU_SID, MBNET_SLAVE_ID ; prepare transmission movff MBNET_RETRY_NODE, MBNET_SLAVE_ID ; 1 or MBNET_RETRY_NODE? SET_BSR MBNET_BASE ; EID[LH] always 0 movlw 6 ; ETOS=6 movwf MBNET_EID_L, BANKED clrf MBNET_EID_H, BANKED movlw 0 ; TOS call MBNET_Tx_Prepare ; returns pointer to DLC of Tx buffer in FSR1 bnz CS_MENU_MBNET_Tx_SimpleSend_End ; skip if slave not available movlw 3 ; 3 additional byte to send movwf POSTINC1 ; DLC movff MIDI_EVNT0, POSTINC1 ; D0 movff MIDI_EVNT1, POSTINC1 ; D1 movff MIDI_EVNT_VALUE, POSTINC1 ; D2 call MBNET_Tx_Perform ; performs the transfer and waits for an acknowledge from slave skpz ; re-init display if transfer failed rgoto CS_MENU_MBNET_Error CS_MENU_MBNET_Tx_SimpleSend_End return full code attached, I added a comment containing "(BB)" where I changed stuff. Also, there's a git repository in it if you like that. :-) midibox-slidecontrol.zip
  2. regarding 4bit mode: great, thanks for the info! thanks for the link to mbnet. i'll dig in and see if i can make sense of it. :-)
  3. kann mittlerweile bestätigen (mit der 32bit version) dass ich keine meldung von der midibox bekomme. kriege immer Mit MIOS Studio beta9 geht's aber. :hmm: was' da falsch?
  4. weigu's ersten teil (tool fenster) kann ich bestätigen. keyboard shortcuts (Ctrl-Q, etc) wurden bei mir gar keine erkannt?? :hmm: den rest wahrsch. erst später. auch dass premake 3.7 erforderlich ist. bei V4 hat sich anscheinend an der syntax einiges geändert. mit ./premake4 --file=premake.lua --cc=gcc --target=gnu kam nur ...os32/trunk/tools/mios_studio/build/linux/premake.lua:2: attempt to index global 'project' (a function value) edit: 64bit erfolgreich kompiliert, hier funktionieren die tastenkürzel... seltsam.
  5. well, it's been a while, but things have happened. i got 2 cores now, with 18f4685 chips, and 2 CAN transceiver IC's, so I'm more or less set. :-) Question 1: I adapted the MidIO128 application for 4bit LCD mode by inserting the relevant code (from the wiki) into the main.inc file. I got a second LCD where I cut D0-D3 as per the CAN instructions for the 18F4685. Interestingly, 4bit mode or not does not make a difference for the display. I tried the unmodified display, and the one with the cut wires with both an unmodded MIDIO128 application and the one using the 4bit mode, in all permutation the display just works, I can't spot any difference. Is that correct behaviour? I'd have thought that an LCD with these 4 wires cut wouldn't work anymore in "normal" mode. I haven't wired up the CAN transceivers, so can't say anything about that side of the story. One step at a time... Question 2: I plan to use MIDIO128 as the base for my program (it's simple and does all I need button/midi/controlwise, just have to control one DIn, one DOut). I already included the 4bit mode to free the CAN interface pins as per question 1. Now I have to include the MBNet functionality into MIDIO128. How do I do that? Is there a library or source file to more or less drop into the MIDIO128 source code? (Like a C .h/.c file, #include and you're all set) Also, I have to persuade the app in the stagebox core to forward all midi signals via MBNet/CAN to the core in the distributor box. How/where do I do that? I have to admit I'm overwhelmed by the MBNet wiki page. Question 3: Is there a C-based application that would be more usable for my purposes? I don't speak assembler, so any modifications will have to be more or less copy-paste, but speak C well enough to modify existing code if it's not too hardware-near. I think... :-) thanks!
  6. bist du sicher dass die den zoll zahlen? "customs fees" würd ich eher als bearbeitungsgebühren interpretieren; denke zoll bzw einfuhrumsatzsteuer wirst du trotzdem zahlen müssen... ich brauch leider grad nix von mouser. :-(
  7. just wanted to say thanks for your efforts TK. today I finished my GM5 2I/O in an electrical junctionbox. nice and small. :frantics: http://midibox.org/forums/index.php?app=gallery&module=user&user=6385&do=view_album&album=62
  8. My 2In/2Out midi interface in an electrical junction box for minimal size.
  9. bilderbuchi

    Finished case

    From the album: bilderbuchi GM5-in-a-junctionbox

    The finished case. The junction box has the advantage that you can hang/mount it out of the way in your workshop. :thumbsup: the yellow led i found nicely fits the yellow usb cable.
  10. From the album: bilderbuchi GM5-in-a-junctionbox

    you can see, there's not much space in there.
  11. From the album: bilderbuchi GM5-in-a-junctionbox

    Added a small extension board for the second I/O which will be located in the lid because of space constraints. I did my first experiments with laser cutting/engraving on the lid, some labeling and logo. Unfortunately, the soft material can'T be engraved very well, it just melts away and leaves ridges.
  12. bilderbuchi

    step 2

    From the album: bilderbuchi GM5-in-a-junctionbox

    added midi ports and LED; standard coutouts are nicely sized for the 15mm dia jacks. good thing that the case is made out of flexible plastic since things are a bit tight. :rolleyes:
  13. bilderbuchi

    A perfect fit

    From the album: bilderbuchi GM5-in-a-junctionbox

    The GM5 pcb fits snugly in a half-width junction box from the hardware store (OBI).
  14. @platinenfoto: rosch, bist du da ohne isolierband unter den kondensatoren ausgekommen? das schaut sehr so aus als ob das obere bein sehr leicht mit der masse kurzschließen könnte beim einbau..
  15. +1 für linuxversion, wenns nicht zuviel aufwand ist. :flowers:
  16. ok, i misread, it's partially aluminium: Thinkgeek says "Front panel is constructed from brushed aluminum". i'll have to see how much space there is in there for core, a display instead of the speaker grille, and some I/O..
  17. Hi! I just stumbled over the Bliptronic synth on the net: http://www.thinkgeek.com/electronics/musical-instruments/c4e1/ What makes it really interesting is that a guy posted the full pinout of the PCB. It seems by ordering and gutting a bliptronic you get a pre-made BLM and aluminium enclosure for just 50$. I think from the description here that it would be possible to re-use the enclosure and blm for your own midibox projects... in fact, this guy even sells arduino-hack-kits for converting the bliptronic to an arduinome. I think if the BLM pinout, voltage etc is compatible to mios (is it?), this could be interesting. edit: found some more details, including a circuit diagram.
  18. hey, they even got 4x4, and matching pcb (cut to desired size!). nice! they're smaller (0.5") than the sparkfun ones (0.59"), which i find is a good thing, but they also got bigger ones (0.625").
  19. we can all thank google stalker/skynet for that! :tongue:
  20. i was also fearsome, but with some education (i.e. youtube tutorials) beforehand, i was able to solder the GM5 as my first SMD part ever. not very many problems, except my desoldering braid sucks (in a bad sense). now i'm waiting for the parts to arrive so i can assemble the thing and see if it works. :-) lose the fear :-)
  21. i got mine from http://www.seeedstudio.com/ i like it, performs nicely (considering the price). haven't used it for anything midibox-related, though. i also tried to place an order, no luck. was foreseeable, though, for me being in europe. this can also be seen in the distribution of successful orders.. 800/1000 orders came from the U.S.
  22. shouldn't this _decrease_ the SN ratio? i.e. noise gets stronger? :yes:
  23. those? http://www.midibox.org/forum/index.php/topic,12159.msg116159.html#msg116159
  24. good thing i used the search function... i just wanted to report about the monome-like-buttons and the supplier cause i found them just today :)
  25. so lukas, how are the buttons?
×
×
  • Create New...