Quantcast
Channel: MSP low-power microcontrollers
Viewing all articles
Browse latest Browse all 62309

Forum Post: RE: MSP-CAPT-FR2633: Captivate Design Center - Multi i2c slave support

$
0
0
HPL, Thanks for evaluating CapTIvate. The CapTIvate Design Center does not support multiple I2C bus addresses at this time. However, the HID-BRIDGE does and you can do a manual configuration to set it up for a different address. The easiest way to enable what you are trying to do would be to change the I2CADDRESS parameter on one HID-BRIDGE and save that as the boot configuration, so that it powers up that way (much more convenient than changing it every time). If you have two CAPTIVATE-PGMR modules you could do this pretty easily. The HID-BRIDGE is configurable over an ASCII HID interface using the HB command set, as described here: To send commands from a GUI tool, you can use the MSP USB HID Demo GUI which is contained in MSP430Ware. If you already have MSP430Ware installed, this tool is likely located at C:\ti\msp\MSP430Ware_x_xx_xx_xx\usblib430\Host_USB_Software\Java_HID_Demo\Windows\HidDemo.jar. You would need to update the msp amd MSP430ware paths to match your version. Once you open the tool, change the PID to 0x0965 and the Interface to HID1, then select Connect (with the CAPTIVATE-PGMR connected to the PC and the CapTIvate Design Center closed). If that completes successfully, then you should be able to write HB I2CADDRESS to get the current address. This should return 0x0A. To set the address, write HB I2CADDRESS 0x0B . This would change the target slave address to 0x0B. These settings are forgotten when the CAPTIVATE-PGMR is disconnected, unless you save this as the boot configuration. This can be done by writing HB SAVECONFIG ACTIVE . This saves the active configuration to boot memory. Now the new address is retained through power cycling. If you ever need to restore the default config, just send HB SAVECONFIG DEFAULT . These commands are shown below. One additional item to consider is the IRQ line. The I2C mode also needs an IRQ single from the target MCU. If you share this signal and both MCUs on your board are pulling it, the HID BRIDGE will not know which slave is requesting a read and it will try to access the programmed address regardless of who is pulling that line. So you would need to keep that line seperate and connect to the MCU you want to communicate with. Hope this helps! It's not as easy as doing it in the CapTIvate Design Center, but it is possible. I will take down this use-case as a future enhancement. Regards, Walter

Viewing all articles
Browse latest Browse all 62309

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>