Jump to content

problem with bankstick read


wonder
 Share

Recommended Posts

Hi all

I 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 generated

All is organized in patches where anyone defines a command set

Maybe 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 procedure

Here 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 TMP1

LOOPNAME1

     call MIOS_BANKSTICK_Read

     call MIOS_LCD_PrintChar        

     decfsz TMP1

     rgoto LOOPNAME1

     movlw 0xc0

     call MIOS_LCD_CursorSet

     movlw 0x14

     movwf TMP1

LOOPNAME2

     call MIOS_BANKSTICK_Read

     call MIOS_LCD_PrintChar  

     decfsz TMP1

     rgoto LOOPNAME2

I 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 F7

F0 00 00 7E 40 00 02 40 00 00 00 52 65 76 F7

F0 00 00 7E 40 31 0E 0A 62 F7

And the application running on the pic hangs

Changing the antepenultimate byte from 40 to 3F I can read 74601 bytes form the bankstick (an entire 24lc512 eprom)

Link to comment
Share on other sites

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_TxBufferPut

at the top, replace all calls to MIOS_LCD_PrintChar by MIOS_MIDI_TxBufferPut, and

Add:

  movlw 0xf7

  call MIOS_MIDI_TxBufferPut

at 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 F7

F0 00 00 7E 40 00 02 40 00 00 00 52 65 76 F7

F0 00 00 7E 40 31 0E 0A 62 F7

And the application running on the pic hangs

the checksum is missing, therefore the error code

The core doesn't hang, but it will be reset after a 02 upload request, thats the normal behaviour.

Best Regards, Thorsten.

Link to comment
Share on other sites

  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...