MSP430 TRF796X parallel communication

Status
Not open for further replies.

scorrpeio

Full Member level 5
Joined
Dec 26, 2006
Messages
286
Helped
10
Reputation
20
Reaction score
9
Trophy points
1,298
Activity points
3,496
Hello,

I have to communicate the MSP430 with TRF7960 on parallel port.
The hardware connection is

MSP430 TRF7960
Port 4 I/O port
P2.1 IRQ
P1.0 EN
P3.3 DATA_CLK


I could write this much code..............

1. Enabling TRF7960 chip using MCU
2. Setting IRQ as High edge triggered
3. Setting P4 as O/P port

Now
Kindly let me know.........
how to select/enable DATA_CLK.
How to send the COMMAND to SPECIFIC ADDRESS of the TRF7960
 

Hello!

For your info, TI provides some documentation (see link below), on the first
page or which I read: Source code available for MSP430.
Therefore, there are high chances that what you want to do is already developed
somewhere.

https://focus.ti.com/lit/ds/symlink/trf7960.pdf

Beside this, as a long time MSP430 user, I can tell you that basically almost
EVERYTHING you want to program is ALREADY DEVELOPED and provided as a
source code that you have to fine tune for your specific needs.

Now for your specific request:

1. Enabling TRF7960 chip using MCU

I suppose the enable signal is active low.

#define TRF_ENABLE 0x01 // P1.0
First, set P1.0 to output mode:

P1DIR |= TRF_ENABLE;
Then, you may want to define a function for enable / disable:

void TRF_Enable(uint8 e) {
if(e) P1OUT &= ~TRF_ENABLE;
else P1OUT |= TRF_ENABLE;
}



2. Setting IRQ as High edge triggered

What do you mean by high edge? When the signal starts from high
or when the signal goes to high?
I will suppose you mean falling edge (i.e. the signal starts from high).
Setting P2.1 to falling edge:

P2IES |= 0x02;

Activating interrupt of P2.1:

P2IE |= 0x02;

Waiting for interrupt:

_EINT();

Then in the interrupt function:

#pragma vector=PORT1_VECTOR
__interrupt void SwitchesInput(void) {
DoInterruptProcessing();
P2IFG &= ~0x02; // Re-arm the interrupt
}

3. Setting P4 as O/P port

What do you mean by O/P?


Dora.
 

tnx buddy for help!!!

But, you told me the code which already I could write by myself.

Anyways tnx for the link........it helped me a lot
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…