Marxon

Led wiring

4 posts in this topic

Hi all!

I am a confused about the FM led wiring.

In the DOUT schematic the intrument and operator LEDs are connected to-SR2 D6 and SR D7.

It is not possible to change the pin configuration for these LEDs in „cs_menu_io_tables.inc“.

But here SR2 D6 and SR D7 are assinged to matrix Col1 Col2 instead.

Which configuration is correct?

Best regards

Marxon

Edited by Marxon

Share this post


Link to post
Share on other sites

Hi again!

 

 

It seems that the DOUT pins of the matrix get mirrored somehow.
In my Midibox FM i connected

LED column 1    SR 3    Pin 4
LED column 2    SR 3    Pin 5
LED column 3    SR 3    Pin 6
LED column 4    SR 3    Pin 7
LED column 5    SR 2    Pin 0
LED column 6    SR 2    Pin 1
LED row    1    SR 2    Pin 5
LED row    2    SR 2    Pin 4
LED row    3    SR 2    Pin 3
LED row    4    SR 2    Pin 2

but in cs_menu_io_tables.inc i have to define it:

DIO_M_TABLE
    ;; --> DIN <-- pins of the 6 column select buttons
    ;;         Col1 SR/Pin, Col2 SR/Pin,  Col3 SR/Pin,  Col4 SR/Pin,  Col5 SR/Pin,  Col6 SR/Pin
    DIO_M_COL_ENTRY  3, 6,        3, 5,         3, 4,         3, 0,         3, 1,         3, 2

    ;; --> DOUT <-- pins of the 6 LED columns
    ;;         Col1 SR/Pin, Col2 SR/Pin,  Col3 SR/Pin,  Col4 SR/Pin,  Col5 SR/Pin,  Col6 SR/Pin
    DIO_M_COL_ENTRY  3, 3,        3, 2,         3, 1,         3, 0,         2, 7,         2, 6


    ;; --> 1*DIN/4*DOUT <-- pins of the 4 row select buttons
    ;;         DIN SR/Pin,  Row1 SR/Pin,  Row2 SR/Pin,  Row3 SR/Pin,  Row4 SR/Pin
    DIO_M_ROW_ENTRY  3, 3,        2, 2,         2, 3,         2, 4,         2, 5

 

 

Share this post


Link to post
Share on other sites

This is related to the typical confusion about the pin order.

The first DOUT pin (offset 0) is D7, the next (offset 1) is D6, etc..

 

Documentation is much better in newer projects (e.g. in MIOS32 based projects I used "D7..D0" instead of offset "0..7")

 

Best Regards, Thorsten.

Share this post


Link to post
Share on other sites

Thank you Thorsten!
A friend has my first FM synth so i couldt not check how i wired it there.
I edited the cs_menu_io_tables.inc so that the pin order matches the "MIDIbox FM CS DOUT map" schematics.
(It is just a other pin calculation, so please do not laugh)
 

DIO_M_COL_ENTRY MACRO sr0, pin0, sr1, pin1, sr2, pin2, sr3, pin3, sr4, pin4, sr5, pin5
    db    ((7 - pin0) + 8*(sr0-1)), ((7 - pin1) + 8*(sr1-1)), ((7 - pin2) + 8*(sr2-1)), ((7 - pin3) + 8*(sr3-1)), ((7 - pin4) + 8*(sr4-1)), ((7 - pin5) + 8*(sr5-1))
    ENDM

DIO_M_ROW_ENTRY MACRO sr_in, pin_in, sr0, pin0, sr1, pin1, sr2, pin2, sr3, pin3
    db    ((7 - pin_in) + 8*(sr_in-1)), ((7 - pin0) + 8*(sr0-1)), ((7 - pin1) + 8*(sr1-1)), ((7 - pin2) + 8*(sr2-1)), ((7 - pin3) + 8*(sr3-1))
    ENDM

cs_menu_io_tables.inc


There is also a writing mistake about the CAN bus pins in the setup*.asm files:

 

    ;; if 1: pin RB2 and RB3 are used for CAN bus
    ;;       MBHP_OPL3 data pins #2 and #3 have to be connected to PIC pin RB1 and RB2
    ;;       (available at J5:A6 and J5:A7)


Correct is:

 

 ;; if 1: pin RB2 and RB3 are used for CAN bus
    ;;       MBHP_OPL3 data pins #2 and #3 have to be connected to PIC pin RE1 and RE2
    ;;       (available at J5:A6 and J5:A7)    

 

Best regards

Marxon

Edited by Marxon

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now