grblHAL / MSP432P401R

grblHAL driver for MSP432P401R (MSP-EXPMSP432P401R LaunchPad)
Other
3 stars 1 forks source link

"MSP432P401R" How to use the keyboard #1

Closed CHTUZKI closed 1 year ago

CHTUZKI commented 1 year ago

I use MSP432P401R to run grblhal. I want to ask how MSP432P401R connects to the keyboard, or how MSP432P401R connects to the "GRBL_MPG_DRO_BoosterPack" project. I can't find the relevant instructions.

At present, I only connect the serial port of the "GRBL_MPG_DRO_BoosterPack" project to MSP432P401R, and my keyboard is now connected to the "GRBL_MPG_DRO_BoosterPack" project.

I see that the "GRBL_MPG_DRO_BoosterPack" project has a second I2C interface to relay keyboard data. I have connected this I2C interface with MSP432P401R, Press the button, nothing happens.

I see the following lines of code in the driver. c file of MSP432P401R:

#if I2C_STROBE_ENABLE
                case PinGroup_Keypad:
                    if(i2c_strobe.callback)
                    {
                        i2c_strobe.callback(0, !BITBAND_PERI(I2C_STROBE_PORT->IN, I2C_STROBE_PIN));
                    }
                    break;
#endif

I2C_STROBE_PIN Where should be connected? Does this pin tell MSP432P401R that the key is pressed now ?

If my "GRBL_MPG_DRO_BoosterPack" project is now in MPG mode, will the keyboard function be turned off ?

Can you give me some help? Thank you very much.

terjeio commented 1 year ago

Where should the PIN be connected?

To the Tiva PD2 pin, I'll update the I2C (P10) labelling for it.

Does this pin tell MSP432P401R that the key is pressed now ?

Yes.

If my "GRBL_MPG_DRO_BoosterPack" project is now in MPG mode, will the keyboard function be turned off ?

No, but keypresses will not be forwarded via I2C, they are translated to gcode commands and sent via the UART port to the MSP432.


A side note: with the keypad plugin active in the MSP432 then you can in fact connect the MSP430 keypad processor directly to the MSP432 (SDA/SCL/I2C strobe) - bypassing the Tiva MPG.

CHTUZKI commented 1 year ago

Thank you for your answer. Now everything is normal. πŸŽ‰πŸŽ‰πŸŽ‰