wonder Posted September 17, 2004 Report Share Posted September 17, 2004 Hi allI realized the core to make a control pedal for my keyboards.At every pression of the buttons, a midi message based on the bankstick contents is generatedAll is organized in patches where anyone defines a command setMaybe the concept is a bit obscure, but this isn't important to explain my problem's details (if someone plays keyboards may find useful this project; if someone is interested I can explain better the working mode of the logic)Now I finally explain the problem:I need to read from the bankstick a 40 character string that must be visualized as patch title on the lcd display.Here's an extract from the file banckstick_content.inc related to strings load:db "Europe The Final Countdown "db "Sonata Arctica Full Moon "Here there is my problem : Countdown become Countdownn and Moon become Moonn (the other words remain correct). It seems the problem is the "o" and "n" letters followed by a space.I'm sure that strings in the bankstick are correct.Using the message sysex "F0 00 00 7E 40 00 03 00 F7 F0 00 00 7E 40 00 01 40 00 40 00 F7" I obtain the bankstick content and re-converting it with the syx2asm.pl I can verify that there are no double letters.At this point the problem must be in the reading procedureHere there's the code which do the reading: movff addrhi_patchname_current, MIOS_PARAMETER2 movff addrlow_patchname_current, MIOS_PARAMETER1 movlw 0x80 call MIOS_LCD_CursorSet movlw 0x14 movwf TMP1LOOPNAME1 call MIOS_BANKSTICK_Read call MIOS_LCD_PrintChar decfsz TMP1 rgoto LOOPNAME1 movlw 0xc0 call MIOS_LCD_CursorSet movlw 0x14 movwf TMP1LOOPNAME2 call MIOS_BANKSTICK_Read call MIOS_LCD_PrintChar decfsz TMP1 rgoto LOOPNAME2I also tried using the function "MIOS_BANKSTICK_ReadPage" instead of "MIOS_BANKSTICK_Read" to be able to make a unique reading but I can't get it working (I'm not expert with pics and assembly).Do you have some suggestion?P.S. When I wrote about the sysex message I haven't reported the message as I use it.If I send this message I get in reply:F0 00 00 7E 40 00 0F 00 F7F0 00 00 7E 40 00 02 40 00 00 00 52 65 76 F7F0 00 00 7E 40 31 0E 0A 62 F7And the application running on the pic hangsChanging the antepenultimate byte from 40 to 3F I can read 74601 bytes form the bankstick (an entire 24lc512 eprom) Quote Link to comment Share on other sites More sharing options...
TK. Posted September 17, 2004 Report Share Posted September 17, 2004 Hi Wonder,it looks strange, really strange. Following test would be interesting: don't write out the characters on LCD, but send them to the MIDI interface.Write: movlw 0xf0 call MIOS_MIDI_TxBufferPutat the top, replace all calls to MIOS_LCD_PrintChar by MIOS_MIDI_TxBufferPut, andAdd: movlw 0xf7 call MIOS_MIDI_TxBufferPutat the end.Start MIDI-Ox and check the SysEx messages which are sent by your core. They should contain exactly the character codes which are in your BankStick. If not, the problem could be your LCD, but just try it first.Sending MIDI messages for debugging is a really useful - I'm doing this very often for logging and analyzing data :)If I send this message I get in reply:F0 00 00 7E 40 00 0F 00 F7F0 00 00 7E 40 00 02 40 00 00 00 52 65 76 F7F0 00 00 7E 40 31 0E 0A 62 F7And the application running on the pic hangsthe checksum is missing, therefore the error codeThe core doesn't hang, but it will be reset after a 02 upload request, thats the normal behaviour.Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
wonder Posted August 11, 2006 Author Report Share Posted August 11, 2006 I have found out that this isn't a banckstick problem but a lcd problem.....indeed also with the lcd test function of mios studio, when i try to write ,for example, "Silent Man", the lcd show "Silent Maan"..... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.