Discussion Forum

RS232 Code

Next Thread | Thread List | Previous Thread Start a Thread | Settings

DetailsMessage
Read-Only
Author
Gerardo Diez
Posted
18-May-2009 12:57 GMT
Toolset
ARM
New! RS232 Code

IÂ'm trying to use serial port in MCB2900 with LPC2919 processor and I couldnÂ't make scanf function to receive data from PC. Is there some code there for my target? IÂ'm looking for it but i havenÂ't seen anything

Read-Only
Author
Andy Neil
Posted
18-May-2009 13:19 GMT
Toolset
ARM
New! i haven't seen anything

Oh, come on: nothing - you can't be serious?

What about these: http://www.keil.com/support/man/docs/mcb2900/mcb2900_examples.htm ?

If that's not what you want, then don't just say, "i haven't seen anything" - say what, precisely, it is that you've found so far, and why that doesn't meet your requirements. Otherwise, you won't be taken seriously.

Hint: before messing with scanf (which has many well-known "issues"), are you sure that your basic RS232 transmit and receive codes are working?

Read-Only
Author
Gerardo Diez
Posted
18-May-2009 20:28 GMT
Toolset
ARM
New! RE: i haven't seen anything

Nothing about scanf functions sorry

Read-Only
Author
Andy Neil
Posted
18-May-2009 20:33 GMT
Toolset
None
New! scanf

scanf is a standard 'C' library function - so any 'C' textbook will do!

Also search the forum for "scanf" for the many previous discussions...

But, again, have you tested your basic serial IO before moving on to scanf - or anything else?

Read-Only
Author
Gerardo Diez
Posted
18-May-2009 21:21 GMT
Toolset
None
New! RE: scanf

Printf is ok, but i am trying to receive data from PC and i couldnÂ't with scanf

Read-Only
Author
Andy Neil
Posted
18-May-2009 23:45 GMT
Toolset
None
New! RE: i couldn't with scanf

But can you do it without scanf?

Obviously, if the basic serial reception isn't working, then nothing higher up the chain - like scanf - can possibly work!

And, again, scanf has a whole pile of issues all of its own - have you done that search yet?

Read-Only
Author
Gerardo Diez
Posted
19-May-2009 11:51 GMT
Toolset
None
New! RE: i couldn't with scanf

Yes, i have made the scanf code search and i found some, but any code about LPC2919. I have found another processors code with scanf function.
I think i have to modify retarget.c file to use scanf. I follow the others target code but in my case does not work.

Read-Only
Author
Andy Neil
Posted
19-May-2009 12:03 GMT
Toolset
None
New! i have made the scanf code search

And what was the consensus about whether scanf was a good thing to use...?

eg, see the 1st reply in this thread: http://www.keil.com/forum/docs/thread7600.asp

Next Thread | Thread List | Previous Thread Start a Thread | Settings