Search the web
Sign In
New User? Sign Up
lpc900_users
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Show off your group to the world. Share a photo of your group with us.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
LPC938 Baudrate generator   Message List  
Reply | Forward Message #607 of 637 |
Re: [lpc900_users] Re: LPC938 Baudrate generator

ya, I am trying not to use an xtal clock cos alot of the code is written and when I do the maths TH1 should be 0xFD to be transmitting at 9600 but its not. Maybe there is some register I miss'd out or value in something else I got wrong? Internal clock is 7.363MHz

Samuel


From: finn_li <li_finn@...>
To: lpc900_users@yahoogroups.com
Sent: Tuesday, April 7, 2009 11:09:48 PM
Subject: [lpc900_users] Re: LPC938 Baudrate generator

Hi Samuel;

What is your system clock? If the internal oscillator cannot make ikt, try xtal or external clock.

Feng
--- In lpc900_users@yahoogroups.com, "SR" <emddjava@...> wrote:
>
> Hi
>
> I am using LPC938, I am trying to get the UART's baudrate to 9600 but nothing seems to work..I the following code and all I see on hyperterm is just various ASCII characters.
>
>    EA = 0;
>     TR1 = 0;        /* stop timer 1 */
>     ET1 = 0;        /* disable timer 1 interrupt */
>
>     TH1 = 0xFC;  //(unsigned char) (256 - (clock / (16L * 12L * baudrate)));
>
>     PCON |= 0x80;        /* 0x80=SMOD: set serial baudrate doubler */
>
>     TMOD &= ~0xF0;        /* clear timer 1 mode bits */
>     TMOD |= 0x20;        /* put timer 1 into MODE 2 */
>     SCON = 0x50;
>
>     TR1 = 1;        /* start timer 1 */
>
>
>     INT_ENABLE;
>
>
>     EA = 1;
>
> Samuel
>




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

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/lpc900_users/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/lpc900_users/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:lpc900_users-digest@yahoogroups.com
    mailto:lpc900_users-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
    lpc900_users-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/




Tue Apr 7, 2009 4:54 pm

emddjava
Offline Offline
Send Email Send Email

Forward
Message #607 of 637 |
Expand Messages Author Sort by Date

Hi I am using LPC938, I am trying to get the UART's baudrate to 9600 but nothing seems to work..I the following code and all I see on hyperterm is just various...
SR
emddjava
Offline Send Email
Apr 7, 2009
11:06 am

Hi Samuel; What is your system clock? If the internal oscillator cannot make ikt, try xtal or external clock. Feng...
finn_li
Offline Send Email
Apr 7, 2009
3:10 pm

ya, I am trying not to use an xtal clock cos alot of the code is written and when I do the maths TH1 should be 0xFD to be transmitting at 9600 but its not....
Samuel
emddjava
Offline Send Email
Apr 7, 2009
4:56 pm

Dear Sameul, Why dont you try the codes with code architect for NXP uC? Sincerely, Dhans Mob:+91-98867-30835 ________________________________ From: Samuel...
M.Dhanasekaran
dhans_g
Offline Send Email
Apr 7, 2009
6:48 pm

This is very old problem This was the problem which has made my visit to China :). Use 0.1uF between VCC and GND. (near to VCC pin of LPC938) Also check your...
Harshal Doshi
dosh_harshal
Offline Send Email
Apr 8, 2009
5:52 am

Hi, if you are using the internal RC oscillator, try this: void init() { BRGCON = 0x00; BRGR0 = 0xF0; BRGR1 = 0x02; BRGCON = 0x03; PCON &=0xC0; SCON = 0x50; ...
lpc9xxbeginner
Offline Send Email
Apr 7, 2009
3:24 pm

clock is internal clock of 7.363MHz. I tired this code. Didn't work either. ________________________________ From: lpc9xxbeginner <schluchti@...> To:...
Samuel
emddjava
Offline Send Email
Apr 7, 2009
4:52 pm

Hi Samuel You may have got it going by now but here is some info. I used an LPC925 which I believe is similar as far as the UART is concerned. I set the txd...
j.hull49
Offline Send Email
Apr 29, 2009
7:07 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help