Jump to content

Phatline

Members
  • Posts

    1,279
  • Joined

  • Last visited

  • Days Won

    71

Posts posted by Phatline

  1. 8Bit 18f452 Core - SDCC -10K Pot direct connected to J5, rest  to GND

     

    the Pot give me 4times 0-255 on his travel way (0-255, 0-255, 0-255, 0-255)

     

    in main.c i got this settings:

    //Include files
    #include <cmios.h>
    #include <pic18fregs.h>
    #include "main.h"

    void Init(void) __wparam
    {
      MIOS_AIN_NumberSet(7);
      MIOS_AIN_UnMuxed();
      //MIOS_AIN_DeadbandSet(10);

    What I tried:

    removing "MIOS_AIN_DeadbandSet(0);"

    typing "MIOS_AIN_DeadbandSet(7);" "MIOS_AIN_DeadbandSet(14);" "MIOS_AIN_DeadbandSet(0);" "MIOS_AIN_DeadbandSet(1);"

     

    also tried this variant of main.c

     

    Question is:

    what Parameter definies this 4x0-255?

     

    Is it right that i dont need the deadband set, when i use unmuxed, and short wires?!

  2. MIOS32Bit Core LPC17 © >  following Code works:

    if(Potentiometer <= (rand() % 255)) {
       Gate = 0;}

    What the code does:

    The Potentiometer is a Variable > its a Analog Input: Value from 0-255

    Gate is a Variable and it Gates a NOTE-STREAM.

    All Together its a Note-Random-Killer > with the Pot you set the change to be killed...

     

    MIOS 8Bit Core 18F452 © > it DOES NOT work, I got following Error:

    p --disable-warning 85 --obanksel=2  -I./src -I ./include/c -I ./include/share -DDEBUG_MODE=0  main.c -o _output/main.o
    main.c:224: warning 112: function 'rand' implicit declaration
    main.c:224: warning 84: 'auto' variable 'rand' may be used before initialization
    main.c:224: warning 84: 'auto' variable 'rand' may be used before initialization
    ./bin/mios-gpasm modifies _output/main.asm, result in _output/main__mios-gpasm-tmp.asm
    _output/main__mios-gpasm-tmp.asm:47:Error [113] Symbol not previously defined (_rand).
    _output/main__mios-gpasm-tmp.asm:694:Error [113] Symbol not previously defined (_rand).
    _output/main__mios-gpasm-tmp.asm:694:Error [113] Symbol not previously defined (_rand).
    make: *** [_output/main.o] Fehler 1


    with the MIOS32 bit I dont had to declare nothing...

     

    The Quest now:

    how to program a random that has a predefinied min:0 & max:255

    (I am not a C-Geek, Beginner > Detailed Answer would be great > "comparing 2 Registers in Cycles take the Result and..." > I cant perform such of that into code ;) (leider)

     

    (the first workaround and try of building an Analog Noise generator to feed into a AIN with an BC549 failed by smoking en up...)

     

    THANKS

  3. export MIOS_SHELL=/bin/bash

    had done the job!!!!!!!!!!

    + SDCC 2.8.0

     

    crimic@JAWOI:~/mios/apps/templates/sdcc_skeleton$ make

    rm -rf _output/*

    rm -rf _output

    rm -rf *.cod *.map *.lst

    rm -rf *.hex

    mkdir -p _output

    /bin/bash /home/crimic/mios/bin/mios-gpasm -c -p p18f452 -I./src -I /home/crimic/mios/include/asm -I /home/crimic/mios/include/share -I /home/crimic/mios/modules/debug_msg -I /home/crimic/mios/modules/app_lcd/dummy -DDEBUG_MODE=0  -DSTACK_HEAD=0x37f -DSTACK_IRQ_HEAD=0x33f -I /home/crimic/mios/modules/mios_wrapper /home/crimic/mios/modules/mios_wrapper/mios_wrapper.asm  -o _output/mios_wrapper.o

    /bin/bash /home/crimic/mios/bin/mios-gpasm -c -p p18f452 -I./src -I /home/crimic/mios/include/asm -I /home/crimic/mios/include/share -I /home/crimic/mios/modules/debug_msg -I /home/crimic/mios/modules/app_lcd/dummy -DDEBUG_MODE=0   /home/crimic/mios/modules/app_lcd/dummy/app_lcd.asm -o _output/app_lcd.o

    /bin/bash /home/crimic/mios/bin/mios-sdcc -c -mpic16 -p18f452 --fommit-frame-pointer --optimize-goto --optimize-cmp --disable-warning 85 --obanksel=2  -I./src -I /home/crimic/mios/include/c -I /home/crimic/mios/include/share -I /home/crimic/mios/modules/debug_msg -DDEBUG_MODE=0  main.c -o _output/main.o

    /home/crimic/mios/bin/mios-gpasm modifies _output/main.asm, result in _output/main__mios-gpasm-tmp.asm

    /bin/bash /home/crimic/mios/bin/mios-gpasm -c -p p18f452 -I./src -I /home/crimic/mios/include/asm -I /home/crimic/mios/include/share -I /home/crimic/mios/modules/debug_msg -I /home/crimic/mios/modules/app_lcd/dummy -DDEBUG_MODE=0   /home/crimic/mios/modules/debug_msg/debug_msg.asm -o _output/debug_msg.o

    gplink -s /home/crimic/mios/etc/lkr/p18f452.lkr -m -o project.hex  /home/crimic/mios/lib/libsdcc.lib /home/crimic/mios/lib/pic18f452.lib _output/mios_wrapper.o _output/app_lcd.o _output/main.o _output/debug_msg.o

     

    THHHHHHANX und Danke ---

     

    ps: had edit the first Post of this topic - of course only for my own I in the future, when have to do that again....

     

    ps2: tama techstar 306 - fired with Mios8 - c - is bouncing its first beats > thx 2 us!

  4. crimic@sowiso:~$ which sdcc

    /usr/local/bin/sdcc

     

    crimic@nixgibts:~$ echo $MIOS_BIN_PATH

    /home/crimic/mios/bin

     

    unset MIOS_SHELL

     

    removed lastest sdcc version and installed sdcc from the link provided by TK

    I did the same, i had to manually delete the files, because of manually installing but, hey... it didnt help:

     

    after all above I got this:

    crimic@naherst:~/mios/apps/templates/sdcc_skeleton$ make

    rm -rf _output/*

    rm -rf _output

    rm -rf *.cod *.map *.lst

    rm -rf *.hex

    mkdir -p _output

    sh /home/crimic/mios/bin/mios-gpasm -c -p p18f452 -I./src -I /home/crimic/mios/include/asm -I /home/crimic/mios/include/share -I /home/crimic/mios/modules/debug_msg -I /home/crimic/mios/modules/app_lcd/dummy -DDEBUG_MODE=0  -DSTACK_HEAD=0x37f -DSTACK_IRQ_HEAD=0x33f -I /home/crimic/mios/modules/mios_wrapper /home/crimic/mios/modules/mios_wrapper/mios_wrapper.asm  -o _output/mios_wrapper.o

    /home/crimic/mios/bin/mios-gpasm: 24: /home/crimic/mios/bin/mios-gpasm: declare: not found

    /home/crimic/mios/bin/mios-gpasm: 27: /home/crimic/mios/bin/mios-gpasm: declare: not found

    /home/crimic/mios/bin/mios-gpasm: 37: /home/crimic/mios/bin/mios-gpasm: Syntax error: "(" unexpected (expecting "fi")

    make: *** [_output/mios_wrapper.o] Fehler 2

  5. the mios is untouched and blank from: http://www.ucapps.de/mios/mios_base_v1_1.zip, i dont changed any app or so, i just typed "make" by some sdcc apps, to try it out

     

    @

    cat $MIOS_BIN_PATH/mios-sdcc

    give:

    crimic@nixhak:~$ cat $MIOS_BIN_PATH/mios-sdcc
    # $Id: mios-sdcc 444 2008-08-14 21:26:28Z tk $
    #
    # MIOS specific wrapper for sdcc
    #
    # Executes sdcc
    # Uses "mios-gpasm -fixasm" wrapper to assemble the generated code
    #
    # Thorsten Klose (2008-02-03)
    #
    # SYNTAX: mios-sdcc <sdcc-arguments>
    #

    if [ -z "${MIOS_BIN_PATH:-}" ]; then
      echo "ERROR $0: MIOS_BIN_PATH variable not set!"
      exit 1
    fi

    sdcc --asm="${MIOS_SHELL} ${MIOS_BIN_PATH}/mios-gpasm -fixasm" $@
  6. well I dont know why it searches under /bin and not in /usr - no clue really

     

    how i did that? - i did what you said, i opened the terminal and typed sdcc --version:

    crimic@nixgibts:~$ sdcc --version
    SDCC : mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08 2.8.0 #5117 (Mar 23 2008) (UNIX)

     

     

    this http://www.midibox.org/dokuwiki/doku.php?id=installing_gputils_and_sdcc_on_ubuntu_8.04

    sould be changed --- because if you do so like described

    sudo apt-get install sdcc

    - it install always the latest version (in my case 3.3.0) - and that may dont work.

     

    manually download 2.8.0, unzip anyware, reading the Install.txt, > should do the job

    Install.txt says: Change to the sdcc directory and copy all files to /usr/local

    cd sdcc
    cp -r * /usr/local

    This will install sdcc binaries into: /usr/local/bin/
    header files into:                          /usr/local/share/sdcc/include/
    library files into:                            /usr/local/share/sdcc/lib/
    and documentation into:              /usr/local/share/sdcc/doc/

    You can test the install by entering:

        /usr/local/bin/sdcc -v

    should print:

    SDCC : mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08 2.8.0 #5117 (Mar 23 2008) (UNIX)
  7. hi,

    I tried 3.3.0 - dont worked

    I also tried 2.9.0 - dont worked

    I also tried 2.8.0 - dont worked - proved:

    SDCC : mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08 2.8.0 #5117 (Mar 23 2008) (UNIX)


    After that i erased all Flags, after then - a other try: (nope)

    crimic@anonymus:~/mios/apps/templates/sdcc_skeleton$ make
    rm -rf _output/*
    rm -rf _output
    rm -rf *.cod *.map *.lst
    rm -rf *.hex
    mkdir -p _output
    /bin/share/sdcc /home/crimic/mios/bin/mios-gpasm -c -p p18f452 -I./src -I /home/crimic/mios/include/asm -I /home/crimic/mios/include/share -I /home/crimic/mios/modules/debug_msg -I /home/crimic/mios/modules/app_lcd/dummy -DDEBUG_MODE=0  -DSTACK_HEAD=0x37f -DSTACK_IRQ_HEAD=0x33f -I /home/crimic/mios/modules/mios_wrapper /home/crimic/mios/modules/mios_wrapper/mios_wrapper.asm  -o _output/mios_wrapper.o
    make: /bin/share/sdcc: Kommando nicht gefunden
    make: *** [_output/mios_wrapper.o] Fehler 127

     

    hm

  8. asm works, sdcc not:

    crimic@sichanet:~/mios/apps/templates/sdcc_skeleton$ make
    rm -rf _output/*
    rm -rf _output
    rm -rf *.cod *.map *.lst
    rm -rf *.hex
    mkdir -p _output
    /bin/share/sdcc /home/crimic/mios/bin/mios-gpasm -c -p p18f452 -I./src -I /home/crimic/mios/include/asm -I /home/crimic/mios/include/share -I /home/crimic/mios/modules/debug_msg -I /home/crimic/mios/modules/app_lcd/dummy -DDEBUG_MODE=0  -DSTACK_HEAD=0x37f -DSTACK_IRQ_HEAD=0x33f -I /home/crimic/mios/modules/mios_wrapper /home/crimic/mios/modules/mios_wrapper/mios_wrapper.asm  -o _output/mios_wrapper.o
    make: /bin/share/sdcc: Kommando nicht gefunden
    make: *** [_output/mios_wrapper.o] Fehler 127

     

    crimic@nasicha:~/mios/apps/templates/asm_skeleton$ make
    rm -rf *.cod *.lst *.err
    rm -rf *.hex
    gpasm  -p p18f452  -I./src -I /home/crimic/mios/include/asm -I /home/crimic/mios/include/share -I /home/crimic/mios/modules/app_lcd/dummy  main.asm

     

    sdcc version:

    sdcc 3.3.0+dfsg-1ubuntu1


     

  9. thx for the try.... i tried "use non free", i got:

    crimic@diesmalnet:~/mios/apps/examples/lcd7/dog/c$ make
    rm -rf _output/*
    rm -rf _output
    rm -rf *.cod *.map *.lst
    rm -rf *.hex
    mkdir -p _output
    /bin/share/sdcc /home/crimic/mios/bin/mios-gpasm -c -p p18f452 -I./src -I /home/crimic/mios/include/asm -I /home/crimic/mios/include/share -I /home/crimic/mios/modules/app_lcd/dog -DDEBUG_MODE=0  -DSTACK_HEAD=0x37f -DSTACK_IRQ_HEAD=0x33f -I /home/crimic/mios/modules/mios_wrapper /home/crimic/mios/modules/mios_wrapper/mios_wrapper.asm  -o _output/mios_wrapper.o

    make: /bin/share/sdcc: Kommando nicht gefunden (English: command not found)
    make: *** [_output/mios_wrapper.o] Fehler 127 (English: Error 127)

    in /bin are Files only - so no Folder.... but "/usr/share/sdcc" exist --- I dont know what to do with that information!

  10. SOLVED :santa:

     

     

    LINUX - UBUNTU 14

     

    1. Install some Software:

    open "Terminal" type, and enter/install this:

    sudo apt-get install gputils

     

    Dont do this:

    sudo apt-get install sdcc

    - it would install the latest version (in my case 3.3.0) - and that may dont work.

     

    Do this:

    manually download 2.8.0, unzip anyware, reading the Install.txt:

    Change to the sdcc directory and copy all files to /usr/local

    cd sdcc

    cp -r * /usr/local

    This will install sdcc binaries into: /usr/local/bin/
    header files into:                          /usr/local/share/sdcc/include/
    library files into:                            /usr/local/share/sdcc/lib/
    and documentation into:              /usr/local/share/sdcc/doc/

    You can test the install by entering

    /usr/local/bin/sdcc -v

     

    should return:

    SDCC : mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08 2.8.0 #5117 (Mar 23 2008) (UNIX)

     

     

    2. add some variables in the file "/etc/enviroment"

    MIOS_PATH="/mios/"
    MIOS_BIN_PATH="/mios/bin"
    MIOS_SHELL="/bin/bash" <<< the " " was the problem!!!!!!!
    PROCESSOR=18f452

     

    you have to write the whole path (crimic is my username):

    MIOS_PATH="/home/crimic/mios"

    MIOS_BIN_PATH="/home/crimic/mios/bin"

    MIOS_SHELL=/bin/bash

    PROCESSOR=18f452

    click save >>> ooops the file "Enviroment" is "Read only" - no save possible --- so 1.1:

     

     

    1.1 have "write rights" to change the "enviroment"

    open "terminal" (console, command) tpe "gksudo" > enter > a window with a clear field pop up > type "nautilus" (nautilus is the "explorer"/"filemanagement" of ubuntu) > nautilus now pop up > navigate to /etc/enviroment > add following lines @ the end of the document:

    MIOS_PATH="/home/crimic/mios"
    MIOS_BIN_PATH="/home/crimic/mios/bin"
    MIOS_SHELL=/bin/bash
    PROCESSOR=18f452

     This Tutorial say...<Forget this Tutorial it's outdatet!

     

     

    1.2 Proove if you do right: open "terminal" type

    printenv PROCESSOR

    now it prints:

    18f452

    well done!

     

     

    3. Download toolchain

    well not very easy to find, in the tutorial for windows i found that mios_base_v1_1.zip

    or you do it with:

    svn checkout svn://svnmios.midibox.org/mios

    but then you have to change the Mios paths in 1.1! (/mios/trunk...)

     

    After download, i renamed the "mios_base_v1_1" folder into "mios" and drop the folder in my USER (deutsch Persönlicher Ordner) - so if you now open  "terminal" and you type:

    cd mios

    cd apps

    cd examples

    cd lcd7

    cd dog

    cd c

    make

    this should build/make an application but i get errors:

    rm -rf _output/*
    rm -rf _output
    rm -rf *.cod *.map *.lst
    rm -rf *.hex
    mkdir -p _output
    /bin/bash /home/crimic/mios/bin/mios-gpasm -c -p p18f452 -I./src -I /home/crimic/mios/include/asm -I /home/crimic/mios/include/share -I /home/crimic/mios/modules/app_lcd/dog -DDEBUG_MODE=0  -DSTACK_HEAD=0x37f -DSTACK_IRQ_HEAD=0x33f -I /home/crimic/mios/modules/mios_wrapper /home/crimic/mios/modules/mios_wrapper/mios_wrapper.asm  -o _output/mios_wrapper.o
    /bin/bash /home/crimic/mios/bin/mios-gpasm -c -p p18f452 -I./src -I /home/crimic/mios/include/asm -I /home/crimic/mios/include/share -I /home/crimic/mios/modules/app_lcd/dog -DDEBUG_MODE=0   /home/crimic/mios/modules/app_lcd/dog/app_lcd.asm -o _output/app_lcd.o
    /bin/bash /home/crimic/mios/bin/mios-sdcc -c -mpic16 -p18f452 --fommit-frame-pointer --optimize-goto --optimize-cmp --disable-warning 85 --obanksel=2  -I./src -I /home/crimic/mios/include/c -I /home/crimic/mios/include/share -DDEBUG_MODE=0  main.c -o _output/main.o
    at 1: warning 118: option '--fommit-frame-pointer-�' no longer supported  'use --fomit-frame-pointer instead'
    at 1: warning 117: unknown compiler option '--optimize-goto' ignored
    In file included from main.c:17:
    /usr/bin/../share/sdcc/include/pic16/pic18fregs.h:427:25: error: pic18f452.h: No such file or directory
    /home/crimic/mios/include/c/cmios.h:245: syntax error: token -> 'char' ; column 43
    make: *** [_output/main.o] Fehler 1

    well this path /user/bin is really no such file or directory!!!!!

    but this exist:

    /usr/share/sdcc/include/pic16

     

    of course i would love to simply make a 32bit applicaton, and use the new cores, but i have 10 or more 8bit cores here!!!! I shame to waste them! --- and for my things (triggerbox for techstar ts306) it is really enough.

  11. bevore christmas would be better i think - holiday time is soldering time...

     

    first thougt - it would be easier to change the pcb - is there a link to the files?

    well, when I have the PCB I will test it ...

    spacing between the two poles is 5.08 mm like the marquardt have ..
    problem is that one has to cut the second pole pair of the ITTshadow ... 
    and that the poles are not centered like the marquardt 
    so the pushbuttons will be slightly de-centered ..

  12. I only write this comment because in my application I also want such an "Feature", I have done this in MaxMsp before, i am far away from a C-Guru, so keep the following as an Idea.

    In my Setup it would be a footcontroller, because the hands of my Guitar-Synth-arist are on his instrument, so the whole thing would be more a 10 Button+ LED-Matrix-Thing

     

    The Feature I will call "always recording mode":

    you play play play...and after a while you think - YESS that was so great - that was it! at this moment you Press the "REC" Button, from this point it starting Playback the Loop, and of course immideatly Record in a new track (always recording, you know)

    The thing that you have to interact is now: to find out where the loop Starts, and where it ends

     

    Find/Set the Loop Length:

    When you working in a sequencer Setup, meens there is a drumcomputer out there or what ever trigger > you have to keep it ONBEAT, or OFFBEAT, for that you will have

    3 Offset Buttons: +1, +2, +3 Steps

    But with 1,2,3 Steps you cant offset 10000Steps, you Foot, or your Hand will fall up while your Hairs are gone gray... :phone:

    So you have to have

    2 END-Crop Buttons: Decrease, Encrease Loop-End-Point, and that +-1-Step whise because the end is the point where you regocnized "man that was the loop of my live" so it cant be far away,

    far away is maybe the

    Loop-Start-Point, maybe 10000 Steps.... but in most cases you did not now what you played 512 steps ago... (or did you?), so what do we need is to set the Ammount of Steps whe step back

    So lets start with a predefinied STEP-BACK ammount - maybe 64 Steps, from there we start to go "more" back

    In order of these we need a 3 more Buttons

    1. range-Button"  1, 2, 4, 8, 16, 32, 64, 128, 256, 512, (by pressing it you multiple times you can change the range) that change the Back-Step-Amount, it can be displayed as Numbers in 3x 7Segment LEDs or in a LED-Array

    2. Loop-Start-Button-Decrease, step back the loop point with the amout from the "Range Button"

    3. Loop-Start-Button-Encrease, step back the loop point with the ammount from the "Range Button"

     

    next problem now is that you get bored by waiting again and again to hear THE Loop Point, maybe you have to wait 512 Steps----

    ...No you have no time to wait? ok, so when you press one of the Loop-Point Buttons >  it, goes to a predefinied Loop Point at the End of the Sequence

    (predefinied in a way to be in sync, with a predefinied, Beat Mode/Structure, 4/4, 3/8 or what ever - that is what you have to know before) maybe 8 Steps bevore Loop-End-Point.

     

    withe the 3 Offset Buttons described above you now make some finetuning... when you have it, press CROP, to shrink it - for now it is stored in one of 4 loop Arrays, with maybe less functionality...

     

     

    More techicly

    you jam...after a while you think whow hoho that was it - this is the moment you hit "REC"

    "REC" copy the REC-Variable(Array) into the Temporary-Playback-Variable(Array) and beginn to loop the recorded Sequence from same

    "REC" then overwrite the REC-Variable-Array with "0" or "128", and begin to write again in the Variable-Array from 0 to 10000.

    In which Cell it writes defines the counter, which counts from "sequencer-start" message away, in 4/4 or whatever Predefinied structure, the counter is reset to 0 by pressing "REC" but not imideatly - only be the the first Trigger/Beat/1st 16th...

    a bigger problem comes when you recording near the end of the array maybe 9900, because the counter restarts to 0 by coming to the 10000.....headache  :pinch:

    The Offset things, and the Loop-Point things and the Loop-Range -Things - are simply modifieing the "counter-ranges" ---offbeat-onbeat-offsets, by bewareing the counter from a defied ammount of ticks from the midiclock

     

    here in a Matrix

    post-20788-0-47782000-1406579244_thumb.p
    post-20788-0-71077600-1406594805_thumb.p

    dwg.zip

  13. UPDATE 140720: still learning & its not so difficult at all, because of

    * I already know what I want

    * I already checked out for Years what Feature is necessery and what not, what has mass effect and what has to be left!

    * I already programmed it in MAX MSP years ago.

    https://vimeo.com/101245089

     

    So now whats Working in this Video:

    * Velocity depinding NoteKill-Switches (kill notes under 46, from 46-96, greater 96, -this values can be Offset -+64 by an VelKillOffset-Encoder)

    * Velocity Offset -+64 - decrease encrease the Orginal Trigger Velocity Value in a Range from 1-127 --- so it is somewhat of CLIPPING

    * Random-Note-Kill --- by each new Trigger - a Random generator is startet - and kills the trigger or not... with the Modwheel I change the Random-Range.

     

    Challanges for the future (witout any clue up to now):

    Changeing Notelengths Midiclock-1n % debending

    doubling midiclocks, half midiclocks, start stop midiclock by beeing a slave(for the Synthesizer build in LFOs...)

    Output Inital MidiCCs to the BCR2000.

    Save and Load Presets

    Morph Presets Values

    Building a BLM16x16

  14. looks perfect for my project!

     

    I am looking for the correct  Gerber files, or maybe a prototype pcb, for me it is not clear which are the ones that are working for you.

    As far I found out, you shrinked Findbuddas Layout (no space between 8 and 9), but whre is your wiki page?

    thx for more info

    I think this is worth an update:

    wiresygzwg.jpg

  15. UPDATE 140711: -oh yeah first part is running-

    https://vimeo.com/100537805

    TM MBHP-Based-RETriggerpart

    UART0 IN1 = Korg Electribe Rythm = TriggerSource

    UART1 IN2 = Midi Keyboard = MelodySource

    Learned about arrays and matrices...:

     

    I have 2 IN-Ports, and when I write Code in:

    void APP_MIDI_NotifyPackage(mios32_midi_port_t port, mios32_midi_package_t midi_package)

    I always get triggering Events from both ports... thats blow up my code, since I have 2 independend TASKs.

    1stTask: Save Melody Notes (UART0)

    2ndTask: Trigger out the saved Melodys(UART1)

    the notify Package is somehow connected to mios32/trunk/programming_models/traditional/main.c - i am afraid if i change something there, it would be replaced by the next mios update...

  16. thx for looking in > code works

     

    at google - quick shot, foul etc mentality: i even slept a night over it, printed some array courses to A3-Pack at work, searching google on this todays eveining and so on:

     

    i crossed a lession about how to initalze a 2D array... yes at this point only at declaration...

    http://stackoverflow.com/questions/1688741/initialize-a-2d-array-at-declarationtime-in-the-c-programming-language

     

    but here:

    http://stackoverflow.com/questions/4066522/setting-an-array-to-one-value

    - so I the idea there is some nice "Reset" or "Blank" function behind Array,

    but that dont work so my thougt was that there are differences by this uC-C?

  17. I am new in C, but my code works, but to big to slow, time to use matrices and ARRAYS

     

    I declare and initalise a array:

    #include <mios32.h>
    #include "app.h"

    //1st NoteArray/Buffer

    u8 NteBuf0[10]={0}

    u8 NoteCount

     

    later I want to write a 0 in all Cells of the Array, e.g:

    void APP_MIDI_NotifyPackage(mios32_midi_port_t port, mios32_midi_package_t midi_package)

     

    //CLEAR NOTE BUFFERS (set to Note Nr 0, which we filter later out)
    if(port == 33 && midi_package.type == NoteOff && midi_package.chn == Chn8 && NoteCount == 0){NteBuf0[10] = { 0 };}

    "make" give me e.g. "expected expression before '{' token"
     

    also tried:

    {NteBuf0[] = 0;}

    {NteBuf0[] = { 0 };}

    {NteBuf0[10] = { {} };}

    memset(NteBuf0, 0, 10)

    {NteBuf0[10] = 0;} make: "warning: array subscript is above array bounds [-Warray-bounds]"

    and a view others that i dont remember (because of not working in this case)

     

    writing them one by on by one.... works of course

     

    What do i missed to know?

  18. os ubuntu 14

    mius studio 2.4.6

     

    I changed the optocopler - DEAD!

     

    I now got midi from:

    usb midi 4x4 (2)

    so what I have learnd from this trlial and error session?

     

    UART0(32) = Midi IN, (or "&MidiOut1?)

    UART1(33) =Midi In2, (or "&MidiOut2?)

    UART2= ??? or Out1?

    UART3=??? or Out2?

     

    The LCD now Print 32 for Midi1 and 33 for Midi2

     

    so this is solved

     

    thx

  19. CORE LPC17

    app: modified tutorial 004

     

    I need both Midi Inports on the Core PCB (Midi IN1, Midi IN2) in 1 Application

    Midi IN1 = UART0 or 32

    Midi IN2 = UART3? > I dont get something in there when I run this code:

     

     

    void APP_MIDI_NotifyPackage(mios32_midi_port_t port, mios32_midi_package_t midi_package)
    {
    MIOS32_LCD_Clear();
    MIOS32_LCD_PrintFormattedString("%u", port);

     

     

    The display connected to the LPC17-Core now show "32" -when I send Data to Midi-IN1,

    but it dont change when I send Data to Midi-IN2

     

     

    in the config mios32_config.h

    I addet this Lines:

     

    #ifndef _MIOS32_CONFIG_H
    #define _MIOS32_CONFIG_H
    #define MIOS32_USE_MIDI
    #define MIOS32_USE_UART
    #define MIOS32_USE_UART_MIDI
    #define MIOS32_MIDI_DEFAULT_PORT UART1
    #define MIOS32_MIDI_DEBUG_PORT USB0
    #define MIOS32_UART_NUM 4
    #define MIOS32_UART0_ASSIGNMENT 1 //1=Midi, 0= Disabled, 2= COM
    #define MIOS32_UART1_ASSIGNMENT 1
    #define MIOS32_UART2_ASSIGNMENT 1
    #define MIOS32_UART3_ASSIGNMENT 1

     

    but that changed nothing

     

    I need both UART In-Ports for my TRIGGER-Matrix-Project

     

    where is my fault, what do i miss?

     

     

     

     

×
×
  • Create New...