EmbeddedRelated.com
Forums

msp430F149: 8MHz ckock on p5.5

Started by bennogassmann January 10, 2005

Hi,
On Port 5.5 (pin 49) a want to have a rectangular 8MHz-signal. There 
is allready a "sine" 8MHz clock.
I tested the following code:
.......
SetupP	bis.b	#0FFh,&P4DIR	; P4 0-7 sind output
        bic.b   #080h,&BCSCTL1           ; XT2 ON
        mov.b   #088h,&BCSCTL2         ; MCLK=SMCLK=XT2CLK
        bic.b   #OFIFG,&IFG1             ; Clear OFIFG
        bis.b   #030h,&P5DIR            ; P5.4/5.5 output
        bis.b   #030h,&P5SEL            ; P5.4/5.5 Zweitfunktion ein
       
	bis.b	#006h,&P5DIR	        ; P5 1+2 sind output
	bis.b	#002h,&P5OUT	; WR = 1 / inaktiv 
........
who nows a answer?

kindly  B. Gassman







Beginning Microcontrollers with the MSP430

What processor are you using  ????!!!!!

>From: "bennogassmann"
<gassmann.b@gass...>
>Reply-To: msp430@msp4...
>To: msp430@msp4...
>Subject: [msp430] msp430F149: 8MHz ckock on p5.5
>Date: Mon, 10 Jan 2005 19:02:34 -0000
>
>
>
>
>Hi,
>On Port 5.5 (pin 49) a want to have a rectangular 8MHz-signal. There
>is allready a "sine" 8MHz clock.
>I tested the following code:
>.......
>SetupP	bis.b	#0FFh,&P4DIR	; P4 0-7 sind output
>         bic.b   #080h,&BCSCTL1           ; XT2 ON
>         mov.b   #088h,&BCSCTL2         ; MCLK=SMCLK=XT2CLK
>         bic.b   #OFIFG,&IFG1             ; Clear OFIFG
>         bis.b   #030h,&P5DIR            ; P5.4/5.5 output
>         bis.b   #030h,&P5SEL            ; P5.4/5.5 Zweitfunktion ein
>
>	bis.b	#006h,&P5DIR	        ; P5 1+2 sind output
>	bis.b	#002h,&P5OUT	; WR = 1 / inaktiv
>........
>who nows a answer?
>
>kindly  B. Gassman
>
>
>
>
>
>
>
>
>.
>
>
>Yahoo! Groups Links
>
>
>
>
>
>
>

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


Probably its a problem of a low scope bandwidth

--- In msp430@msp4..., "bennogassmann" <gassmann.b@b...> 
wrote:
> 
> 
> Hi,
> On Port 5.5 (pin 49) a want to have a rectangular 8MHz-signal. 
There 
> is allready a "sine" 8MHz clock.
> I tested the following code:
> .......
> SetupP	bis.b	#0FFh,&P4DIR	; P4 0-7 sind output
>         bic.b   #080h,&BCSCTL1           ; XT2 ON
>         mov.b   #088h,&BCSCTL2         ; MCLK=SMCLK=XT2CLK
>         bic.b   #OFIFG,&IFG1             ; Clear OFIFG
>         bis.b   #030h,&P5DIR            ; P5.4/5.5 output
>         bis.b   #030h,&P5SEL            ; P5.4/5.5 Zweitfunktion ein
>        
> 	bis.b	#006h,&P5DIR	        ; P5 1+2 sind output
> 	bis.b	#002h,&P5OUT	; WR = 1 / inaktiv 
> ........
> who nows a answer?
> 
> kindly  B. Gassman




Have you followed the procedure to change MCLK source from the DCO to a 
crystal? Maybe this is what is missing. Take a look on page 4-12 of the 
user's guide.

Regards,
Adriano.

shura1974 wrote:
> 
> Probably its a problem of a low scope bandwidth
> 
> --- In msp430@msp4..., "bennogassmann" <gassmann.b@b...> 
> wrote:
> 
>>
>>Hi,
>>On Port 5.5 (pin 49) a want to have a rectangular 8MHz-signal. 
> 
> There 
> 
>>is allready a "sine" 8MHz clock.
>>I tested the following code:
>>.......
>>SetupP	bis.b	#0FFh,&P4DIR	; P4 0-7 sind output
>>        bic.b   #080h,&BCSCTL1           ; XT2 ON
>>        mov.b   #088h,&BCSCTL2         ; MCLK=SMCLK=XT2CLK
>>        bic.b   #OFIFG,&IFG1             ; Clear OFIFG
>>        bis.b   #030h,&P5DIR            ; P5.4/5.5 output
>>        bis.b   #030h,&P5SEL            ; P5.4/5.5 Zweitfunktion ein
>>       
>>	bis.b	#006h,&P5DIR	        ; P5 1+2 sind output
>>	bis.b	#002h,&P5OUT	; WR = 1 / inaktiv 
>>........
>>who nows a answer?
>>
>>kindly  B. Gassman
> 
> 
> 
> 
> 
> 
> .
> 
>  
> Yahoo! Groups Links
> 
> 
> 
>  
> 
> 
> 

Hello Benno,

The MSP430 cannot really spit out a sine wave on a port pin. Take a
scope that has at least 100MHz bandwidth and make sure the probe is
adjusted right and matches the scope. Use a short ground lead, no more
than five centimeters or so. You should see a square with, of course,
finite ramp times. If not, maybe you have loaded up this port pin a
bit on the heavy side.

If you want to have faster rise times you'd have to use a 3.3V
compliant fast Schmitt trigger afterwards. TI would also be a good
source for those.

I like that word "Zweitfunktion" in your code. Sounds like
"Zeitgeist".

Regards,

Joerg.