Sign in

username:

password:



Not a member?

Search msp430



Search tips

Subscribe to msp430



Ads

Discussion Groups

Discussion Groups | MSP430 | [IrDA] Problem when receiving several characters (bits shifted)

The purpose of this group is to foster exchange of information on the Texas Instruments MSP430 family of microcontrollers and related tools. Everyone welcome, all levels of familiarity/expertise.

[IrDA] Problem when receiving several characters (bits shifted) - fwolff - Sep 30 3:22:34 2008

Hi,

I'm using a MSP430F2274 with an IrDA transceiver (Vishay TFBS4710).
The transmission of characters works pretty good but I've got problem
with the reception. I'm sending the same frame from a PDA (Palm) but I
don't receive it correctly every time. In fact, it seems that
sometimes, some bits of some characters are shifted.
I've configured the USCIA0 as follows :
- UCA0CTL1 =3D UCSSEL1 (SMCLK @ 8MHz)
- UCA0CTL0 =3D 0x00
- UCA0BR0 =3D 52
- UCA0MCTL =3D UCBRF0 + UCOS16
- UCA0STAT =3D 0x00
- UCA0IRTCTL =3D (UCIRTXPL4 + UCIRTXPL3 + UCIRTXPL0) + UCIREN
(UCIRTXPLx=3D25 to get a pulse length of about 1.63=B5s)
- UCA0IRRCTL =3D 0x00
- UCA0ABCTL =3D 0x00

I was wondering that maybe it's the DCO jitter that causes those bits
shifting. Here is the clock configuration :
- DCOCTL =3D DCO2 + DCO1
- BCSCTL1 =3D XT2OFF + DIVA_0 + RSEL2 + RSEL1 + RSEL0
- BCSCTL2 =3D DCOR (Rosc=3D100k)

Does anyone has an idea or suggestion ? Because I really don't know
what to do to get over this problem.
Thanks in advance for your help.

Regards,

Frank.
------------------------------------



(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )


Re: [IrDA] Problem when receiving several characters (bits shifted) - Onestone - Sep 30 3:28:01 2008

Why not use the stable factory calibrated values for the DCO? these are
good to within 1%. You get 1, 8, 12 or 16MHz. For most standard UART
data rates 12Mhz wroks best IIRC.

INIT_SYSTEM:
;CLOCK INITIALISATION
MOV.B &CALBC1_12MHZ,&BCSCTL1
MOV.B &CALDCO_12MHZ,&DCOCTL
Cheers

Al

fwolff wrote:

>Hi,
>
>I'm using a MSP430F2274 with an IrDA transceiver (Vishay TFBS4710).
>The transmission of characters works pretty good but I've got problem
>with the reception. I'm sending the same frame from a PDA (Palm) but I
>don't receive it correctly every time. In fact, it seems that
>sometimes, some bits of some characters are shifted.
>I've configured the USCIA0 as follows :
> - UCA0CTL1 = UCSSEL1 (SMCLK @ 8MHz)
> - UCA0CTL0 = 0x00
> - UCA0BR0 = 52
> - UCA0MCTL = UCBRF0 + UCOS16
> - UCA0STAT = 0x00
> - UCA0IRTCTL = (UCIRTXPL4 + UCIRTXPL3 + UCIRTXPL0) + UCIREN
>(UCIRTXPLx=25 to get a pulse length of about 1.63µs)
> - UCA0IRRCTL = 0x00
> - UCA0ABCTL = 0x00
>
>I was wondering that maybe it's the DCO jitter that causes those bits
>shifting. Here is the clock configuration :
> - DCOCTL = DCO2 + DCO1
> - BCSCTL1 = XT2OFF + DIVA_0 + RSEL2 + RSEL1 + RSEL0
> - BCSCTL2 = DCOR (Rosc=100k)
>
>Does anyone has an idea or suggestion ? Because I really don't know
>what to do to get over this problem.
>Thanks in advance for your help.
>
>Regards,
>
>Frank.
>------------------------------------



(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )

Re: [IrDA] Problem when receiving several characters (bits shifted) - fwolff - Sep 30 3:51:53 2008

I haven't use the calib value for DCO @ 8MHz because I don't see any
difference between using those values and using my values and Rosc
(the frequency varies from 7.8MHz to 8.1MHz). I'm going to try with
the DCO @ 12MHz to see if it's better.

--- In m...@yahoogroups.com, Onestone wrote:
>
> Why not use the stable factory calibrated values for the DCO? these are=20
> good to within 1%. You get 1, 8, 12 or 16MHz. For most standard UART=20
> data rates 12Mhz wroks best IIRC.
>=20
> INIT_SYSTEM:
> ;CLOCK INITIALISATION
> MOV.B &CALBC1_12MHZ,&BCSCTL1
> MOV.B &CALDCO_12MHZ,&DCOCTL
>=20
>=20
> Cheers
>=20
> Al
>=20
> fwolff wrote:
>=20
> >Hi,
> >
> >I'm using a MSP430F2274 with an IrDA transceiver (Vishay TFBS4710).
> >The transmission of characters works pretty good but I've got problem
> >with the reception. I'm sending the same frame from a PDA (Palm) but I
> >don't receive it correctly every time. In fact, it seems that
> >sometimes, some bits of some characters are shifted.
> >I've configured the USCIA0 as follows :
> > - UCA0CTL1 =3D UCSSEL1 (SMCLK @ 8MHz)
> > - UCA0CTL0 =3D 0x00
> > - UCA0BR0 =3D 52
> > - UCA0MCTL =3D UCBRF0 + UCOS16
> > - UCA0STAT =3D 0x00
> > - UCA0IRTCTL =3D (UCIRTXPL4 + UCIRTXPL3 + UCIRTXPL0) + UCIREN
> >(UCIRTXPLx=3D25 to get a pulse length of about 1.63=B5s)
> > - UCA0IRRCTL =3D 0x00
> > - UCA0ABCTL =3D 0x00
> >
> >I was wondering that maybe it's the DCO jitter that causes those bits
> >shifting. Here is the clock configuration :
> > - DCOCTL =3D DCO2 + DCO1
> > - BCSCTL1 =3D XT2OFF + DIVA_0 + RSEL2 + RSEL1 + RSEL0
> > - BCSCTL2 =3D DCOR (Rosc=3D100k)
> >
> >Does anyone has an idea or suggestion ? Because I really don't know
> >what to do to get over this problem.
> >Thanks in advance for your help.
> >
> >Regards,
> >
> >Frank.
> >
> >
> >------------------------------------
> >
> >
> >
> >



(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )

Re: Re: [IrDA] Problem when receiving several characters (bits shifted) - Andreas =?ISO-8859-1?Q?K=F6pke?= - Sep 30 3:57:39 2008

Do you transmit packets that consist of more than one byte?
If so, are all bytes in this packet shifted, or is only the one or other
byte in a packet shifted?

Am Dienstag, den 30.09.2008, 07:51 +0000 schrieb fwolff:
> I haven't use the calib value for DCO @ 8MHz because I don't see any
> difference between using those values and using my values and Rosc
> (the frequency varies from 7.8MHz to 8.1MHz). I'm going to try with
> the DCO @ 12MHz to see if it's better.
>
> --- In m...@yahoogroups.com, Onestone wrote:
> >
> > Why not use the stable factory calibrated values for the DCO? these
> are
> > good to within 1%. You get 1, 8, 12 or 16MHz. For most standard
> UART
> > data rates 12Mhz wroks best IIRC.
> >
> > INIT_SYSTEM:
> > ;CLOCK INITIALISATION
> > MOV.B &CALBC1_12MHZ,&BCSCTL1
> > MOV.B &CALDCO_12MHZ,&DCOCTL
> >
> >
> > Cheers
> >
> > Al
> >
> > fwolff wrote:
> >
> > >Hi,
> > >
> > >I'm using a MSP430F2274 with an IrDA transceiver (Vishay TFBS4710).
> > >The transmission of characters works pretty good but I've got
> problem
> > >with the reception. I'm sending the same frame from a PDA (Palm)
> but I
> > >don't receive it correctly every time. In fact, it seems that
> > >sometimes, some bits of some characters are shifted.
> > >I've configured the USCIA0 as follows :
> > > - UCA0CTL1 = UCSSEL1 (SMCLK @ 8MHz)
> > > - UCA0CTL0 = 0x00
> > > - UCA0BR0 = 52
> > > - UCA0MCTL = UCBRF0 + UCOS16
> > > - UCA0STAT = 0x00
> > > - UCA0IRTCTL = (UCIRTXPL4 + UCIRTXPL3 + UCIRTXPL0) + UCIREN
> > >(UCIRTXPLx=25 to get a pulse length of about 1.63µs)
> > > - UCA0IRRCTL = 0x00
> > > - UCA0ABCTL = 0x00
> > >
> > >I was wondering that maybe it's the DCO jitter that causes those
> bits
> > >shifting. Here is the clock configuration :
> > > - DCOCTL = DCO2 + DCO1
> > > - BCSCTL1 = XT2OFF + DIVA_0 + RSEL2 + RSEL1 + RSEL0
> > > - BCSCTL2 = DCOR (Rosc=100k)
> > >
> > >Does anyone has an idea or suggestion ? Because I really don't know
> > >what to do to get over this problem.
> > >Thanks in advance for your help.
> > >
> > >Regards,
> > >
> > >Frank.
> > >
> > >
> > >------------------------------------
> > >
> > >
> > >
> > >



(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )

Re: [IrDA] Problem when receiving several characters (bits shifted) - fwolff - Sep 30 4:06:35 2008

Yes it's packets that are composed of several bytes, for example :
B4049C6A000125E3 (8 bytes). When it happens there's only a few bytes
that are not good.

--- In m...@yahoogroups.com, Andreas K=F6pke wrote:
>
> Do you transmit packets that consist of more than one byte?=20
> If so, are all bytes in this packet shifted, or is only the one or other
> byte in a packet shifted?
>=20
>=20
>=20
> Am Dienstag, den 30.09.2008, 07:51 +0000 schrieb fwolff:
> > I haven't use the calib value for DCO @ 8MHz because I don't see any
> > difference between using those values and using my values and Rosc
> > (the frequency varies from 7.8MHz to 8.1MHz). I'm going to try with
> > the DCO @ 12MHz to see if it's better.
> >=20
> > --- In m...@yahoogroups.com, Onestone wrote:
> > >
> > > Why not use the stable factory calibrated values for the DCO? these
> > are=20
> > > good to within 1%. You get 1, 8, 12 or 16MHz. For most standard
> > UART=20
> > > data rates 12Mhz wroks best IIRC.
> > >=20
> > > INIT_SYSTEM:
> > > ;CLOCK INITIALISATION
> > > MOV.B &CALBC1_12MHZ,&BCSCTL1
> > > MOV.B &CALDCO_12MHZ,&DCOCTL
> > >=20
> > >=20
> > > Cheers
> > >=20
> > > Al
> > >=20
> > > fwolff wrote:
> > >=20
> > > >Hi,
> > > >
> > > >I'm using a MSP430F2274 with an IrDA transceiver (Vishay TFBS4710).
> > > >The transmission of characters works pretty good but I've got
> > problem
> > > >with the reception. I'm sending the same frame from a PDA (Palm)
> > but I
> > > >don't receive it correctly every time. In fact, it seems that
> > > >sometimes, some bits of some characters are shifted.
> > > >I've configured the USCIA0 as follows :
> > > > - UCA0CTL1 =3D UCSSEL1 (SMCLK @ 8MHz)
> > > > - UCA0CTL0 =3D 0x00
> > > > - UCA0BR0 =3D 52
> > > > - UCA0MCTL =3D UCBRF0 + UCOS16
> > > > - UCA0STAT =3D 0x00
> > > > - UCA0IRTCTL =3D (UCIRTXPL4 + UCIRTXPL3 + UCIRTXPL0) + UCIREN
> > > >(UCIRTXPLx=3D25 to get a pulse length of about 1.63=C2=B5s)
> > > > - UCA0IRRCTL =3D 0x00
> > > > - UCA0ABCTL =3D 0x00
> > > >
> > > >I was wondering that maybe it's the DCO jitter that causes those
> > bits
> > > >shifting. Here is the clock configuration :
> > > > - DCOCTL =3D DCO2 + DCO1
> > > > - BCSCTL1 =3D XT2OFF + DIVA_0 + RSEL2 + RSEL1 + RSEL0
> > > > - BCSCTL2 =3D DCOR (Rosc=3D100k)
> > > >
> > > >Does anyone has an idea or suggestion ? Because I really don't know
> > > >what to do to get over this problem.
> > > >Thanks in advance for your help.
> > > >
> > > >Regards,
> > > >
> > > >Frank.
> > > >
> > > >
> > > >------------------------------------
> > > >
> > > >
> > > >
> > > >



(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )

Re: Re: [IrDA] Problem when receiving several characters (bits shifted) - Andreas =?ISO-8859-1?Q?K=F6pke?= - Sep 30 11:18:00 2008

Is the LSB of the shifted bytes 0? (like the start bit?)
My theory would be that the start bit is not recognized correctly. What
about the wave form? Is the stuff transferred to the MSP correct? If
yes, check the synchronization in more detail, if not check the HW.
Best, Andreas
Am Dienstag, den 30.09.2008, 08:06 +0000 schrieb fwolff:
> Yes it's packets that are composed of several bytes, for example :
> B4049C6A000125E3 (8 bytes). When it happens there's only a few bytes
> that are not good.
>
> --- In m...@yahoogroups.com, Andreas Köpke wrote:
> >
> > Do you transmit packets that consist of more than one byte?
> > If so, are all bytes in this packet shifted, or is only the one or
> other
> > byte in a packet shifted?
> >
> >
> >
> > Am Dienstag, den 30.09.2008, 07:51 +0000 schrieb fwolff:
> > > I haven't use the calib value for DCO @ 8MHz because I don't see
> any
> > > difference between using those values and using my values and Rosc
> > > (the frequency varies from 7.8MHz to 8.1MHz). I'm going to try
> with
> > > the DCO @ 12MHz to see if it's better.
> > >
> > > --- In m...@yahoogroups.com, Onestone wrote:
> > > >
> > > > Why not use the stable factory calibrated values for the DCO?
> these
> > > are
> > > > good to within 1%. You get 1, 8, 12 or 16MHz. For most standard
> > > UART
> > > > data rates 12Mhz wroks best IIRC.
> > > >
> > > > INIT_SYSTEM:
> > > > ;CLOCK INITIALISATION
> > > > MOV.B &CALBC1_12MHZ,&BCSCTL1
> > > > MOV.B &CALDCO_12MHZ,&DCOCTL
> > > >
> > > >
> > > > Cheers
> > > >
> > > > Al
> > > >
> > > > fwolff wrote:
> > > >
> > > > >Hi,
> > > > >
> > > > >I'm using a MSP430F2274 with an IrDA transceiver (Vishay
> TFBS4710).
> > > > >The transmission of characters works pretty good but I've got
> > > problem
> > > > >with the reception. I'm sending the same frame from a PDA
> (Palm)
> > > but I
> > > > >don't receive it correctly every time. In fact, it seems that
> > > > >sometimes, some bits of some characters are shifted.
> > > > >I've configured the USCIA0 as follows :
> > > > > - UCA0CTL1 = UCSSEL1 (SMCLK @ 8MHz)
> > > > > - UCA0CTL0 = 0x00
> > > > > - UCA0BR0 = 52
> > > > > - UCA0MCTL = UCBRF0 + UCOS16
> > > > > - UCA0STAT = 0x00
> > > > > - UCA0IRTCTL = (UCIRTXPL4 + UCIRTXPL3 + UCIRTXPL0) + UCIREN
> > > > >(UCIRTXPLx=25 to get a pulse length of about 1.63µs)
> > > > > - UCA0IRRCTL = 0x00
> > > > > - UCA0ABCTL = 0x00
> > > > >
> > > > >I was wondering that maybe it's the DCO jitter that causes
> those
> > > bits
> > > > >shifting. Here is the clock configuration :
> > > > > - DCOCTL = DCO2 + DCO1
> > > > > - BCSCTL1 = XT2OFF + DIVA_0 + RSEL2 + RSEL1 + RSEL0
> > > > > - BCSCTL2 = DCOR (Rosc=100k)
> > > > >
> > > > >Does anyone has an idea or suggestion ? Because I really don't
> know
> > > > >what to do to get over this problem.
> > > > >Thanks in advance for your help.
> > > > >
> > > > >Regards,
> > > > >
> > > > >Frank.
> > > > >
> > > > >
> > > > >------------------------------------
> > > > >
> > > > >
> > > > >
> > > > >



(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )

Re: [IrDA] Problem when receiving several characters (bits shifted) - old_cow_yellow - Sep 30 13:05:30 2008

Is the incoming signal from the IR transceiver connected directly to
the F2274? You may need to set the UCIRRXPL bit in the IRRCTL
register. Check the data-sheet of the transceiver.

--- In m...@yahoogroups.com, "fwolff" wrote:
>
> Hi,
>=20
> I'm using a MSP430F2274 with an IrDA transceiver (Vishay TFBS4710).
> The transmission of characters works pretty good but I've got problem
> with the reception. I'm sending the same frame from a PDA (Palm) but I
> don't receive it correctly every time. In fact, it seems that
> sometimes, some bits of some characters are shifted.
> I've configured the USCIA0 as follows :
> - UCA0CTL1 =3D UCSSEL1 (SMCLK @ 8MHz)
> - UCA0CTL0 =3D 0x00
> - UCA0BR0 =3D 52
> - UCA0MCTL =3D UCBRF0 + UCOS16
> - UCA0STAT =3D 0x00
> - UCA0IRTCTL =3D (UCIRTXPL4 + UCIRTXPL3 + UCIRTXPL0) + UCIREN
> (UCIRTXPLx=3D25 to get a pulse length of about 1.63=B5s)
> - UCA0IRRCTL =3D 0x00
> - UCA0ABCTL =3D 0x00
>=20
> I was wondering that maybe it's the DCO jitter that causes those bits
> shifting. Here is the clock configuration :
> - DCOCTL =3D DCO2 + DCO1
> - BCSCTL1 =3D XT2OFF + DIVA_0 + RSEL2 + RSEL1 + RSEL0
> - BCSCTL2 =3D DCOR (Rosc=3D100k)
>=20
> Does anyone has an idea or suggestion ? Because I really don't know
> what to do to get over this problem.
> Thanks in advance for your help.
>=20
> Regards,
>=20
> Frank.
>

------------------------------------



(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )

Re: [IrDA] Problem when receiving several characters (bits shifted) - fwolff - Sep 30 15:05:47 2008

First I'd like to thank all of you for trying to help me, that's
really nice :)

Yes the RX pin from the transceiver is connected directly to the
UCA0RXD pin of the MSP430. I've tried to put the UCIRRXPL bit but it
doesn't seems to change the way the MSP430 handles the received bytes
(i.e. there's still sometimes some bytes that aren't correct).
I've tried what suggested onestone_apc, i.e. to set up the DCO @ 12MHz
and it seems that my problem occurs less frequently.
I've also tried to use the receive filter but in this case I receive
absolutely nothing (I've used several filter length values but it's
always the same result : nothing received).
And finally, to answer to Andreas K=F6pke : I will check again the
signal but from what I saw on my scope it seems correct. Maybe I can
try to capture the signal when the problem occurs...
--- In m...@yahoogroups.com, "old_cow_yellow"
wrote:
>
> Is the incoming signal from the IR transceiver connected directly to
> the F2274? You may need to set the UCIRRXPL bit in the IRRCTL
> register. Check the data-sheet of the transceiver.
>=20
> --- In m...@yahoogroups.com, "fwolff" wrote:
> >
> > Hi,
> >=20
> > I'm using a MSP430F2274 with an IrDA transceiver (Vishay TFBS4710).
> > The transmission of characters works pretty good but I've got problem
> > with the reception. I'm sending the same frame from a PDA (Palm) but I
> > don't receive it correctly every time. In fact, it seems that
> > sometimes, some bits of some characters are shifted.
> > I've configured the USCIA0 as follows :
> > - UCA0CTL1 =3D UCSSEL1 (SMCLK @ 8MHz)
> > - UCA0CTL0 =3D 0x00
> > - UCA0BR0 =3D 52
> > - UCA0MCTL =3D UCBRF0 + UCOS16
> > - UCA0STAT =3D 0x00
> > - UCA0IRTCTL =3D (UCIRTXPL4 + UCIRTXPL3 + UCIRTXPL0) + UCIREN
> > (UCIRTXPLx=3D25 to get a pulse length of about 1.63=B5s)
> > - UCA0IRRCTL =3D 0x00
> > - UCA0ABCTL =3D 0x00
> >=20
> > I was wondering that maybe it's the DCO jitter that causes those bits
> > shifting. Here is the clock configuration :
> > - DCOCTL =3D DCO2 + DCO1
> > - BCSCTL1 =3D XT2OFF + DIVA_0 + RSEL2 + RSEL1 + RSEL0
> > - BCSCTL2 =3D DCOR (Rosc=3D100k)
> >=20
> > Does anyone has an idea or suggestion ? Because I really don't know
> > what to do to get over this problem.
> > Thanks in advance for your help.
> >=20
> > Regards,
> >=20
> > Frank.
>
------------------------------------



(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )