Over the past few days I have been trying to understand how I can interface my MSP430 with a MLX90333 hall effect sensor from a computer joystick.
The MLX90333 is an interesting chip in the sense that the main registers are already programmed via a proprietary programmer created by Melexis(PTC-04). From an MCU perspective, they’ve exposed a “3-pin SPI mode” which consists of CS, CLK, and a shared MISO-MOSI.
According to the datasheet, the communication of a single x-y-z 8 byte frame consists of the following:
Before tearing apart the joystick for this MSP430 project, I made sure to hookup a few traces and capture joystick movement over a logic analyzer. Below is a single frame:
Now for the problem. I am trying to wrap my head around what they refer to as a shared miso-mosi pin. Admittedly I have searched the forum and did find a few posts, but I still don’t fully understand this concept. Based on the captures, CS goes low, the joystick sends in 1 byte(0xFF), receives 7 bytes back consisting of x-y-z-crc, then CS goes back to high.
From a software perspective, I am confused how I get 7 bytes back, if I only wrote 1 byte(0xFF).