Jump to content
Sign in to follow this  
yyrkoon

MSP430G2 emulator.

Recommended Posts

 

 

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.

In which case, I'm with the guys who say to add a SBW header. Don't forget the pull up resistor and capacitor. That's the only other thing that the Launchpad part adds to the DIP chip.

 

You will be able to disconnect the jumpers on an unmolested Launchpad and use that for programming and debugging. No need for cutting.

Share this post


Link to post
Share on other sites

Why don't you just expose the SBW pins and gnd on your board? I don't see the problem? Or you could just solder 3 wires directly to the chip and connect those to the launchpad SBW?

I do have a ZIF socket on the board that had to be soldered into a 20pin machined dip socket. So the pins between the ZIF, and machined dip socket are somewhat exposed. This was done because the machined dip sockets have round pin holes which will take a MSP430 fine, but not the ZIF socket. So . . . hmmm.

 

But actually I'd also like some feedback from the MCU while testing on the board. but adding spi-by-wire header to the board is  . . well at least undesirable for production boards.

Share this post


Link to post
Share on other sites

For what it's worth. There are only 4 GPIO's being used from the MSP430G2. Or potentially 3GPIO's and one ADC, but the ADC pin could in fact be setup as a GPIO that goes low when the voltage drops below an acceptable lower limit.

Share this post


Link to post
Share on other sites

It sounds like your board doesn't work. Debugging it in the launchpad is a waste of time. Just take the chip and solder 3 wire directly to the chip. GND, TST and RESET. Connect those wires to the launch pad SBW headers.  Plug the chip into board and just debug it. 

Share this post


Link to post
Share on other sites

It sounds like your board doesn't work. Debugging it in the launchpad is a waste of time. Just take the chip and solder 3 wire directly to the chip. GND, TST and RESET. Connect those wires to the launch pad SBW headers.  Plug the chip into board and just debug it. 

The board works fine, but for some reason the MSP430 does not. Wulf designed this board, and he's designed working MSP430 boards before ( the reflow oven controller for starters ). I've pulled teh ZIF socket off to make sure that was not the problem, and it wasn't. So, knowing what I do, I am forced to think that  there is a bad solder joint, or a short to ground somehow. Perhaps even a bad buffer( although that should not keep the MSP430 from coming up correctly ).

 

Anyway wulf is out of town, otherwise he'd be troubleshooting the board right now. I've done a good bit of troubleshooting on it so far, but I'm afraid I'm in over my head. . .

 

Question though. What are the minimum requirement to bring up an MSP430G2 ? vcc and ground ?

Share this post


Link to post
Share on other sites

@@Rickta59 True. Although above he did say it's not working on the board. I must admit I'm still a little confused as to what @@yyrkoon is asking. A photo will definitely help.

Ok, the the board, only has a 20pin DIP. No spy-by-wire header, nothing else. What I was asking is if there is a way that I could hook up the launchpad with MSP430 still in it to the board similar to how old processor emulators worked. LIke the old 8088 emulaltors.

 

But my purpose is simple. The board has no way for me to know how, or if the MSP430 is working as intended or not. So I want to get at the serial pins, to have serial out( at least tx from the board ), and having a way to program the MSP430 while it's on the external board would be cool too. *WITHOUT* adding a header to the board.

 

As to why I want to program on the external board. I like to write code in small parts, and test along the way. So I test often, to ensure my code works properly, and as intended. It's hard to pull an MSP430 off a launchpad, and then put it onto a board that must be powered down every time. So. . . I've been leaving the launchpad powered, and just unlocking the ZIF socket ( yes this launchpad has been modified to have a ZIF socket on it ) then pulling the chip out. This works fine . . . and the external board, always has power unless I shut it down, and disconnect a battery. It's a huge undertaking just to test code, but I refuse to not test my code . . .

Share this post


Link to post
Share on other sites

So these emulators I speak of for those who do not know. Were meant for testing ( debugging ) systems with the given processor on them. Basically it was a huge box, with a ribbon cable adapter that plugged into the box, and at the end of the ribbon cable was connector meant to plug directly into where the specific processor would normally go. So in essence a huge resemblance of the processor it was meant to emulate, except this contraption could read out individual registers, etc, which then could be displayed to the user. Again, used for troubleshooting problem . . .

Share this post


Link to post
Share on other sites

Things I would do:

  • Check voltage on VCC and RESET.
  • Bodge on some sort of SBW header. Try to find a place where RESET and TEST are available. Maybe solder some temporary wires on the bottom of the IC socket's pins.
  • Check the obvious again - continuity to GND, VCC, etc. When you eventually find it, it will probably seem stupid and obvious!

 

Question though. What are the minimum requirement to bring up an MSP430G2 ? vcc and ground ?

I believe it's just VCC, ground, RESET pulled high.

Share this post


Link to post
Share on other sites

Things I would do:

  • Check voltage on VCC and RESET.
  • Bodge on some sort of SBW header. Try to find a place where RESET and TEST are available. Maybe solder some temporary wires on the bottom of the IC socket's pins.
  • Check the obvious again - continuity to GND, VCC, etc. When you eventually find it, it will probably seem stupid and obvious!

 

I believe it's just VCC, ground, RESET pulled high.

AH ! I was afraid of that. The PDF printout of the msp430 circuit here has nothing connected to reset . . . So, I get to chastise wulf when he gets back because he's been insisting its my code but . . . the code right now is very minimal, and only meant to toggle the GPIOs( P1.6 isnt needed by us, just used to test an unused / unconnected pin ). BUT the processor does not seem to be coming up, and if reset high is a requirement, then that probably explains why.

 

EDIT:

 

By the way ~5 second toggle on the pins so I can test with a multi meter . . .

#include <msp430.h>

volatile unsigned int count = 1;

int main(void)
{
        unsigned int seconds = 1;
        WDTCTL = WDTPW + WDTHOLD;                       // Stop watchdog timer

        /* SMCLK */
        DCOCTL = 0;
        DCOCTL = CALDCO_1MHZ;
        BCSCTL1 = CALBC1_1MHZ;
        BCSCTL2 = DIVS_0;
        
        /* Timer1 A0*/
        TA1CCR0 = 1250;                         // Count overflow frequency
        TA1CTL = TASSEL_2 + ID_3 + MC_1;        // SMCLK/8  upmode
                                                // ( 1000000 / 8 ) / 1250 == 10ms tick
        TA1CCTL0 = CCIE;

        P1DIR |= BIT6;
        P1OUT |= BIT6;
        P2DIR |= BIT1 + BIT3;
        P2OUT |= BIT1 + BIT3;

        __enable_interrupt();

        while(1){
        
                if (count > 100){               // ~1 Second
                        count = 1;
                        seconds++;

                }
                if(seconds > 5){
                        seconds = 1;
                        P1OUT ^= BIT6;
                        P2OUT ^= BIT1;
                        P2OUT ^= BIT3;
                }
        }
        return 0;
}

__attribute__( (interrupt (TIMER1_A0_VECTOR)) )
void TIMER1_A0_ISR(void)
{
        count++;
}

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×