On Mon, 2010-12-13 at 14:14 +0000, zied130187 wrote:
> thank you suresh, i know this site.
> my problem not to config UART ,
> because my prgram work if i connect U1TX to U1RX,
> is not the problem of UART,
> but the problem is to communicate with LM400.
Zied,
Think about it, if your setup for UART0 is the same
as for UART1 then they will communicate with each
other but not with the LM400 module or a PC.
I would try to get the communication going with the
PC running minicom, both directions. And when that
works at 19200bd. connect the LM400 module.
roelof
problem communication UART LPC2129 to LM400 bluetooth
Started by ●December 13, 2010
Reply by ●December 13, 20102010-12-13
Reply by ●December 13, 20102010-12-13
Reply by ●December 13, 20102010-12-13
no need to calcute all those things.to communicate LM400
u need to send AT commands to LM400.
first u connect LM400 to lpc2129 like what i said previously.
and then if ur data tx function like
uart0puts()
then just send uart0puts("ATB?");
then receive response check it out
u need to send AT commands to LM400.
first u connect LM400 to lpc2129 like what i said previously.
and then if ur data tx function like
uart0puts()
then just send uart0puts("ATB?");
then receive response check it out
Reply by ●December 13, 20102010-12-13
#define baudrate (19200)
// PLL setup values are computed within the LPC include file
// It relies upon the following defines
#define FOSC (14745000) // Master Oscillator Freq.
#define PLL_MUL (4) // PLL Multiplier
#define CCLK (FOSC * PLL_MUL) // CPU Clock Freq.
// Pheripheral Bus Speed Divider
#define PBSD 2 // MUST BE 1, 2, or 4
#define PCLK (CCLK / PBSD) // Pheripheal Bus Clock Freq.
use these configurations and what ever the things previously i have sent
u will get the output.
first check with hyper terminal 19200 baudrate
// PLL setup values are computed within the LPC include file
// It relies upon the following defines
#define FOSC (14745000) // Master Oscillator Freq.
#define PLL_MUL (4) // PLL Multiplier
#define CCLK (FOSC * PLL_MUL) // CPU Clock Freq.
// Pheripheral Bus Speed Divider
#define PBSD 2 // MUST BE 1, 2, or 4
#define PCLK (CCLK / PBSD) // Pheripheal Bus Clock Freq.
use these configurations and what ever the things previously i have sent
u will get the output.
first check with hyper terminal 19200 baudrate
Reply by ●December 13, 20102010-12-13
Reply by ●December 13, 20102010-12-13
--- In l..., Soori wrote:
>
> first u test uart communication with 19200 baudrate
>
> and then connect LM400 in swap mode means
>
> RX OF LM400->TX OF LPC2129
>
> TX OF LM400->RX OF LPC2129
>
> and then in program just send AT commands.
>
> Definately it will work
>
thank you for your response ,
i test UART1 with my config (normally the baud rate is 19200)
it work when i connect U1TX to U1RX,
i have measured the signal with scope,
i have found : 1 bit is send in 208 s.
how i can calculate the baud rate from this value ?
>
> first u test uart communication with 19200 baudrate
>
> and then connect LM400 in swap mode means
>
> RX OF LM400->TX OF LPC2129
>
> TX OF LM400->RX OF LPC2129
>
> and then in program just send AT commands.
>
> Definately it will work
>
thank you for your response ,
i test UART1 with my config (normally the baud rate is 19200)
it work when i connect U1TX to U1RX,
i have measured the signal with scope,
i have found : 1 bit is send in 208 s.
how i can calculate the baud rate from this value ?
Reply by ●December 13, 20102010-12-13
first u test uart communication with 19200 baudrate
and then connect LM400 in swap mode means
RX OF LM400->TX OF LPC2129
TX OF LM400->RX OF LPC2129
and then in program just send AT commands.
Definately it will work
and then connect LM400 in swap mode means
RX OF LM400->TX OF LPC2129
TX OF LM400->RX OF LPC2129
and then in program just send AT commands.
Definately it will work
Reply by ●December 13, 20102010-12-13
thank you my friends !
it's work !!
i have receive \n\rOK\n\r :)&
thank you !
when i measure the value with scope i found the baud rate is 4800
i change the value in my code :
UART1Init(19200);
with
UART1Init(76800);
and it's work !!!
it's work !!
i have receive \n\rOK\n\r :)&
thank you !
when i measure the value with scope i found the baud rate is 4800
i change the value in my code :
UART1Init(19200);
with
UART1Init(76800);
and it's work !!!
Reply by ●December 13, 20102010-12-13
----Original Message----
From: l...
[mailto:l...] On Behalf Of zied130187
Sent: 13 December 2010 15:38 To: l...
Subject: [lpc2000] Re: problem communication UART LPC2129
to LM400 bluetooth
>
> when i measure the value with scope i found the baud rate
> is 4800
>
I've lost count of the times this has happened to me.
I never believe a baud rate till I've seen it on the scope.
--
Tim Mitchell
From: l...
[mailto:l...] On Behalf Of zied130187
Sent: 13 December 2010 15:38 To: l...
Subject: [lpc2000] Re: problem communication UART LPC2129
to LM400 bluetooth
>
> when i measure the value with scope i found the baud rate
> is 4800
>
I've lost count of the times this has happened to me.
I never believe a baud rate till I've seen it on the scope.
--
Tim Mitchell
Reply by ●December 13, 20102010-12-13