Jump to content

Phatline

Members
  • Posts

    1,277
  • Joined

  • Last visited

  • Days Won

    71

Posts posted by Phatline

  1. hmm i deletet the code... still dont found it

     

    there is no text like " midi_package.chn"

     

    the only CHN things are:

    typedef enum {
      Chn1,
      Chn2,
      Chn3,
      Chn4,
      Chn5,
      Chn6,
      Chn7,
      Chn8,
      Chn9,
      Chn10,
      Chn11,
      Chn12,
      Chn13,
      Chn14,
      Chn15,
      Chn16
    } mios32_midi_chn_t;
    
    
    typedef union {
      struct {
        u32 ALL;
      };
      struct {
        u8 cin_cable;
        u8 evnt0;
        u8 evnt1;
        u8 evnt2;
      };
      struct {
        u8 type:4;
        u8 cable:4;
        u8 chn:4; // mios32_midi_chn_t
        u8 event:4; // mios32_midi_event_t
        u8 value1;
        u8 value2;
      };
    
      // C++ doesn't allow to redefine names in anonymous unions
      // as a simple workaround, we rename these redundant names
      struct {
        u8 cin:4;
        u8 dummy1_cable:4;
        u8 dummy1_chn:4; // mios32_midi_chn_t
        u8 dummy1_event:4; // mios32_midi_event_t
        u8 note:8;
        u8 velocity:8;
      };
      struct {
        u8 dummy2_cin:4;
        u8 dummy2_cable:4;
        u8 dummy2_chn:4; // mios32_midi_chn_t
        u8 dummy2_event:4; // mios32_midi_event_t
        u8 cc_number:8;
        u8 value:8;
      };
      struct {
        u8 dummy3_cin:4;
        u8 dummy3_cable:4;
        u8 dummy3_chn:4; // mios32_midi_chn_t
        u8 dummy3_event:4; // mios32_midi_event_t
        u8 program_change:8;
        u8 dummy3:8;
      };
    } mios32_midi_package_t;

    forgive me i am a newbe, shoul i change CHN:4 to CHN5?

  2. Tutorial 2 - Parsing Midi:

    When my sequencer is sending out a note on Midichannel 10, then my synthesizer reacts @ Channel 10, but MIOS and LPC17 sys "I got it on Midichannel 9"

     

    I just took the Tutorial below, and changed only - to display the mididata, else i dont changed things (no change in config or header files)

     

    Code:

    // $Id: app.c 1919 2014-01-08 19:13:48Z tk $
    //MIOS32 Tutorial #002: Parsing MIDI
    #include <mios32.h>
    #include "app.h"
    void APP_Init(void){MIOS32_BOARD_LED_Init(0xffffffff);}
    void APP_Background(void){}
    void APP_Tick(void){}
    void APP_MIDI_Tick(void){}
    void APP_MIDI_NotifyPackage(mios32_midi_port_t port, mios32_midi_package_t midi_package){
    u8 ab = 0;
      // 1) the LED should be turned on whenever a Note On Event with velocity > 0
      // has been received
    if( port == 32){
    if( midi_package.chn == 9){
    if( midi_package.type == NoteOn && midi_package.velocity > 0 ) {
    MIOS32_BOARD_LED_Set(0x0001, 1);
    ab=1;}
    
      // 2) the LED should be turned off whenever a Note Off Event or a Note On
      // event with velocity == 0 has been received (the MIDI spec says, that velocity 0
      // should be handled like Note Off)
    if( (midi_package.type == NoteOff) || (midi_package.type == NoteOn && midi_package.velocity == 0) ){
    MIOS32_BOARD_LED_Set(0x0001, 0);
    ab=0;}
    
    MIOS32_LCD_Clear();         // clear screen
    MIOS32_LCD_CursorSet(0, 0); // X,Y 
    MIOS32_LCD_PrintFormattedString("%d %d %d %d",ab, port, midi_package.note, midi_package.chn);
    }//End Midi CHN 11
    }//End Port
    }//End Hook
    
    void APP_SRIO_ServicePrepare(void){}
    void APP_SRIO_ServiceFinish(void){}
    void APP_DIN_NotifyToggle(u32 pin, u32 pin_value){}
    void APP_ENC_NotifyChange(u32 encoder, s32 incrementer){}
    void APP_AIN_NotifyChange(u32 pin, u32 pin_value){}

     

    is there a offset to set?

  3. my core is working with a code on it... my code/application crashes when mios studio is opend, or mios-studio scan the usb devices, or mios-studio is looking out for a CORE.... as soon MiosStudio sends out something, mios crashes (LCD is blank, application-function are gone) - no chance.

     

    is there a way to load code on my core without mios-studio sending some things that crashes my program? i dont want to open, unmount, unconnect, start the windows pc (LPXEXPRESO) destroing cables by moving... i dont want to "bootload" the device... everytime i program crap (what is often in this phase)

     

    is there a program for Linux that can upload the hexfile without asking the core differnt things bevore?

  4. SOLUTION:

    was only a disply Format thing:

    i used %u (unsigned int)  instead of %d (which is signed int)

    see the code below: MIOS32_LCD_PrintFormattedString("%u %d %u", encoder, incrementer, enc_value[0]);}

     

     

    PROBLEM WAS:

    when i turn a ENCODER

    left:   incrementer= 4294967295 (should be -1 ?) (this value i see on my LCD)

    right: incrementer= 1 (no matter how fast i turn the encoder > that should encrease by faster turns? shouldńt it?

     

     

    internet says: 4294967295 says that it may be a negative value  "-1" when i false declared the variable as unsigned (signed meens -1 is possible)

    in the code below "s32 incrementer" s stand for "signed" i think...
    & when i change to "u32 incrementer" (and in app.h also where it is definied), i still get the same "4294967295"

    this is my stripped down CODE:

    #include <mios32.h>
    #include "app.h"
    #include <FreeRTOS.h>
    #include <task.h>
    #include <queue.h>
     
    /////////////////////////////////////////////////////////////////////////////
    // Local definitions
    // used MIDI port and channel (DEFAULT, USB0, UART0 or UART1)
    #define KEYBOARD_MIDI_PORT DEFAULT
    #define KEYBOARD_MIDI_CHN  Chn1
    #define MIDI_STARTNOTE 36
    
    //Set Encoder NR and Hardware-PIN-out
    #define NUM_ENCODERS 5
    const mios32_enc_config_t encoders[NUM_ENCODERS] = {//(SR begin with 1, ENC with 0)
      { .cfg.type=DETENTED2, .cfg.speed=FAST, .cfg.speed_par=2, .cfg.sr=1, .cfg.pos=0 },
      { .cfg.type=DETENTED2, .cfg.speed=FAST, .cfg.speed_par=2, .cfg.sr=1, .cfg.pos=2 },
      { .cfg.type=DETENTED2, .cfg.speed=FAST, .cfg.speed_par=2, .cfg.sr=5, .cfg.pos=0 },
      { .cfg.type=DETENTED2, .cfg.speed=FAST, .cfg.speed_par=2, .cfg.sr=5, .cfg.pos=2 },
      { .cfg.type=DETENTED2, .cfg.speed=SLOW, .cfg.speed_par=4, .cfg.sr=4, .cfg.pos=0 },};//Menue Encoder
    
    s32 enc_value[5]= {0};
    
    /////////////////////////////////////////////////////////////////////////////////////////
    // Startup INIT
    void APP_Init(void){
    //initialize encoders
    s32 i;
    for(i=0; i<NUM_ENCODERS; ++i) MIOS32_ENC_ConfigSet(i, encoders[i]);
    
    .....
    
    ////////////////////////////////////////////////////////////////////////////////////////
    //Encoder Moved?
    void APP_ENC_NotifyChange(u32 encoder, s32 incrementer){
    // increment to virtual position and ensure that the value is in range 0..127
    s32 value = enc_value[encoder] + incrementer;
    if(value < 0){value = 0;}
    if(value > 127){value = 127;}
    enc_value[encoder] = value;
    
    MIOS32_LCD_Clear();         // clear screen
    MIOS32_LCD_CursorSet(0, 0); // X,Y  
    MIOS32_LCD_PrintFormattedString("%u %u %u", encoder, incrementer, enc_value[0]);}

    I have worked thru the tutorials, >>> i only need 5 Encoders, on different PINs, so i have to declare they by hand and not with a FOR Loop over all Shiftregisters.... this is because i dont use the Tutorial code.

  5. 3.Questions:

     

    1.how to get the processor match:

    warning: processor mismatch in "mulint.o"
    warning: processor mismatch in "moduint.o"

     

    i controll the enviroment variables:

    printenv PROCESSOR
    18F4685

     

    >this is ok i first thougt... but because never knows... I changed the letter "F" to "f" so i get:

    printenv PROCESSOR
    18f4685

     

    the processor is still mismatching:

    jo@esliegtdaschnee:~/C/8_tekkstar1D$ make
    rm -rf _output/*
    rm -rf _output
    rm -rf *.cod *.map *.lst
    rm -rf *.hex
    mkdir -p _output
    /bin/bash ./bin/mios-gpasm -c -p p18f4685 -I./src -I ./include/asm -I ./include/share -I ./modules/app_lcd/dummy -DDEBUG_MODE=0  -DSTACK_HEAD=0x37f -DSTACK_IRQ_HEAD=0x33f -DDONT_INCLUDE_MIOS_ENC_TABLE -I ./modules/mios_wrapper modules/mios_wrapper/mios_wrapper.asm  -o _output/mios_wrapper.o
    /bin/bash ./bin/mios-gpasm -c -p p18f4685 -I./src -I ./include/asm -I ./include/share -I ./modules/app_lcd/dummy -DDEBUG_MODE=0   modules/app_lcd/dummy/app_lcd.asm -o _output/app_lcd.o
    /bin/bash ./bin/mios-sdcc -c -mpic16 -p18f4685 --fommit-frame-pointer --optimize-goto --optimize-cmp --disable-warning 85 --obanksel=2  -I./src -I ./include/c -I ./include/share -DDEBUG_MODE=0  main.c -o _output/main.o
    ./bin/mios-gpasm modifies _output/main.asm, result in _output/main__mios-gpasm-tmp.asm
    _output/main__mios-gpasm-tmp.asm:1346:Warning [231] No memory has been reserved by this instruction.
    gplink -s ./etc/lkr/p18f4685.lkr -m -o project.hex  ./lib/libsdcc.lib ./lib/pic18f4685.lib _output/mios_wrapper.o _output/app_lcd.o _output/main.o
    warning: processor mismatch in "mulint.o"
    warning: processor mismatch in "moduint.o"

     

     

    makefile:

    MIOS_PATH = .
    MIOS_BIN_PATH = ./bin
    export MIOS_PATH
    export MIOS_BIN_PATH
    include Makefile.orig
    MIOS_WRAPPER_DEFINES = -DSTACK_HEAD=0x37f -DSTACK_IRQ_HEAD=0x33f -DDONT_INCLUDE_MIOS_ENC_TABLE
    

    makefile.orginal:

    # define the processor, linker file and project name
    PROCESSOR = 18f4685
    LKR_FILE  = $(MIOS_PATH)/etc/lkr/p$(PROCESSOR).lkr
    PROJECT   = project
    # list of objects that should be created and linked
    OBJS = mios_wrapper.o app_lcd.o main.o
    # include pathes (more will be added by .mk files)
    GPASM_INCLUDE = 
    SDCC_INCLUDE  = 
    # optional defines that should be passed to GPASM/SDCC
    GPASM_DEFINES = -DDEBUG_MODE=0
    SDCC_DEFINES  = -DDEBUG_MODE=0
    # pass parameters to MIOS wrapper
    MIOS_WRAPPER_DEFINES = -DSTACK_HEAD=0x37f -DSTACK_IRQ_HEAD=0x33f
    # directories and files that should be part of the distribution (release) package
    # more will be added by *.mk files
    DIST = ./
    # include the common.mk file
    include $(MIOS_PATH)/include/makefile/common.mk
    # include application specific driver (select app_lcd/dummy if MIOS internal driver used)
    include $(MIOS_PATH)/modules/app_lcd/dummy/app_lcd....

     

    2.Code Memory:(96k flash, 1k EEPROM, 3328 bytes RAM)

    How much can i write into the  Flash memory? all the 96K? how much is mios?

    if I use much Arrays, and i need them all in the program, and the acces should be quick, so i cant save them into bankstick... and my program needs about 90kB Pic-Flash- is this a problem?

    if i use the arrays normal: i define them as global variable, initalise it by startup - are thes variables then in Flash or in Ram? (i am a newbee in this things, up to now i didnt have to worry about that...)

     

    by the way i shrinked the code need from 30528B to 23040 by changing the variables from "int" to "unsigned char"....

     

    3.Errors while compiling:

    I use now a pic18F4682, because the 18F452 went to small in CodeFlash....

    I recently added more code to the program from 30kB to ...

     

    Codesize 20kB and 30kB, (size is that what is shown in Mios studio as PIC-FLASH)

    Compiled, program made/running, but error:

    processor  mismatch? But ok i can life with it.... up to the point when i need more memory

    crimic@DELL:~/C/8_tekkstar1D$ make
    rm -rf _output/*
    rm -rf _output
    rm -rf *.cod *.map *.lst
    rm -rf *.hex
    mkdir -p _output
    /bin/bash ./bin/mios-gpasm -c -p p18f4685 -I./src -I ./include/asm -I ./include/share -I ./modules/app_lcd/dummy -DDEBUG_MODE=0  -DSTACK_HEAD=0x37f -DSTACK_IRQ_HEAD=0x33f -DDONT_INCLUDE_MIOS_ENC_TABLE -I ./modules/mios_wrapper modules/mios_wrapper/mios_wrapper.asm  -o _output/mios_wrapper.o
    /bin/bash ./bin/mios-gpasm -c -p p18f4685 -I./src -I ./include/asm -I ./include/share -I ./modules/app_lcd/dummy -DDEBUG_MODE=0   modules/app_lcd/dummy/app_lcd.asm -o _output/app_lcd.o
    /bin/bash ./bin/mios-sdcc -c -mpic16 -p18f4685 --fommit-frame-pointer --optimize-goto --optimize-cmp --disable-warning 85 --obanksel=2  -I./src -I ./include/c -I ./include/share -DDEBUG_MODE=0  main.c -o _output/main.o
    ./bin/mios-gpasm modifies _output/main.asm, result in _output/main__mios-gpasm-tmp.asm
    _output/main__mios-gpasm-tmp.asm:1346:Warning [231] No memory has been reserved by this instruction.
    gplink -s ./etc/lkr/p18f4685.lkr -m -o project.hex  ./lib/libsdcc.lib ./lib/pic18f4685.lib _output/mios_wrapper.o _output/app_lcd.o _output/main.o
    warning: processor mismatch in "mulint.o"
    warning: processor mismatch in "moduint.o"

     

    Codesize 40kB-90kB, (size is that what is shown in Mios studio as PIC-FLASH)

    aha@nasupa:~/C/8_tekkstar1D$ make
    rm -rf _output/*
    rm -rf _output
    rm -rf *.cod *.map *.lst
    rm -rf *.hex
    mkdir -p _output
    /bin/bash ./bin/mios-gpasm -c -p p18f4685 -I./src -I ./include/asm -I ./include/share -I ./modules/app_lcd/dummy -DDEBUG_MODE=0  -DSTACK_HEAD=0x37f -DSTACK_IRQ_HEAD=0x33f -DDONT_INCLUDE_MIOS_ENC_TABLE -I ./modules/mios_wrapper modules/mios_wrapper/mios_wrapper.asm  -o _output/mios_wrapper.o
    /bin/bash ./bin/mios-gpasm -c -p p18f4685 -I./src -I ./include/asm -I ./include/share -I ./modules/app_lcd/dummy -DDEBUG_MODE=0   modules/app_lcd/dummy/app_lcd.asm -o _output/app_lcd.o
    /bin/bash ./bin/mios-sdcc -c -mpic16 -p18f4685 --fommit-frame-pointer --optimize-goto --optimize-cmp --disable-warning 85 --obanksel=2  -I./src -I ./include/c -I ./include/share -DDEBUG_MODE=0  main.c -o _output/main.o
    make: *** [_output/main.o] Fehler 1
    aha@nasupa:~/C/8_tekkstar1D$

     

    With Code over 96K, i get this error:

    aha@nasupa:~/C/8_tekkstar1D$ make
    rm -rf _output/*
    rm -rf _output
    rm -rf *.cod *.map *.lst
    rm -rf *.hex
    mkdir -p _output
    /bin/bash ./bin/mios-gpasm -c -p p18f4685 -I./src -I ./include/asm -I ./include/share -I ./modules/app_lcd/dummy -DDEBUG_MODE=0  -DSTACK_HEAD=0x37f -DSTACK_IRQ_HEAD=0x33f -DDONT_INCLUDE_MIOS_ENC_TABLE -I ./modules/mios_wrapper modules/mios_wrapper/mios_wrapper.asm  -o _output/mios_wrapper.o
    /bin/bash ./bin/mios-gpasm -c -p p18f4685 -I./src -I ./include/asm -I ./include/share -I ./modules/app_lcd/dummy -DDEBUG_MODE=0   modules/app_lcd/dummy/app_lcd.asm -o _output/app_lcd.o
    /bin/bash ./bin/mios-sdcc -c -mpic16 -p18f4685 --fommit-frame-pointer --optimize-goto --optimize-cmp --disable-warning 85 --obanksel=2  -I./src -I ./include/c -I ./include/share -DDEBUG_MODE=0  main.c -o _output/main.o
    ./bin/mios-sdcc: Zeile 18:  5784 Getötet                sdcc --asm="${MIOS_SHELL} ${MIOS_BIN_PATH}/mios-gpasm -fixasm" $@
    make: *** [_output/main.o] Fehler 137

    "Zeile 18" or english "Line 18" in mios-sdcc:

    sdcc --asm="${MIOS_SHELL} ${MIOS_BIN_PATH}/mios-gpasm -fixasm" $@

    "5784 getötet" or english "5784 killed"
     ---ok i understand this---to much for this chip ;)

  6. I also want to "memcpy"

    C, 8Bit Core, 18F4685:

     

     

     #include <string.h>
    
    int MtxLoad0[8]; //Destination Array
    int Mtx0Part0[8]; //Source Array
    
    if(pin == 0 && pin_value == 0){memcpy(MtxLoad0, Mtx0Part0, 8);}

    give me this error:

     

    error: missing definition for symbol "_memcpy", required by "_output/main.o"

     


    where do i have to define "memcpy"?

  7. Die Encoder sind ja genau die Taster eben intigriert.

    jo stimmt hab fehl interpretiert

     

    Die Oktaven Schifttaster habe ich vergessen stimmt :smile:
    Wie meinst du des mit Für jeden Sid 2 Taster für ?? was ?

    ja so  Oktaven shift taster, dast halt ohne menu usw direkt die oktaven hoch und runter schalten kannst und das pro SID-Chip... aber das ist nicht standart und müsst programmiert werden... ich bring halt einfach ein was ich brauchen würde...

     

     

    Ja des Problem ist ebnen des Programmieren sonnst könnte ich evtl noch weitere  Parameter direkt 

    auf Encoder legen....

    oh ja, da wüsste ich auch eine menge Parameter... mein sid cs muss noch warten bis ich A.assembler kann, oder B. sid in C kommt... seis wies sei stirbt kuh bleibts hei!

  8. schau das sehr effizente LEDs in der Matrix verwendest...durch das ein und ausschalten in millisekunden bereich werden die selbst mit niedrigen Widerstand (bei mir 100Ohm) sehr dunkel...

     

    Taster immer vor Encoder setzten, oder zumindest mit größeren Abstand hinter den Encoder (Bedienbarkeit)

     

    Encoder unter das  LCD setzten, um die Werte im Display leichter den Reglern zuweisen (kognitiv) zu können

     

    könnt ich assambler würde ich LEDRinge verwenden (siehe Nordrack III von Clavia)

     

    für die Keyboard Section würd ich 2 Octave-Shift +- Tasten und 4-5LEDs vorsehen.

    könnt ich Assambler würde ich für jeden SID 2 so Tasten und 5 so LEDs vorsehen--- das ist ein gutes kompositorisches Element wenns ums  live spielen geht...

    Deto CUT-OFF und Amp-Decay regler... du hast ja platz in der kiste... nur programmieren musst es halt selber :shifty:

  9. MODs off the Analog Part
    Mono-Mode (All Modules):
    if you just need 1 channel, it is a good idea, to remove follwing resistors to reduce Humming(alot):
    TomModule: Rm
    ClapModule: R360
    SynthModule: R266
    Why mono? Maybe you send the main to a mono vcf and vca? thats what i do...and this mode reduce the humming by my machine about half.



    SYNTH-MODULE:
    OverTone 1:
    solder a 470K Resistor paralell to R258(which isorginally also 470K)
    that overdrives the input of IC209
    Overtone/Drive 2:
    R210 (200K) solder 100K parallel to > doubles the loudness and gives some overtones.
    You may try a pot... but dont forget to solder a savety-Reistor (dont know 1K) in series... to avoid to much current on the ics and Resistor (but i have noticed the board is very moding save...)
    Deeper Tune:
    turn the R223 1K Trimpot to most left...
    The Big BOOOOM:
    solder a 470K Resistor in series with a switch parallel to D203

    CLAP-Module:
    Very long Reverb time:
    Replace R306 with an 1MOhm Linear Pot
    then replace the useless "Reverb-time"Pot "VR32" with fixed 2x 47K Resistors (the pot is 100K and u can use it for other mods!!!)



    HiPassFilter:
    Replace R342 with a 1K5 Resistor in Series with a 100K Potentiometer---- take that one that you have left from the "Very long Reverb time"-Mod!
    Make Place:
    Remove Plugs for Trigger, Pad, Each-out, and cut away the PCB, like in the picture, then:
    solder that little bridge over that Capacitor- that you see on the picture



    BASIC-Module (TOM):
    Distortion:
    R52 (470K)---replace it with an 470K Linear Pot.(Kick:808>909>Square)
    or replace it with an 220K Linear Pot. so it overdrives all the time a bit (Kick: 909>Square)
    >If you do this mod, dont change R56(10K) elswhere you will gett crackling<
     

    A bit Louder:
    R56(10K) parallel soldering a 6K8>8K thatdoubles the Volume, which you need if you dont have the Mixing board, that may blow up the Volume @main.... but that mode may crackle if you have made the Distortion mod... so let it be...


    The Big Booooooooom:
    Decay long to EVER-OPEN: by parallel soldering a 100K to D5 - it is a good idea to make switch for that (so long that it humms)



    Deeper Tune:
    Bridge R6!


    Emphasis Filter Frequency: (or is this Resonance?)
    Replace Rh by an 100K log pot in series with an 100K resistor,
    with 47K you get in self resonance...also 56K is in this shitty sound... better take a 100K TrimPot!
    Pinout of the Pot: when you look from the top of the 100K pot (where you turn) then take first 2 Pins (negativ log) let the 3rd Leg open
    If you dontneed the Attack-Pot (what is the trigger signal, in the signal path)then take that, by isolating the pins from the pcb, and do like above...
    ---I noticed that the lower frequencys are cut off a bit...better take a greater Resistance 470K or 1M!
     

    Changing the cap "CFm":
    let em out, give some really extrem high eardammage frequencys! holy for Highats!
    --let them out and solderm the 2 open leads to 2 contantacts at the frontpanel--- with your finger you can do some lopassfiltering ;)))
    480p Stryflex Foil Capacitor - mid noise telephone speaker
    18nf Foil-Capacitor for mid hi kick (magengrube)
    10uF 36V Bipolar Elko for mid-low-kicks
    100uf 35FV Bipolar Elko for sub kicks and bass
    BZX85C Diode --- sweeping 303 like sawtooth screaming

    LT132SBL3040- connect the 2 outerpins to get some "knackness" or any other Chip silizium germanium or  whatever

    i decidet for one Switch Position- to install a socket on the frontpanel to plug in diodes or transistors directly.... holy that make fun...
     

  10. need place for the midibox stuff
     

    plug and play resistor socket for Matrix leds (150Ohm is to dark)
     

    make a resistor plug
     

    plugged in --- here 100Ohm and still to dark LED
     

    hole for Trigger Matrix --- dremel died
     

    lcd hole... made by hand (dremel is dead)
     

    lcd, menu encoder and analog trigger led
     

    the digitall inner
     

    Fully digitally stuffed
  11. "=!" isn't a valid C operator, try "!="

     

     

    Code with !=    and 2D Arrays (1D no problem)

    if((TrgBtnOut[0]==1 && TrgBtnIn[0]==1)){Matrix[0][0] != Matrix[0][0];}
    main.c:641: warning 110: conditional flow changed by optimizer: so said EVELYN the modified DOG

    :puppeh:     humor?

     

     

    Code with =!    and 2D Arrays (1D no problem)

    if((TrgBtnOut[0]==1 && TrgBtnIn[0]==1)){Matrix[0][0] =! Matrix[0][0];} 
    _Matrix + 127)(7) == _Matrix + 95)(7)

    sdcc: /home/sdcc-builder/build/sdcc-build/orig/sdcc/src/pic16/pcode.c:9278: pic16_OptimizeBanksel: Assertion `0 && "Could not assign a symbol to a bank!"' failed.

    Caught signal 6: SIGABRT

    make: *** [_output/main.o] Fehler 1

     

    I stay by 1D Arrays.

     

     

  12. @TK: i will give it a try if it works - i will post a Stripped Down 2D Array Code

     

    its a good Idea, bevore you connect the matrix, to connect simple Diodes, the troubleshooting and programming with that is much easier (if you are an C-NewBee like me)

     

    AND it WORKS:

    And here is the stripped down 1D-Array code for a 8x8LED-Matrix for 8Bit Core:
  13. 3.Matrix-Buttons (2x8 aka 64xVirtual Buttons>the matrix)

     

    While i dont have problems with 1Dimensional Arrays.

    I have massiv Problems with the 2 Dimensional Arrays.

     

    following codes are working:

    if((TrgBtnOut[0]==1 && TrgBtnIn[0]==1)){Matrix[0][7] =! Matrix[0][7];}
    
    if((TrgBtnOut[0]==1 && TrgBtnIn[1]==1)){Matrix[1][0] =! Matrix[1][0];} 
    

    these not: (Matrix[2][0] - Matrix[7][0] making troubles

    if((TrgBtnOut[0]==1 && TrgBtnIn[2]==1)){Matrix[2][0] =! Matrix[1][0];} 
    if((TrgBtnOut[0]==1 && TrgBtnIn[2]==1)){Matrix[2][0] =! Matrix[2][0];} 
    
    if((TrgBtnOut[0]==1 && TrgBtnIn[1]==1)){Matrix[2][0] =! Matrix[2][0];} 
    

    Error:

    _Matrix + 33)(7) == _Matrix + 1)(7)
    sdcc: /home/sdcc-builder/build/sdcc-build/orig/sdcc/src/pic16/pcode.c:9278: pic16_OptimizeBanksel: Assertion `0 && "Could not assign a symbol to a bank!"' failed.
    Caught signal 6: SIGABRT
    make: *** [_output/main.o] Fehler 1
×
×
  • Create New...