Jump to content

robinfawell

Programmer
  • Posts

    292
  • Joined

  • Last visited

Posts posted by robinfawell

  1. I agree with a previous suggestion to make an adaptor board as I have done.

     

    Don't cut any Fatar circuit boards.

     

    This means that you can plug the 40 pin Fatar connector by flat cable into a 40pin connectors on the adapter board. Or maybe to split the cable into two and have more easily obtainable 20 pin connectors (X2). Then using small dia cable make the appropriate connection to two 16 pin connectors.

     

    Therefore the adaptor will have a 40pin connector (or 2X 20 pin connectors)and two 16 pin connectors. The latter will connect by two flat cables to the Dio- Matrix Board. The 40 (or 2X20) pin flat cable(s) will connect to the Fatar Keybed. My keybed has two 20 pin Micromatch Connectors.

     

    You will of course need to source a tool to assemble the flat cable to the cable. I use a cheap tool and a little ingenuity. You also need to source the mating half of the Fatar connector.

     

    A tip. Don't fit this board under the keyboard as I did. It sounds a good idea but you will likely need to remove it for fault finding.

     

    I haven't studied the NG module enough.The following might not be practical.

     

    I have on the adapter board 16 extra diodes which connect to the switches of soft pedal, sustain pedal, transpose, midi channel, presets, panic button and a few others. I have a Fatar 88 note keybed. I use a 12 X 16 matrix. For a velocity sensitive 88 note keybed you need a 176 position matrix ie 11 X 16, To scan 16 diodes requires as well you need 12 X 16 matrix. The Dio-Matrix board will accommodate the 88 note keybed needs plus 80 Diode/ Switch combinations if required.

     

    I use TK's Programming Example 29 with my own program modifications. (Helped a lot by Thorsten) Robin

     

    I should have mentioned that I am using the STM32F40 module. The redesign has just been completed.

  2. Here are a couple of ideas.

     

    Most of my work concerns digital piano.

     

    In addition to scanning the keys for switch changes . I scan 16 extra switches for changes.  You could use J5 to to the same.

     

    I use a membrane momentary action switch.made by MEC with low bounce characteristics.

     

    Here is some code for a 2 switch solution. This enables the user to to decrement and increment the value.  You will need to declare the transpose variable as a global variable.

     

    //transpose buttons
    	if(pin == 95 && pin_value == 0){//pin 95 is RH Transpose Button ie + Transpose (Higher Note)
    	transpose = transpose +1;}	
    	if(pin == 94 && pin_value == 0){//pin 94 is LH Transpose Button ie + Transpose (Lower Note)
    	transpose = transpose -1;}	
    	if(transpose > 9){ transpose = 9;}
    	if(transpose < -9){transpose = -9;}

     

    You need only one switch, but you can only advance

     

    if(pin == 95 && pin_value == 0){//pin 95 is  Transpose Button 
    	transpose = transpose +1;}
    if(transpose > 9){ transpose = 0;}	

     

    In the latter case pressing the button after 9 is reached, returns the variable to 0

     

     

    Later in the program you will add the transpose value to the note number..

     

    For octave shifts you will use multiples of 12 notes

     

     

     

    Robin

  3. My  rebuild of my digital piano has progressed  to incorporating my DOG display.

     

    I recall that  last time, over a year ago, I used the Mios Studio app to enter the LCD parameters.

     

    The program is my version of Thorsten's example, Fast Scan Matrix.

     

    I cannot get the commands to work.  

     

     

     [4973.534] help

    [4973.687] [MIOS32_MIDI_SYSEX_Cmd_Debug] command handler not implemented by application

     

     

    I notice that the app is showing Unnamed App in the parameters panel.

     

    Am I missing something?

     

    Robin

  4. I have to report a complete failure in trying to follow the linux gcc toolchain download and file setup.

     

    specifically 

     

    sudo wget http://www.//www.midibox org/mios32_toolchain/gcc-arm-none-eabi-xxxxxx.tar.bz2

     

    and the next line

     

    sudo tar zxvf-gcc-arm-none-eabi-xxxxxx.tar.bz2

     

    The text asks for xxxxxx to be replaced by the date of the latest tool chain. 

     

    I have tried 

     

    4_7-2013q3

     

    2013q3

     

    20130619

     

    I have tried adding "linux" after the date. Nothing seems to work.

     

    I'm obviously missing something important.

     

    However,  I've gone back to Win 7 where I can compile correctly.  I have used tutorial 005 and can generate Midi events using shorting links on J5A/B

     

     

    If anybody can suggest a solution for the linux problems, I will appreciate the help.

     

     

    Robin

  5. Thorsten

     

    It works!

     

    The pin voltages on J5 are about 3V and I have received an event.

     

    My toolchain file

     

     /usr/local/mios32_toolchain/bin consists of 27 arm_none_eabi files each with different endings

     

     

    Robin

     

    Here is the result after compile using my data not yours.  I have now changed the Board env variable to that shown below

     

     

    s $ make
    rm -f project.hex
    -------------------------------------------------------------------------------
    Application successfully built for:
    Processor: STM32F407VG
    Family:    STM32F4xx
    Board:     MBHP_CORE_STM32F4DISCOVERY
    LCD:       universal
    -------------------------------------------------------------------------------
    arm-none-eabi-size project_build/project.elf
       text   data    bss    dec    hex filename
      57328    104  16296  73728  12000 project_build/project.elf
    20000000 D __ram_start
    20004010 B __ram_end
    robinfawell@robinoffice ~/midibox/mios32/trunk/apps/tutorials/005_polling_j5_pins $ 
     

      But this doesn't work!  No events - J5 pins at 0.3V

     

    Here is a svn update

     
    robinfawell@robinoffice ~/midibox/mios32 $ svn update
    Updating '.':
    At revision 2084.
    robinfawell@robinoffice ~/midibox/mios32 $ 
     
  6. Hello Thorsten

     

    I used Linux.

     

    Here is part of the profile file where I set the Env Variables permanently.

     

    export PATH=$PATH:/usr/local/mios32_toolchain/bin
    export MIOS32_PATH=~/midibox/mios32/trunk
    export MIOS32_BIN_PATH=$MIOS32_PATH/bin
    export MIOS32_GCC_PREFIX=arm-none-eabi
    export MIOS32_FAMILY=STM32F4xx
    export MIOS32_PROCESSOR=STM32F407VG
    export MIOS32_LCD=universal
    export MIOS32_BOARD=MBHP_CORE_STM32F4

     

     

    I realise that you want me to use your project hex file.  I'll check it out.

     

    Robin

  7. Hi Thorsten

     

    Yes the pin voltages are correct.  On J5B pins A4,A5,A6 and A7 all measure  approx .3 V to ground.

     

    Robin

     

     

    They are all connected to the correct STM Discovery Pins

     

     Pin A3 is lower , 0.2V

     

     

    PS This morning I got quite excited. I thought I had discovered the problem. In looking at the makefile list after compiling I found that there was no reference to the BOARD variable.  Unfortunately correcting this has made no difference to the voltages on J5

  8. Thorsten

     

    I have been re-reading the bootloader articles.  I note that the LED on the STM device has to flash twice when the bootloader is installed.  

     

    I would say that that it is flashing three times.  What does this mean?  

     

    The reason for this query is that there is no response to MIOS STUDIO after installing Tutorial 5 with shorting pins to ground on J5A.  This makes me doubt whether the bootloader is installed.

     

    The ST utility seems to load the bootloader and shows verification.

     

    Can I use MIOS Studio to show if the Bootloader is installed?

     

    I am getting nowhere fast.

     

    Thanks for your help. Robin

  9. TK

     

    Yes It downloads OK.  It shows as follows.

     

    Apache/2.2.23 (Unix) mod_ssl/2.2.23 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 PHP/5.3.20 Server at www.midibox.org Port 80


    Robin

     

    Today's Comment.  I have used the linux link above to download the GCC file and constructed the Toolchain manually by creating a directory and transferring files into usr/local.  I believe that I have done this properly.

  10. Thanks Thorsten

     

    I today have spent a fair amount of time today reading anything referring to STM32F4 and reread the README on the Tutorials. They,  as you confirm refer specifically to the STM32F4 core.  This is very reassuring to me as I would like to be able to use my digital piano again.

     

    I mentioned earlier in my recent posts that I could not download the MIOS32_toolchain as described in Core Toolchain Setup.

     

    I have tried many times using linux to use the following code

     

    cd/usr/local

    sudo get wget http;// www.org/mios32_toolchain/gcc-arm-none-xxxxxx.tar.bz2

    sudo tar zxvf  gcc-arm-none-eabi-xxxxxx.tar.bz2

     

    Each time I receive  Error 403

     

    I have tried xxxxxx as 2013q3, 20130916, -4_7-2013q3-20130916-linux all with the same result. (error 403)

     

    I am concerned that my ad hoc method to get the same result may have caused a corrupted hex file.

     

    Your guidance will be much appreciated.

     

    Robin

     

    PS I believe have been using the correct toolchain  but perhaps not correctly.

  11. Having given up on using Windows 7 with MIOS STUDIO I have switched to a PC running LINUX (Mint).

     

    MIOS STUDIO seems to work properly.

     

    I have managed to download hex files using MIOS STUDIO, it would seem.  However I would like proceed slowly and looked for an application that I could use to check that the STM32F4 core is OK.

     

    Tutorial 5 seemed to be the ideal candidate as it only needs shorting links to be applied to J5 connector.

     

    I am not sure whether this APP is ready for STM32F4.  I get no response

     

    Please let me know if this is the case and if not let me know if there is another application that would be suitable.

     

    Or, whether I am likely to have a fault on the hardware.

     

    Thanks Robin

     

  12. I have tried to compile using linux  rather than Win7.  I am very new to Linux this but am trying to learn.

     

    It also fails but this time "make" shows a different  problem, it seems to have difficulties with the GCC_PREFIX.

     

    I have tried = arm-none-eabi

                       = arm-none-eabi-gcc-4.7.4

                       = various date formats after the eabi

     

    I am out of ideas.

     

    Robin

  13. SOLVED (I THINK)

     

     

    Using Linux I was unable to download the MIOS32 Toolchain using the sudo wget command.  ( I still can't !)

     

    However I downloaded the gcc-arm-none-eabi /etc / tar.bz2 file by clicking on the linux version on the midibox.org link.  Using Archive manager in Linux Mint I uncompressed the file.  Then I transferred to file to usr/local/ mios32_toolchain.  I added the latter directory.  This did not work either.  Then I realised that the path to the appropriate bin file was interrupted by the "gcc-arm-none-eabi-4_7-2013q3" diirectory.  This I removed.

     

    After this I was able to compile and produce hex files.

     

    I will raise a new post regarding the sudo wget command.

     

     

    As mentioned previously I have damaged my core module and have decided to update to the STM Discovery.

     

    My digital piano was revised last year and the program was based on TK's example of the fast scan matrix.  There a several changes due to the inclusion of the piano pedals and also an organ swell pedal for organ sounds.

     

    I have made several changes to the app.c file on TK's original

     

    The make file refers to an error 

     

     

    E:\Mios32\trunk\apps\examples\fastscan_button_matrix_16x16>make
    rm -f project.hex
    Creating object file for app.c
    app.c:1:0: error: bad value (cortex-m4) for -mcpu= switch
    make: *** [project_build/app.o] Error 1
     
    E:\Mios32\trunk\apps\examples\fastscan_button_matrix_16x16>

     

    I have looked in the project build file and see only references to the STM F10 processor not the STM Discovery processor.

     

     

    project_build/app.o: app.c e:/mios32/trunk/include/mios32/mios32.h \
     e:/mios32/trunk/programming_models/traditional/stm32f10x_conf.h \
     e:/mios32/trunk/drivers/STM32F10x/v3.3.0/STM32F10x_StdPeriph_Driver/inc/stm32f10x_adc.h \
     e:/mios32/trunk/drivers/STM32F10x/v3.3.0/CMSIS/CM3/DeviceSupport/ST/STM32F10x/stm32f10x.h \
     e:/mios32/trunk/drivers/STM32F10x/v3.3.0/CMSIS/CM3/CoreSupport/core_cm3.h \
     e:/mios32/trunk/drivers/STM32F10x/v3.3.0/CMSIS/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.h \
     
    Is this the problem ? 
     
    Please help.
     
    Robin

     

    Later comment 

     

    I have tried the Tutorial 001 and again  "make" gives the same error.  I have checked and rechecked the environmental variables.

  14. I have used the software provided by ST to input the bootloader into the Discovery Unit when plugged into the PCB.  I have a very small number of components on the PCB .  (Namely IC1 and IC2 and their capacitors and the R33 resistor network)

     

    The problem I found was that the ST Link software would not recognise the bootloader hex file. 

    I messed around a bit and the tried the exercise again this time using the Discovery unit on its own. The hex file was recognised and the bootloader apparently loaded. 

     

    Is this normal?  I am wondering whether there is a problem due to there being no power on the IC's.

     

    Maybe someone can explain.

     

    Regards Robin 

  15. I have , I think, electrically damaged my (now obsolete) and only core module.  

     

    My repackaging of my digital piano is complete, apart from a few mechanical details.

     

    Smash TV kindly sent me a PCB for the core module to make a spare. However I would need to fit the STM processor.  I know this is possible but I have no experience in SMD soldering multi pin devices.

     

    The unfortunate fact is that the obsolete core is quite small and I doubt that I could fit either its successors into the space available.

     

    One solution would be to use the STM Discovery and add IC2 and J15A for the DOG Display.  I also need a J5A connector for pots and additional digital inputs.  The only other connection I would need is J8/J9.  

     

    My preferred solution would be to obtain two Core STM32's pcb's with the processors already soldered or alternatively fully assembled units.

     

    If anyone in the UK can help please let me know.

     

     

    Robin

  16. Hi Thorsten

     

    I have progressed.  Following your suggestions I have modified app_lcd to the following code

     

     u8 cursor_map[] = {0x00, 0x40, 0x14, 0x54}; // offset line 0/1/2/3
    and
    u8 cursor_map[] = {0x00, 0x40, 0x10, 0x50}; // offset line 0/1/2/3

    both work .  Thank you

     

    Looking at the data sheet for the EA DOGM 16x display I notice that the Command Parameters are different for the following

     

    Bias Set

    Power Control

    Follower Control 

    Contrast Set

     

    I have changed settings to those of the data sheet and see no obvious difference.  However I have only one display which makes comparisons difficult!

     

    I'm very pleased with the DOG display.

     

     

    My Thanks Again 

     

    Robin

  17. Hello Thorsten

     

    Since my last post the display has mysteriously reverted back to a one line display.  I have in attempting to remove the display and backlight managed to break the glass of the display.  The display type is EA DOGM 162.  

     

    When i receive the new display I will try your suggested changes to the cursor map setting.  I assume that the 1st and 2nd settings are the "addresses" of start positions of the first and second lines of the display and the 14 and 54 somehow define the 16th character.

     

    I have attempted to find the relevant program to change the cursor settings.  I have found a reference to this under app lcd universal  in app.c. line 572

     

          // modify cursor mapping, so that it complies with 3-line dog displays
          u8 cursor_map[] = {0x00, 0x10, 0x20, 0x30}; // offset line 0/1/2/3
          MIOS32_LCD_CursorMapSet(cursor_map);

    Is this the correct place?

     

    Thanks Robin

  18. Hello Thorsten

     

    Thanks for the reply. 

     

    Your reply prompted me to read the text file associated with the Bootloader.  I examined the LCD section and I realised that I had misinterpreted the "lcd_height" as character height rather than number of lines.  After fixing this it worked.

     

    Robin

  19. I am attempting to incorporate the above display into my digital piano setup.

     

    I have set up the display in the MIOS studio bootloader using the help function.  It works except that the second line is missing.  

     

    Do I need to initialise the LCD?  I notice in the Functions list there are functions like

     

     

    const char* MIOS32_LCD_LcdTypeName ( mios32_lcd_type_t lcd_type  ) 

     
    Are these needed? 
     
    Of course I may have a hardware fault either in the display or in my connections.  I have checked the board wiring fairly thoroughly.
     
    I should also add that the 2 X 16 standard LCD works.
     
    Robin
     
     
     
     
     
     
  20. Hello Thorsten

    Thanks for correcting the AIN mask. I think that the error was caused by my failing to initialise J5 inputs properly. I was careless with the "for loops".
     

    for(pin=0; pin<7; ++pin)
    (MIOS32_BOARD_J5_PinInit(pin, MIOS32_BOARD_PIN_MODE_INPUT_PU)); should have been
    
     for(pin=0; pin<=7; ++pin)(
        MIOS32_BOARD_J5_PinInit(pin, MIOS32_BOARD_PIN_MODE_INPUT_PU));



    I made this error a couple of times. There was basically nothing wrong with the APP_AIN_NotifyChange function.

    The CC function MIOS32_MIDI_SendCC(kb_midi_port, kb_midi_chan, 7, value_7bit); produces a smooth volume control for the organ synths. The cable length is about 50cm.

    I now need to wire up my new DOG LCD Display and the electronics will be complete.

    Thanks once again!

    Robin

  21. Dear Thorsten

     

    I now have the LCD working for my needs. All the the variables that I need to display are global variables.  I need to refine the code so that I avoid LCD updates for non keyboard events that do not need displaying.  That should be straightforward.

     

    I have one task left.  I want to incorporate a swell pedal into the system so that the keyboard has 2 modes.

     

    Piano mode  where the synths are velocity sensitive. Organ mode where the synths are at a fixed loudness.

     

    To do this I plan to use CC no 7.

     

    Here is the code which I borrowed from the Examples using J5.  

     

    
    /////////////////////////////////////////////////////////////////////////////
    // This hook is called when a pot has been moved
    /////////////////////////////////////////////////////////////////////////////
    void APP_AIN_NotifyChange(u32 pin, u32 pin_value)
    {	
    	//MIOS32_AIN_PinGet(3);
    	MIOS32_BOARD_J5_PinGet(3); or MIOS32_AIN_PinGet(3);
    	u8 value_7bit = pin_value >> 5;
    	MIOS32_MIDI_SendCC(kb_midi_port, kb_midi_chan, 7, value_7bit); 
    }

    I am using pin 3 on J5A.

     

    I get one only CC message 7 and then the core locks up.

     

    I have followed the instructions regarding masks (I have used 0x0004) and have set the AIN deadband to 31 in the  config h file.

     

    Incidentally is the masking necessary if the J5 Board pins have been completely defined as either Analog, Outputs or Inputs.  Also do the unused Digital defined Inputs need grounding?

     

    I have tried both the AIN_PinGet and the J5_PinGet  to obtain pin_value for pin 3.

     

    I have even  tried putting the code into App Background but the system also locks up.

     

    I would appreciate some guidance.

     

    Thanks Robin

×
×
  • Create New...