Jump to content
43oh

Recommended Posts

Hi, I'm having a lot of trouble figuring out how to communicate with this Adafruit 7-segment display.

I've looked through the Adafruit LED library, seen non-MSP microcontrollers working with the code, tried understanding the HT16K33 datasheet. I've even recorded the SCL and SDA signals from my Arduino connecting with the 7-segment. However, I'm still not sure how to get it to work with my MSP430G2553 or even how to get started. Though, I have looked into the MSP430 example code for i2c communications with the MSP430 as the master.

Is it as simple as just converting the Adafruit LED library from C++ to C?

I didn't expect interfacing with a 7-segment display to be so difficult for me.

Any advice is much appreciated.

Link to post
Share on other sites
On 10/31/2017 at 0:54 AM, ConfusedCoder said:

've even recorded the SCL and SDA signals from my Arduino connecting with the 7-segment.

Have you done the same with the '430? It's worth taking a moment with a 'scope or logic analyzer to see what you're transmitting, if anything.

Link to post
Share on other sites
25 minutes ago, NurseBob said:

Have you done the same with the '430? It's worth taking a moment with a 'scope or logic analyzer to see what you're transmitting, if anything.

Yeah, I've taken a couple of pictures of my oscilloscope captures and attached it to the thread.

arduino_data_init is what I think is the initial data sequence needed to start up the 7-segment display, while arduino_data_loop is how the data appears after it's initialized. My arduino code is currently set to write either 0x1103 or 0x1101 continuously. msp430_data is just the communication I have set up so far with the 430.

In the following order: msp430_data, arduino_data_init, arduino_data_loop

msp430_data.jpg

arduino_data_init.jpg

arduino_data_loop.jpg

Link to post
Share on other sites

I don't know which rigol scope you have, but mine can be put into I2C mode and will decode the messages much like a logic analyzer, which can be useful.  In my limited I2C experience, missing ACKs and NAKs can be a problem, along with timing issues (though your '430 trace looks sharp).  Does adafruit publish a sketch for talking to the display?  I've used their code to run LCD touchscreens with a 'F5529.  Of course, the G2553 may not have enough memory to load a C++ program...

Link to post
Share on other sites
54 minutes ago, NurseBob said:

I don't know which rigol scope you have, but mine can be put into I2C mode and will decode the messages much like a logic analyzer, which can be useful.  In my limited I2C experience, missing ACKs and NAKs can be a problem, along with timing issues (though your '430 trace looks sharp).  Does adafruit publish a sketch for talking to the display?  I've used their code to run LCD touchscreens with a 'F5529.  Of course, the G2553 may not have enough memory to load a C++ program...

I have a DS1054Z. I had no idea that it could decode I2C until now. I captured some data and it seems to me that the MSP430 code needs to follow a structure similar to the Arduino code in initiation as well as during the looping cycle.

Adafruit has an example sketch as well as a library for communicating with the 7-segment display.

Link to post
Share on other sites

If the G2553 has sufficient space to load the Adafruit code, I'd suggest starting there. I've found there's usually only a change to the header to account for the '430 vs. Arduino.  I believe I've run their examples on F5529s with edits only to pin assignments.  And, of course, your '430 comms with the device probably need to exactly match what the arduino sends for startup.

Link to post
Share on other sites
13 hours ago, NurseBob said:

If the G2553 has sufficient space to load the Adafruit code, I'd suggest starting there. I've found there's usually only a change to the header to account for the '430 vs. Arduino.  I believe I've run their examples on F5529s with edits only to pin assignments.  And, of course, your '430 comms with the device probably need to exactly match what the arduino sends for startup.

Oh that's interesting. I didn't know that the MSP430 could load C++. I'll try it out when I have the chance.

Thanks

Link to post
Share on other sites

Yes, it will run C++/C code, your limitation is the load size of the program.  Don't be too surprised if you run into errors trying to load Adafruit's, or anyone else's class libraries on the G2553.  I've not really done much with that particular LP due to the memory and other constraints. FWIW, for under $15.00 you can pick up a F5529LP which won't have the memory limits, and has the option to do USB-based communication.  It's a cheap, versatile device.  Just a thought. :)

 

Link to post
Share on other sites
On 11/3/2017 at 8:50 AM, NurseBob said:

Yes, it will run C++/C code, your limitation is the load size of the program.  Don't be too surprised if you run into errors trying to load Adafruit's, or anyone else's class libraries on the G2553.  I've not really done much with that particular LP due to the memory and other constraints. FWIW, for under $15.00 you can pick up a F5529LP which won't have the memory limits, and has the option to do USB-based communication.  It's a cheap, versatile device.  Just a thought. :)

Yeah, F5529LP sounds like a really great upgrade. Thanks for the suggestion.

Does it require any crystal soldering like the G2553 does?

 

Link to post
Share on other sites
21 minutes ago, ConfusedCoder said:

Does it require any crystal soldering like the G2553 does?

No.  Both the 32KHz and 4MHz crystals are placed.

Lots of very interesting things to do with that chip.  For a small Physical therapy research team I've built a force sensor using a FSR that can capture and transmit data at 1KHz to a Java app running on a PC via USB 2.0. The Java app, in turn, writes the data to a csv file for later analysis and displays a line chart of each run at completion to verify the basic data captured.  They're happy and I learned a bunch... :)

Have fun.

Edited by NurseBob
Addtional info
Link to post
Share on other sites
3 minutes ago, NurseBob said:

No.  Both the 32KHz and 4MHz crystals are placed.

Lots of very interesting things to do with that chip.  For a small Physical therapy research team I've built a force sensor using a FSR that can capture and transmit data at 1KHz to a Java app running on a PC via USB 2.0.  They're happy and I learned a bunch... :)

Have fun.

Wow, I will. Thanks!

Link to post
Share on other sites

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.

×
×
  • Create New...