Jump to content
Sign in to follow this  
yyrkoon

MSP430G2 emulator.

Recommended Posts

So, by emulator. I mean like a device that has cables that plug into a socket like a MSP430G2*, but used for debugging. Also this functionality is not exactly what I want. But what I would really want, is a way to use a launchpad with an G2 already in it. Then plug various pins into an external cicruit, but still have access to SPY Bi wire interface. FOr Serial out as well as program-ability.

 

Currently my reasoning is simple. I have a project I'm working on, which has no spi-by-wire, or any feedback for that matter. So I have to program the chip in a launchpad, kill the power to the launchpad, remove chip insert into the external board, and observe. This is a serious pain in the backside . . .

 

SO what is the feasibility of leaving the MSP430G2* in the launchpad, but running various pins out to the external board ? I have a single ADC pin, two GPO's and a single GPI that are needed on the external board only. Would I need to isolate things ? optocouplers, etc ?

Share this post


Link to post
Share on other sites

 

SO what is the feasibility of leaving the MSP430G2* in the launchpad, but running various pins out to the external board ? I have a single ADC pin, two GPO's and a single GPI that are needed on the external board only. Would I need to isolate things ? optocouplers, etc ?

I have done that but what I normally do is put a header on the external board which can be used to program the microcontroller, provide serial communication, and even power if desired.  I normally use a F5529 LaunchPad to program and debug rather than a G2.  For example, see this board with a G2955 and note the header which is connected with a ribbon cable to the F5529 during programming and debugging:

post-45284-0-61399000-1467581550_thumb.jpg

 

Click on the photo to enlarge and you can see the header at the bottom of the board, kind of middle right.  Use the jumpers to isolate the eZ-FET from the rest of the LaunchPad and connect it to the header on the external board.

Share this post


Link to post
Share on other sites

I have done that but what I normally do is put a header on the external board which can be used to program the microcontroller, provide serial communication, and even power if desired.  I normally use a F5529 LaunchPad to program and debug rather than a G2.  For example, see this board with a G2955 and note the header which is connected with a ribbon cable to the F5529 during programming and debugging:

attachicon.gifCompleted with top off.jpg

 

Click on the photo to enlarge and you can see the header at the bottom of the board, kind of middle right.  Use the jumpers to isolate the eZ-FET from the rest of the LaunchPad and connect it to the header on the external board.

Ok, I do not have one of those. Probably could not afford one right now either.

 

Basically, I'm asking if i can run the MSP430G2 launchpad as is but connected to another external board via a few GPIO's and an ADC. My concerns are that both are powered separately, and the launchpad is connected to an expensive laptop through a USB hub. . .

Share this post


Link to post
Share on other sites

You can do what I described with a G2 LaunchPad, I just prefer the other.

 

Will the external board and LaunchPad arrangement share a common ground and are the pins limited to 3.6? Is there a way the external board can suppy higher voltage and if so, how much and under what circumstances?

Share this post


Link to post
Share on other sites

You can do what I described with a G2 LaunchPad, I just prefer the other.

 

Will the external board and LaunchPad arrangement share a common ground and are the pins limited to 3.6? Is there a way the external board can suppy higher voltage and if so, how much and under what circumstances?

The board is powered via a 5v wallwart at the moment. The MSP430G2 is powered via a button cell. I've seen the voltage go as high as 3.57v but that's in the launchpad and connected to nothing. One thing that is bothering me is that the pin that is acting as an ADC is getting over 3v in. something liek 3.29v, but I do not have ADC active on that pin yet.

 

But the rest of the pins are just 3.3v GPIO . . . with exception of vcc and gnd of course. Granted I'm also seeing voltages on the other pins, or at least some of them and that kind of bothers me. But I have not set PxDIR = 0x0; and what's the easiest way to set all pins to pulldown ? PxREN = 0x0 too ?

Share this post


Link to post
Share on other sites

By the way, it could be that my buddy set the ADC pin as GPIO input. SO that when the voltage falls below the acceptable limit. the pin just goes low . . . So GPIO versus ADC . . .

Share this post


Link to post
Share on other sites

@@Fmilburn

 

By the way, common ground . . .? Not sure. The launchpad is powered via a USB hub from a laptop, and the board is just plugged into a power strip. I could make sure that they're all plugged into the same power strip, but for that matter they're all plugged into the same socket . . .'

 

I could technically power the launchpad via a USB power jack, and hook serial to an PL2303HX serial to USB adpater, but that would leave me in a bind when it comes to uploading code . . .

Share this post


Link to post
Share on other sites

@@yyrkoon - There are plenty of people who know more about these things than I do on 43oh, but here goes.  I am pretty sure they will correct me if needed....

 

  • Common Ground - By this I mean that GND on the LaunchPad and ground on your external board should be connected with a jumper.
  • Assuming it is a good wallwart that only provides 5V then USB would handle it if it somehow got back. If there is a risk of higher voltages I would not be so comfortable without isolation.
  • There is risk of accidentally putting 5V to a GPIO on the microcontroller if the external board is at 5V.  I have done that unfortunately and the usual outcome is that the GPIO pin is blown but otherwise the microcontroller keeps working. 
  • Voltage - The G2 LaunchPad delivers about 3.6 V so your measurement of 3.57 V is to be expected.  Some of the other LaunchPad are 3.3V 
  • Pins floating -  The pins default as inputs and unless you pull them up or down they will float and waste energy.  Since you are using a button cell on the MSP430 you don't want to waste energy.  So what I normally do now is set the pins not being used to input and pull them up with P1DIR and P1REN.  Don't activate P1REN when pins are set to output.  I have read somewhat conflicting things on whether it is better to pull up or down. 

I would be interested as well if others have good observations about any of this.

Share this post


Link to post
Share on other sites

Different VCCs should not be a problem as long as within absolute maximum ratings, from specs: "Voltage applied to any pin: -0.3V to VCC + 0.3V". I pull up unused pins, and do not forget P3 for parts where the pins are not brought out to the real world,  eg. 20 pin versions of 2553.

Share this post


Link to post
Share on other sites

On the chip program / debugging end, there are 20 pin DIP IC chip clips that can clip onto a chip and bring out male pins suitable for DuPont jumpers.

 

Provided voltages and grounds do not provide any issues, this might be a solution. Put the 2553 chip in your board, clip on and run jumpers to a G2 LP which doesn't have the chip installed.

Share this post


Link to post
Share on other sites

@@yyrkoon - There are plenty of people who know more about these things than I do on 43oh, but here goes.  I am pretty sure they will correct me if needed....

 

  • Common Ground - By this I mean that GND on the LaunchPad and ground on your external board should be connected with a jumper.
  • Assuming it is a good wallwart that only provides 5V then USB would handle it if it somehow got back. If there is a risk of higher voltages I would not be so comfortable without isolation.
  • There is risk of accidentally putting 5V to a GPIO on the microcontroller if the external board is at 5V.  I have done that unfortunately and the usual outcome is that the GPIO pin is blown but otherwise the microcontroller keeps working. 
  • Voltage - The G2 LaunchPad delivers about 3.6 V so your measurement of 3.57 V is to be expected.  Some of the other LaunchPad are 3.3V 
  • Pins floating -  The pins default as inputs and unless you pull them up or down they will float and waste energy.  Since you are using a button cell on the MSP430 you don't want to waste energy.  So what I normally do now is set the pins not being used to input and pull them up with P1DIR and P1REN.  Don't activate P1REN when pins are set to output.  I have read somewhat conflicting things on whether it is better to pull up or down. 

I would be interested as well if others have good observations about any of this.

5v isn't a problem. The MSP430 is provided power by a Lithium ion battery ( 3.7v ) regulated to 3.3v. 5v only hits the vcc of a beaglebone green, and the IO pins of the green are all 3.3v. Also, many IO's are buffered for the purpose of keeping the pins isolated - especially while the Beaglebone is powered down, or in reset.

Share this post


Link to post
Share on other sites

On the chip program / debugging end, there are 20 pin DIP IC chip clips that can clip onto a chip and bring out male pins suitable for DuPont jumpers.

 

Provided voltages and grounds do not provide any issues, this might be a solution. Put the 2553 chip in your board, clip on and run jumpers to a G2 LP which doesn't have the chip installed.

This presents a problem. As currently the msp430 seems to be not running. I've run a simple program to toggle a few GPIO's from high, to low every 5 seconds. This works perfectly in the launchpad, but on the board the pins don't budge. I was rather hoping to run a couple female to male jumper wires off the launchpad while the msp430 is running the code, to see if the pins will actually toggle  . . .

 

EDIT:

 

Additionally, I setup, and toggle a third pin ( P1.6 ) that is not connected on the board. To rule out bad circuit states on the pins . . . and it also does not budge. Of the 3 pins two are low-ish ( not zero but in the range of .01v to .06v ) but one of the pins is ~2.39v. For this, I think because I do not have the pins pulled low. I have verified 3.32v between vcc and gnd.

 

Anyway, P1.6 on the launchpad is obviously toggling. As the Green LED lights up every 5 seconds, and then goes out for 5 seconds . . . repeat rinse, etc.

Share this post


Link to post
Share on other sites

If you back up to the "tools" TI provides, their evaluation kits, they provide a board that supports the chip, and the FET tool is separate.

 

Anyhow, the reverse of what I said is likely true, too. Put the 2553 in the LP and run jumpers over to your board. Biggest difference is that with the clip as I mentioned, they'd be female>female jumpers, but to work your board you'd need female to connect to the BP pins on the LP and male to drop into the socket on your board.

Share this post


Link to post
Share on other sites

I think there's a really simple solution to this, so the chances are I've misunderstood what your asking!

 

You can physically cut and separate the FET part of a G2 Launchpad from the target device. All you need to do it cut carefully along that dotted line. Leave the target half in your project. Connect them back up for programming and debugging. Test this out by just removing the jumpers before you cut. If you don't feel destructive, just use 2 Launchpads.

Share this post


Link to post
Share on other sites

I think there's a really simple solution to this, so the chances are I've misunderstood what your asking!

 

You can physically cut and separate the FET part of a G2 Launchpad from the target device. All you need to do it cut carefully along that dotted line. Leave the target half in your project. Connect them back up for programming and debugging. Test this out by just removing the jumpers before you cut. If you don't feel destructive, just use 2 Launchpads.

Yeah fred, there is no launchpad in this project. Just a 20pin dip socket. So unless I misunderstood what you mean, cutting the launchpad apart will not help anything.

 

I'm just using the launchpad to program the IC's that get put onto the board for our project. I'd also like to use it as a troubleshooting tool, if it'll work the way I intend without damaging anything.

Share this post


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.

Sign in to follow this  

×
×
  • Create New...