This discussion has just made me look at some code I have just written, but don't have the hardware yet. (so not checked). However, since I am using the repeat mode, will not be an issue
A large part of the "confusion" regarding the ENC bit is that the initial (simplified) circuit diagram does not show that ENC has such a complex behaviour. The state machine bubble diagrams imply that ENC is some form of clocked latch that is reset by end of conversion for the single sample modes, and this is simply not shown in the hardware of fig 17.1 of slau049d.pdf Rev D. (The bubble diagrams show that these states are actually sensitive to the rising edge of the ENC signal.) (IE: "Wait for ENC" is looking for a rising edge, not a level!) The MSC bit is also poorly described in the text, and it is not clear from the description as to whether the sample timer is used for each channel, or just the first in a sequence of channels. (and then the sample timer is skipped for other programmed channels??? )(maybe .. maybe not) Cheers Harry -----Original Message----- From: mspgcc-users-ad...@lists.sourceforge.net [mailto:mspgcc-users-ad...@lists.sourceforge.net]on Behalf Of Capoccia, Brian Sent: Thursday, April 15, 2004 4:48 AM To: 'mspgcc-users@lists.sourceforge.net' Subject: RE: [Mspgcc-users] About msp430x149 Dear Zhengsu, First don't forget to enable the appropriate interrupt in ADC12IE. Be sure to 'toggle' ENC bit of ADC12CTL0 within your ADC12 ISR to allow the subsequent Timer A signals to trigger the next ADC12 conversion. See MSP430x1xx User Manual chapter (slau049d.pdf Rev D) section 17.2.6 ADC12 Conversion Modes paragraph Single-Channel Single-Conversion Mode "When any other trigger source is used, ENC must be toggled between each conversion." The same is also true for Sequence-of-Channels Mode. Regards, Brian Capoccia Fluke Corporation -----Original Message----- From: mspgcc-users-ad...@lists.sourceforge.net [mailto:mspgcc-users-ad...@lists.sourceforge.net]on Behalf Of Gao Zhengsu Sent: Wednesday, April 14, 2004 10:44 AM To: mspgcc-users@lists.sourceforge.net Subject: Re: [Mspgcc-users] About msp430x149 Hi,Mark Thank you for your good way!! I read manual said that we can use TamerA OUTPUT UNIT1 to trigger ADC12 conversion like this TACTL = TASSEL_2+MC_2; // Timer_A setup TACCTL1 = OUTMOD_3; // CCR1 setup TACCR1 = 0x0fff; // Compare value ADC12CTL0 = ADC12ON+SHT0_2; // Turn on ADC12, set sampling time ADC12CTL1 = SHS_1+SHP; // TAOUT.1 triggers sampling timer ADC12CTL0 |= ENC; // Enable conversions ADC12CTL0 |= ADC12SC; // Start conversion but this doen's work to my code , it never stop by ADC interrupt routine. What's the reason? Thank you! Regards Zhengsu ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ Mspgcc-users mailing list Mspgcc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mspgcc-users ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ Mspgcc-users mailing list Mspgcc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mspgcc-users