Jump to content

TK.

Administrators
  • Posts

    15,247
  • Joined

Everything posted by TK.

  1. Yves built this really clean and stable controller Not only the panel looks nice, check especially the internals - respect from my side! :) More pictures can be found at this webpage: http://perso.wanadoo.fr/yves.rouquier/midibox/photo.html
  2. TK.

    BankStick

    nicht nur das, der Driver waere wahrscheinlich viel umstaendlicher zu programmieren, sprich: mehr Codespeicher wird verbraucht, sprich: weniger Platz fuer zusaetzliche Synth Features, und das wollen wir doch alle nicht, oder? ;-) Gruss, Thorsten.
  3. TK.

    SM example

    Hi, it doesn't matter which MIDI events are sent, due to the large MIDI output buffer which is provided by MIOS (a FIFO), the timings are very relaxed once an (button toggle) event has been determined Best Regards, Thorsten.
  4. Hi Steve, so far I can see, the order is just reversed: OLD NEW 0: 12 5 1: 13 4 2: 14 2 3: 15 1 4: 1 15 5: 2 14 6: 4 13 7: 5 12 thats an easy change, just add following lines below the USER_AIN_NotifyChange label in main.asm: USER_AIN_NotifyChange ;; reverse order of pin numbers in MIOS_PARAMETER1[2..0] movlw b'00000111' xorwf MIOS_PARAMETER1, F [/code] (hope it works) Best Regards, Thorsten.
  5. Hi Moritz, the details can be found in the PIC18F452 datasheet, which can be downloaded from the Microchip page. Chapter 14.5 describes the PWM module, it also contains some hints for the configuration. I just have noticed, that only Timer2 is allocated - this means, that there are no MIOS specific restrictions. Best Regards, Thorsten.
  6. so, the hardware seems to be ok, then it must be a problem with the VFD driver. I don't know Seppoman's implementation, could it be that it uses register addresses, which are normaly reserved for the MIOS or the MBSID firmware? Or in other words: which addresses are used by the driver? Best Regards, Thorsten.
  7. Please forgive me, that I'm not able to give you an sufficient reply to all your questions/assumptions. I even don't find the time to complete the layout of MBHP_BURNER, which should replace MBHP_JDM due to all these strange problems (I'm neither the designer of the JDM circuit, nor the programmer of IC-Prog, therefore it's also VooDoo for me... the MBHP_BURNER design and the P18 programming software are much more "straight-forward") :-/ Most of the effects you described (even the strange ones like the slowly dropping voltage at the clock pin) are normal (I don't know why, I only know that this doesn't hurt, since the clock is normaly toggled very fast), but: this seems to be the problem. The MCLR voltage must be stable during programming - maybe your two 9V blocks are not strong enough? Do you have a 15..20V PSU, or two PSUs which could be combined? Best Regards, Thorsten.
  8. Just have a look into mios_reset.inc, what do you see? Two goto instructions at the same address (the BSL replaces the first one by a goto to itself) It doesn't matter if you replace the first goto (two 16-bit words) by two NOPs, or by another goto... Without loosing too much words: the BSL is not required to boot MIOS Best Regards, Thorsten.
  9. Hi, I've added some comments to the FAQ: http://www.avishowtech.com/midibox/wiki/index.php/Question%20and%20Answers#QA10 Best Regards, Thorsten.
  10. it's not required to alter the (default) tables of mios_tables.inc, you can let it like it is. I guess that it's a different problem that I noticed today during the programming of the EG see also the comment in eg.c: // eg0_int.LAST_GATE = eg0.GATE; // doesn't work with SDCC v2.5.0 [/code] it seems that a direct bit copy won't be handled properly by the compiler. This means, that also following line in map.c: [code] aout_gates.G0 = midi_note[0].GATE; cannot work. Could you please try the following modification (in map.c) aout_gates.G0 = midi_note[0].GATE ? 1 : 0; [/code] and if this doesn't work, try: [code] if( midi_note[0].GATE ) aout_gates.G0 = 1; else aout_gates.G0 = 0; Best Regards, Thorsten. P.S.: I must admit that I'm currently not able to test the gate function by myself, since my AOUT board is within a screwless box, which cannot be opened so easily. I've no external plugs for the gate outputs...
  11. Hi Pilo, the source code of the BSL is part of the mios_v1_8_src package However, you only need to add two NOPs at 0x0000, and the program should start without the bootstrap loader Jidis: maybe such a generic sysex tool could be part of MIOS Studio (sooner or later) Best Regards, Thorsten.
  12. Hi Stefan, could it be, that the VFD consumes so much power, that the core supply falls to <5V? This could evtl. explain, why the BankStick cannot be accessed properly. Which voltage do you read between the various Vs/Vd pins (ground/+5V) when the VFD is connected, and when not... (Solution for this case: either a seperate 7805 for the VFD, or a stronger PSU) Best Regards, Thorsten.
  13. Hi Moritz, how many motors should be controlled? The PIC contains two special hardware peripherals for PWM generation, one is not allocated by MIOS and can be used for any purpose (e.g. the MBSID application uses this module to generate a 1 MHz clock with 1:1 duty cycle) The second one is free, if the application doesn't need the USER_Timer process Best Regards, Thorsten.
  14. Hi, v1.1 is now available, it provides two 16bit LFOs (instead of 8bit), and an envelope generator. My hope is, that the next additions are implemented by you! :) Moxi: of course, you can add up to 128 gate outputs by using shift registers. I don't want to support J5 outputs by myself, since this could lead to a short circuit if somebody enables such an option so long analog pots are connected to J5 Best Regards, Thorsten.
  15. TK.

    SIDplayer

    Maybe you've overseen that the MBSID Sidplayer gets use of the SIDstation protocol, that the support for this protocol is a propratary extension of SIDPLAY1, and that the source code of this version is not available. Do you expect that somebody develops a new SIDPLAYer based on your wishes? Then please say this clearly (so that I can say clearly that I've no interest in spending any more effort for this toy - maybe somebody else?) Best Regards, Thorsten.
  16. Hi Dave, such a touch sensor feature is already provided by MIOS, you don't need additional digital logic. More informations can be found here http://69.56.171.55/~midibox/forum/index.php?topic=1544.0 Best Regards, Thorsten.
  17. Great! So, only Martin's issue is still open. Martin: could it be that there is a syntax error - you can check this in main.err Important: there must be at least one space character before each instruction, otherwise it will be interpreted as a label Best Regards, Thorsten.
  18. So long you can live with static MIDI event assignments, and without a "toggle" feature, it's easy to extend a MB64 or MB64e to 128 buttons and LEDs. The ain64_din128_dout128_v1_3 application give you some inspirations (read the comments) Best Regards, Thorsten.
  19. Hi Chriss, (this is not a programming specific answer, but I guess that you can excuse me, that I cannot dictate the code for all possible modifications due to time reasons...) the assumption that each LED consumes 20 mA is wrong. One point is, that the max. current is limited by the 74HC595 (80 mA maximum), another point is, that the LEDs are not completely saturated due to the 220 Ohm resistor... in practice the current is mostly about 10mA Best Regards, Thorsten.
  20. Maybe this application gives you more freedom for your personal whishes? ;-) http://69.56.171.55/~midibox/forum/index.php?topic=5080.0 Best Regards, Thorsten.
  21. Hi Gerald, does it work better with following line: set SDCC_DEFINES="-DDEBUG_MODE=0" similar things have to be done in tools\make_sub.bat If this doesn't help, then it's maybe better when I'm writing some kind of makefile generator, which doesn't get use of such special tricks The Analog Toolbox is now released, the description can be found here: http://69.56.171.55/~midibox/forum/index.php?topic=5080.0 Best Regards, Thorsten.
  22. now available at http://www.ucapps.de/mios_download.html from the README.txt Analog Toolbox V1.1 (C) 2005 Thorsten Klose (tk@midibox.org) =============================================================================== This application allows to output analog values at the AOUT module depending on analog values, MIDI events and internally generated waveforms It's definitely not a professional tool, but just a toy for having some fun! Everybody is welcome for sharing additional modules and/or processing algorithms to the MIDIbox community! =============================================================================== A precompiled binary is already part of this package: o project.hex (can be loaded into MIOS Studio) o project.syx (can be loaded into any SysEx upload tool) Following tools are required to recompile the code: o SDCC v2.5.0 o gputils o perl The details are described under http://www.ucapps.de/mios_c.html =============================================================================== Required hardware: o one MBHP_CORE module o one MBHP_AOUT module Optional hardware (not supported by default, but provided by MIOS): o up to 2*AINX4 for up to 64 analog inputs (reduces the sampling frequency!) o up to 4*DOUTX4 for up to 128 digital outputs o up to 4*DINX4 for up to 128 digital inputs o LCD - but note that it affects the realtime performance! o up to 8 BankSticks to store waveforms or other tables =============================================================================== Configuration steps: o check the "general application settings" in main.h if changes are required for your hardware setup By default 8 analog inputs are used in "UnMuxed mode" (direct connection to CORE:J5 without AINX4 modules) Remember: unusued analog pins on the CORE module should be clamped to ground! o check the pin configuration for the AOUT module in aout.h The default pinning is equal to the pinning used by MIDIbox CV o open map.c and adapt the "signal processing" for your needs o the application can be rebuilt with the "make.bat" file (type "make" in a DOS command shell) =============================================================================== Description about the most important files: - mios_wrapper\mios_wrapper.asm and mios_wrapper\mios_tables.inc: The MIOS wrapper code and MIOS specific configuration tables - pic18f452.c: exports PIC18F452 specific SFRs - main.c: the main program with all MIOS hooks - aout.c: the AOUT module driver (1) - midi.c: the MIDI processing module (2) - lfo.c: provides two digital LFOs (3) - eg.c: provides an envelope generator (4) - map.c: handles the "signal processing" (analog output values are determined here) (5) There are additional .h files for all .c files which contain general definitions and the declaration of global functions/variables These .h files must be included into the program parts which get use of these globals ------------------------------------------------------------------------------- (1) aout.c this module provides following global variables: unsigned int aout_value[8] (12bit value) accessible with: aout_value[0] for the first AOUT aout_value[1] for the second AOUT ... aout_value[7] for the 8th AOUT aout_gates_t aout_gates (union with two elements: G0 and G1) accessible with: aout_gates.G0 for the first gate on the AOUT module aout_gates.G1 for the second gate on the AOUT module value changes will lead to an automatic update on the AOUT module ------------------------------------------------------------------------------- (2) midi.c this module provides following global variables: midi_note_t midi_note[16] (union with two elements: NOTE and GATE) midi_note[0] for the first MIDI channel midi_note[1] for the second MIDI channel ... midi_note[15] for the 16th MIDI channel Union usage: midi_note[x].NOTE returns the note number (0-127), midi_note[x].GATE returns the gate state (0 or 1) unsigned char midi_cc_chn0[128] for CC values received on MIDI channel #1 Examples: midi_cc_chn0[1] returns the ModWheel Value midi_cc_chn0[7] returns the Volume midi_cc_chn0[10] returns the Pan position midi_cc_chn0[11] returns the expression value unsigned int midi_pitch_bender[16] for Pitch Bender values ------------------------------------------------------------------------------- (3) lfo.c By default two digital LFOs are provided, the selectable rate goes from 0.016 Hz to 97.4 Hz (see lfo_table.inc) - however, above 20 Hz the generated waveform doesn't look so nice anymore on the scope due to quantisation effects (on the other hands: some people drool for such effects ;-) The LFOs generate a sawtooth waveform, which can be easily transformed into other waveforms by using a waveform table (map.c contains an example, how to convert this saw into a sinewave) The LFOs are clocked from the USER_Timer() process each 1 mS (see timer configuration in main.c) Following global variables are available: unsigned char lfo0_rate, lfo1_rate the LFO rate from 0..255 unsigned int lfo0_value, lfo1_value the LFO waveform from 0..65535 (16 bit) ------------------------------------------------------------------------------- (4) eg.c By default one digital ADSR envelope generator is provided, the selectable attack/decay/release rate goes from 1 mS to 2731 mS (see eg_table.inc) The EGs is clocked from the USER_Timer() process each 1 mS (see timer configuration in main.c) Following global variables are available: eg_state_t eg0 provides the gate: eg0.GATE = 1 to set, = 0 to clear unsigned int eg0_value the EG value from 0..65535 (16bit) unsigned char eg0_attack, eg0_decay, eg0_sustain, eg0_release the ADSR values from 0..255 ------------------------------------------------------------------------------- (5) map.c Thats the central file where incoming and internal values are routed to outgoing values (aout_value[0..7], ...) Please read the file to get some inspirations Note that sometimes values need to be converted depending on the resolution. For better readability, some macros have been defined which can be found in aout.h Example: aout_value[0] is a 12bit value, MIOS_AIN_PinGet(0) delivers a 10-bit value. In order to convert this to a 12bit value, just use the CONV_10BIT_TO_12BIT macro: aout_value[0] = CONV_10BIT_TO_12BIT(MIOS_AIN_PinGet(0)); so that the most significant bit of the 10bit value is aligned to the most significant bit of the 12bit value (in fact the value is multiplicated by 4, resp. it is leftshifted 2 times) Additional notes to digital inputs and outputs: if DINX4 and/or DOUTX4 modules are connected, the number of shift registers have to be defined in main.c, function USER_Init() in the following way: MIOS_SRIO_NumberSet(4); // for 4 shift registers Thereafter you can get digital values with: MIOS_DIN_PinGet(<pin-number>) and set values with: MIOS_DOUT_PinSet(<pin-number>, <value>) Additional notes to module extensions: MIOS provides some hooks which could be useful for some special jobs, e.g. MIDI clock processing. This example demonstrates, how to add a MIDI clock handler: a) open main.c, search for the MPROC_NotifyReceivedByte function and add following lines: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void MPROC_NotifyReceivedByte(unsigned char byte) __wparam { if( byte == 0xf8 ) // MIDI clock has been received MAP_MIDIClock(); // call MAP_MIDIClock to notify this } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - b) open map.h, search for "prototypes", and add the function declaration here: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void MAP_MIDIClock(void); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - c) open map.c, go to the bottom and add following lines: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void MAP_MIDIClock(void) { // do anything here } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - =============================================================================== [/code] Best Regards, Thorsten.
  23. Hallo Jan, das macht Sinn - besten Dank fuer den Hinweis! Scheinbar befindet sich der Fehler nur in mbhp_lcd und mbhp_mf, ich habe es geaendert und werde es mit dem naechsten Boot von Windows ausprobieren Gruss, Thorsten.
  24. Hi Martin, whoops - you are right. I oversaw that the LEDs are not MIDI controllable in this application. However, just open main.asm, search for following comment: USER_MPROC_NotifyFoundEvent ;; here we could insert code which switches the LEDs on/off via ;; MIDI return [/code] Replace it by: [code] USER_MPROC_NotifyFoundEvent ;; entry number is in WREG --- it corresponds to the LED which should be switched ;; the note velocity (or CC value) switches on/off the LED, it's stored in MIOS_PARAMETER3 IFSET MIOS_PARAMETER3, 6, call MIOS_DOUT_PinSet1 ; set LED if value >= 64 IFCLR MIOS_PARAMETER3, 6, call MIOS_DOUT_PinSet0 ; clear LED if value < 64 ;; thats all return In order to prevent that a button controls a LED, search for "USER_DIN_NotifyToggle" and remove following code: ;; now toggle the appr. DOUT LED movf TMP3, W ; button number has been saved in TMP3. This is also the LED number IFCLR TMP4, 0, call MIOS_DOUT_PinSet1 ; if button has been pressed (value = 0V = CLR): LED on IFSET TMP4, 0, call MIOS_DOUT_PinSet0 ; if button has been depressed (value = 5V = SET): L ED off [/code] Best Regards, Thorsten. P.S.: sometimes I don't know why I'm writing comments... ;-)
  25. No, such util routines are not available yet (they consume a lot of CPU time and they are very LCD specific) Best Regards, Thorsten.
×
×
  • Create New...