Jump to content

Pearl

Members
  • Posts

    53
  • Joined

  • Last visited

Profile Information

  • Gender
    Male
  • Location
    Germany

Pearl's Achievements

MIDIbox Newbie

MIDIbox Newbie (1/4)

0

Reputation

  1. Hi, ok, I merged your changes from main.inc into my code, but for me this doesn't work! After uploading and while rebooting the GLCD shows "Rebooting MIOS", but doesn't switch to "MIOS v. 1.9g" and shows only some additional random rubbish later. After switch off and on again - GLCD is complete blank. My code in main.inc: USER_Init ;; select LCD type #1 (KS0108) movlw 0x00 ; if 0: non-inverted CS, if 1: inverted CS# movwf MIOS_PARAMETER1 movlw 0x00 ; here you could forward an additional parameter movwf MIOS_PARAMETER2 movlw 0x01 call MIOS_LCD_TypeSet bsf MIOS_BOX_CFG0, MIOS_BOX_CFG0_USE_GLCD ... Hope that helps, Stefan
  2. I have a very weird Pic18F4620 here: It looks like pic can't establish a correct midi connection to my midi2usb board - I have 3 core modules each with pic - all 3 pics have the label 1109040 on top - two of my pics are working correct on each socket and can establish a midi connection and I can upload mios applications - for the third pic it doesn't matter which core I try, I can see hex sequence (f0 00 00 7e 40 00 01 f7) every 2 second -> but I can't upload anything - for this Pic I get a valid connection in MIOS Studio only, if I'm using two different MBHP USB Ports which could not be correct (see picture: MidiOut should be at MIDIOUT2) - it also doesn't matter on which MBHP USB port I'm connecting this Pic (both other pics are always working correct) - I can use a Pic 18F452 too and it works correct So, for me it looks like a hardware bug/failure... Did anybody have the same behaviour anywhere? Bye Stefan
  3. Hi, this is not so easy because I have a lot of customization in sourcecode. (I have 3 MidiBoxLC units in one device each with a special configuration and some extra pin mappings and so on) But, of course I can try to compare/merge your changes from version 1.6f to give you some feedback. (I think I need some days, looks like a busy week, but I will post if I'm ready) Buy Stefan
  4. That's it :smile: Thanks for all the cool stuff... ... and a nice weekend! Stefan
  5. Yeaahhhh, I can see now the initial Text "Logic control emulation ready. ... " (it is still in wrong format: there are some additional spaces between (see picture), but that I will check tomorrow) Thanks Stefan
  6. Hello, I'm trying to run upgrade MidiBoxLC v1.6e on a PIC18F4620 with MIOS v1.9g. But after many ours of struggling, searching the forum for answers and testing some settings, I didn't find a way to get the glcd running. If I compile and upload the hex file, it looks like as if the ram for the fonts was overwritten (there is only rubbish at glcd). MIOS Studio says: Reading setup_midibox_unit0.hex Trying to contact the core... setup_midibox_unit0.hex contains 18860 bytes (75 blocks). Range 0x00003000-0x00007aff (19200 bytes) - PIC Flash Upload of 19200 bytes completed after 11.37s (1.65 kb/s) So, it shows that area 07cfc-07fff (where MIOS font is stored) is not affected. - I can upload app Mios example app lcd7/ks0108 and I get the correct welcome screen. So this works. - I can upload my compiled MidiBoxLC and pushing buttons or touching faders are producing midi events I can see in MIOS Studio. Things I've done and/or tried: - copied app_lcd.asm /.ins/.lcd from projekt lcd7/ks0108 into MidiboxLC folder modules/app_lcd/dummy/ - In Makefile.org: set PIC to 18F4620 - I also tried to edit file p18f4620.lkr in MIOS_Base/etc/lkr to split memory page as shown in http://www.midibox.org/dokuwiki/doku.php?id=using_pic18f4620 but this doesn't work for me. And now I need an idea which setting I am missing ... Thanks for any advice, Stefan
  7. Hallo, ich hab jetzt angefangen mich mit dem C-Wrapper zu beschäftigen. Wenn ich ein damit generiertes fertiges Hex - File hochlade, dann sind die Zeichen so breit, das für eine reguläre Zeile mehr als 1 1/2 Zeilen auf dem LCD benötigt werden. Die Zeichen und Buchstaben wirken auch alle viel breiter. Beispiel: Mit dem "project.hex" - file aus der "LC Ver 2 Alpha" wird die Eröfnungszeile ("<--- LC Emulation ready. --->" usw. ) auf zwei Zeilen umgebrochen. Kann dieses Verhalten noch jemand nachvollziehen? Ist für das KS0107/KS0108 -basierte LCD noch eine weitere Einstellung in einem Header nötig? Oder woran kann das liegen Gruß Pearl
  8. Hi, I found the wrong line in main.lst and replaced "rgoto" with "goto" and now everything works fine. Thanx for your hint ... :-) ;-) Bye Paerl
  9. Hi TK ... I didn't writing anything in C , but I got advanced skills VB/VB.Net . So I think, I want to try the beta and will learning by doing. ;-) Another question to my problem: Are memory limits or limits of "branch" and "jumping" in assembler the reason? My additional code is OK in "LC_1_5". I work with my LC one year. Thanx and bye Pearl
  10. Hi there ... Today I tried to update my LC - Application to Vers. 1.6 by copying all my personal modifications to the new source files, but after compiling, I got a similar error as in the past: "Error[126]Â Â E:\MIOS\SW\LC 1.6\LC_1_V1_6\MACROS.H 161 : Argument out of range (1044 not between -1024 and 1023)" What's the meaning of this error-message? And how can I solve this problem? I didn't changed anything in "Macros.h"! Thanx and bye Pearl
  11. Hi everybody ... Here is my solution for handling masterfader-event with an encoder. I hope that I got all the changes ;) . Change in lc_mproc.inc: ... ;; -------------------------------------------------------------------------- ;; Ex has been received: move motorfader ;; -------------------------------------------------------------------------- LC_MPROC_Received_Ex ;; mask out MIDI channel (== fader number) movlw 0x0f andwf MIOS_PARAMETER1, F #if MOTORFADER0_IS_MASTERFADER == 0 ;; do nothing if fader number >= 8 movlw 0x09 ;including "MasterfaderEvent" this has to be 0x09 !!! IFGEQ MIOS_PARAMETER1, ACCESS, return #else ;; exit if fader number == 0 ; movf MIOS_PARAMETER1, W ; skpnz ; return ;; do nothing if fader number >= 9 movlw 0x09 IFGEQ MIOS_PARAMETER1, ACCESS, return ;; master fader 8 -> 0 movlw 0x07 andwf MIOS_PARAMETER1, F #endif ;; move fader movf MIOS_PARAMETER1, W goto LC_MF_FaderMove ; (located in lc_mf.inc) ... Change in lc_mf.inc: ... ;; -------------------------------------------------------------------------- ;; This function is called by LC_MPROC_Received_Ex when a fader should ;; be moved ;; Input: ;; o fader number in WREG and MIOS_PARAMETER1 ;; o LSB value in MIOS_PARAMETER2 ;; o MSB value in MIOS_PARAMETER3 ;; -------------------------------------------------------------------------- LC_MF_FaderMove ;; save fader number in LC_FADER_NUMBER andlw 0x07 movwf LC_FADER_NUMBER ;; LSB = MSB[0] | MIDI LSB btfsc MIOS_PARAMETER3, 0 bsf MIOS_PARAMETER2, 7 ;; MSB = MIDI MSB >> 1 clrc rrf MIOS_PARAMETER3, F ;; 10-bit value = 14-bit value >> 4 clrc rrf MIOS_PARAMETER3, F ; 1 rrf MIOS_PARAMETER2, F clrc rrf MIOS_PARAMETER3, F ; 2 rrf MIOS_PARAMETER2, F clrc rrf MIOS_PARAMETER3, F ; 3 rrf MIOS_PARAMETER2, F clrc rrf MIOS_PARAMETER3, F ; 4 rrf MIOS_PARAMETER2, F ;; check if fader is masterfader movlw 0x07 IFLEQ MIOS_PARAMETER1, ACCESS, goto LC_FADER_MOVE ; branch if fader is not masterfader ;; store 10-bit result in LC_MFADER_POS_[LH] if fader is masterfader and return movff MIOS_PARAMETER2, LC_MFADER_POS_L ; MIDI LSB -> LC_MFADER_POS_L movff MIOS_PARAMETER3, LC_MFADER_POS_H ; MIDI MSB -> LC_MFADER_POS_H return LC_FADER_MOVE ;; store 10-bit result in LC_FADER_POS_[LH] movff MIOS_PARAMETER2, LC_FADER_POS_L ; MIDI LSB -> LC_FADER_POS_L movff MIOS_PARAMETER3, LC_FADER_POS_H ; MIDI MSB -> LC_FADER_POS_H ;; finally move fader movff LC_FADER_POS_L, MIOS_PARAMETER1 movff LC_FADER_POS_H, MIOS_PARAMETER2 movf LC_FADER_NUMBER, W goto MIOS_MF_FaderMove Change in lc_enc.inc: (in my setup last encoder No.28 is for masterfader-event) ... ;; -------------------------------------------------------------------------- ;; This function is called by MIOS when an encoder has been moved ;; Input: ;; o Encoder number in WREG and MIOS_PARAMETER1 ;; o signed incrementer value in MIOS_PARAMETER2: ;; - is positive when encoder has been turned clockwise ;; - is negative when encoder has been turned counter clockwise ;; -------------------------------------------------------------------------- USER_ENC_NotifyChange ;; if encoder number within 0 and 7, send a V-pot event movlw 0x07 IFLEQ MIOS_PARAMETER1, ACCESS, goto LC_ENC_SendVPot ;; send generic cubase "MasterVolumen" event movlw 0x08 IFGEQ MIOS_PARAMETER1, ACCESS, goto LC_ENC_SendMasterVolumen ;; send generic cubase"relative" event movlw 0x1c IFNEQ MIOS_PARAMETER1, ACCESS, goto LC_ENC_SendCubaseRemote ;in my setup some encoders control cubase-generic-remote ;; else do nothing return ... !! You have to modify the branches to your design !! ...and add following lines: ... ;; -------------------------------------------------------------------------- ;; This function is called by MIOS when encoder sends "mastervolume" ;; Input: ;; o signed incrementer value in MIOS_PARAMETER2: ;; - is positive when encoder has been turned clockwise ;; - is negative when encoder has been turned counter clockwise ;; -------------------------------------------------------------------------- LC_ENC_SendMasterVolumen ; ----------------------------------------------------- ;; save incrementer in LC_MFADER_LAST_INC movff MIOS_PARAMETER2, LC_MFADER_LAST_INC ;; now we have to add (or subtract) the incrementer from the absolute value, ;; which has been stored in LC_MFADER_POS_L ;; the simplest solution is the use of MIOS_HLP_16bitAddSaturate, which ;; can handle with values up to 16 bit!!! :-) ;; please refer to the function documentation for the input/output parameters! ;; set pointer to LC_MFADER_POS_L ;; (it is located to an even address, thats important when this function is used!) ;; (and since we are modifying a 16-bit value, the next address to the low-byte ;; is used as high-byte -> see app_defines.h) lfsr FSR1, LC_MFADER_POS_L ;; set max value movlw 0xff ; low-byte of max value movwf MIOS_PARAMETER1 movlw 0x03 ; high-byte of max value movwf MIOS_PARAMETER2 ;; get incrementer (which has been stored in LC_MFADER_LAST_INC) movf LC_MFADER_LAST_INC, W ;; call routine call MIOS_HLP_16bitAddSaturate ;; now [FSR1] = INDF1 = LC_MFADER_POS_L contains the result ;; MIOS_PARAMETER1[0] is set when value has been changed ;; exit routine if value has not been changed IFCLR MIOS_PARAMETER1, 0, return ;----------------------------------------------------------- movf LC_MFADER_POS_L, W movwf LC_FADER_POS_L movf LC_MFADER_POS_H, W movwf LC_FADER_POS_H ;; 10 bit -> 14 bit (LC_MFADER_POS_[LH] << 4) clrc rlf LC_FADER_POS_L, F ; 1 rlf LC_FADER_POS_H, F rlf LC_FADER_POS_L, F ; 2 rlf LC_FADER_POS_H, F rlf LC_FADER_POS_L, F ; 3 rlf LC_FADER_POS_H, F rlf LC_FADER_POS_L, F ; 4 rlf LC_FADER_POS_H, F ;; MIDI MSB: (LC_FADER_POS_H << 1) | LC_FADER_POS_L[7] clrc rlf LC_FADER_POS_H, W IFSET LC_FADER_POS_L, 7, iorlw 0x01 movwf LC_FADER_POS_H ;; MIDI LSB: LC_FADER_POS_L & 0x7f movlw 0x7f andwf LC_FADER_POS_L, F ;; for MIDIbox Link: notify begin of stream call MIOS_MIDI_BeginStream ;; finally send value: E8 LSB MSB for masterfader movlw 0xe8 call MIOS_MIDI_TxBufferPut movf LC_FADER_POS_L, W call MIOS_MIDI_TxBufferPut movf LC_FADER_POS_H, W call MIOS_MIDI_TxBufferPut ;; for MIDIbox Link: notify end of stream call MIOS_MIDI_EndStream return Add in app_defines.h : ... ;; masterfader value for encoder LC_MFADER_POS_L EQU 0x030 ; received and transmitted low byte of fader position; low byte of 16-bit absolute value, address must be even!!! LC_MFADER_POS_H EQU 0x031 ; received and transmitted high byte of fader position; high byte of 16-bit absolute value, address must be odd!!! LC_MFADER_SPEED EQU 0x032 ; the speed setting, selected by Inc/Dec button LC_MFADER_LAST_INC EQU 0x033 ; last incrementer ... Add at the end of lc_init.inc : ... ;; set speed for encoder "masterfader" to "fast", speed exponent value is 3 movlw 0x03 ; speed exponent movwf MIOS_PARAMETER2 movlw MIOS_ENC_SPEED_FAST ; fast speed mode movwf MIOS_PARAMETER1 movlw 0x1c ; in my setup encoder number 28 is masterfader call MIOS_ENC_SpeedSet return ;; <------------------------------------------------------> ... Have fun ;D Pearl
  12. Hi TK ... Cool, Iwill try to integrate this in the next days :) Bye Pearl
  13. Hi there ... Because I didn't find a way to control the MasterVolumen in CubaseSX-GenericRemote, I want to try to integrate an encoder in my MidiboxLC to control the LC-MasterVolumen (usually controlled by one Motorfader). Is there an easy way (means some additional code in "enc.inc") or is this more complicated ? "No Touchsensitiv" is not a problem for me. Thanx for any ideas ... Bye Pearl
  14. Hi there ... Ok, it's definetly a hardware-problem. I tried a new CoreBoard and everything is OK. But I can't find any mistake on the other board (same layout/same charge) . Bye Pearl
  15. Hi there... Testing my second MidiboxLC-Unit, I got some strange "DIN" - behaviour. On the first 4 Shiftregister are buttons they produce very much On/Off - Events when I push the button, instead of one NoteOn when" pushed" and one NoteOff wen "pulled". Here a little overview : x = button doesn't work m = button has much events o = button works ok 1 2 3 4 5 6 7 8 1. Shiftregister |m|x|m|o|m|o|o|o| 2. Shiftregister |o|m|m|m|o|o|o|o| 3. Shiftregister |o|o|m|m|o|o|o|o| 4. Shiftregister |m|m|x|m|o|o|m|o| 5. Shiftregister seems to be ok I got an idea that there is a shortcut to clock-line but i couldn't find anything. :-/ Thanx for ideas what's wrong Pearl
×
×
  • Create New...