Find help, specifications and source code for the LPC900. The LPC900 challenges Microchip and AVR based on the worlds most popular 8-bit architecture the 80C51. With a 2-clock core the LPC900 series is a high performance, very flexible and low cost 8-bit microcontroller family. Designers using or interested in these devices are encouraged to share their know-how and ask questions.
Help with UART - Col Holloway - May 25 3:25:00 2005
Hi all,
I am a new user of the LPC935, and am having dramas
writting a basic program to read a character from the keyboard and send it to the
UART.
I have written code that allows me to do this under the
Keil uVision development IDE in simulation mode.....but when the code is downloaded to the
chip and I am using hyperterminal nothing happens.
I am simply using scanf to read from the
keyboard:
scanf("%c", SBUF);
I can see the contents of SBUF changing in the serial
channel simulator, and my character is displayed in the serial window...but nothing in
hyperterminal.
This small step is a lead up to being able to have the
lpc935 receive a signal serially from an external device for further
processing.
Thanks in advance.
colholloway74

(You need to be a member of LPC900_users -- send a blank email to LPC900_users-subscribe@yahoogroups.com )
Re: Help with UART - rodboyce70 - May 26 6:05:00 2005
Firstly scanf is very very very bad in an embedded appliaction. You
really should find a better way of doing this.
The line you have pasted you are reading a character from stdin and
putting it in SBUF are you sure this is what you want to do.
even something like
SBUF = getc();
would be better but even that would have too much over head for an
embedded target.
You should something more along the lines of:
c = read_key();
send_char( c );
both of these functions you will have to write.
Hope this helps,
Rod
--- In lpc900_users@lpc9..., "Col Holloway" <cjholloway@o...>
wrote:
> Hi all,
>
> scanf("%c", SBUF);
>
> Thanks in advance.
>
> colholloway74

(You need to be a member of LPC900_users -- send a blank email to LPC900_users-subscribe@yahoogroups.com )
Re: Help with UART - b_siderius - May 26 20:51:00 2005
Hi,
Try codearchitect, it will generate the functions for you to use the
UART. It will generate the initialization functions for the LPC935 too.
The link is www.codearchitect.com
Bauke
--- In lpc900_users@lpc9..., "Col Holloway" <cjholloway@o...>
wrote:
> Hi all,
>
> I am a new user of the LPC935, and am having dramas writting a basic
program to read a character from the keyboard and send it to the UART.
>
> I have written code that allows me to do this under the Keil uVision
development IDE in simulation mode.....but when the code is downloaded
to the chip and I am using hyperterminal nothing happens.
>
> I am simply using scanf to read from the keyboard:
>
> scanf("%c", SBUF);
>
> I can see the contents of SBUF changing in the serial channel
simulator, and my character is displayed in the serial window...but
nothing in hyperterminal.
>
> This small step is a lead up to being able to have the lpc935
receive a signal serially from an external device for further processing.
>
> Thanks in advance.
>
> colholloway74

(You need to be a member of LPC900_users -- send a blank email to LPC900_users-subscribe@yahoogroups.com )
Re: Help with UART - Tutors of ESAcademy - May 26 23:15:00 2005
--- In lpc900_users@lpc9..., "b_siderius" <baukesiderius@g...>
wrote:
> Try codearchitect, it will generate the functions for you to use the
> UART. It will generate the initialization functions for the LPC935
> too.
> The link is www.codearchitect.com
>
> Bauke
Hey Bauke, et all:
Just a quick correction - the link is
www.codearchitect.org
Scroll down and choose either the online or offline version for
generating your code.
--
Chris
Tutor at ESAcademy
www.esacademy.com

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