I have development board of LPC2148 can anyone give me an example of UART communication for the same using visual studio 2008. Since the project is based on image processing I just need to the transfer those values to Embedded kit from visual studio.
So please if anyone has the example of let say "HELLO WORLD" also it would be a gerat help to me.
Why do you think your Visual Studio 2008 project needs to know what processor you have on the embedded board? All you have to agree on is what baudrate to use, number of bits, stop bits, any paritiy. Then it's standard serial communication.
So you are way better off finding Visual Studio 2008 sample code on a Microsoft-oriented board or going through the MSDN samples.
I have already done some literature survey on it , for how to use UART using visual studio but it was to complex to understand. It uses some windows API for the same thats why I needed an example which can expplain me in detail abotu the function. I thought keil team will be able to help me.
Because on there forum when I posted the same thread they asked me to take help from keil team.
This forum is for Keil end users. No "Keil team" here. Official Keil support is available (intended for customers, and intended for Keil-related problems) using the official help channels. They are quite easy to locate on this web page, if you look.
But why would the "Keil team" supply you with information on Windows API? Microsoft have all the API documentation available online on their web site. Have you visited msdn.microsoft.com?
There you will find function descriptions like: msdn.microsoft.com/.../aa365430(VS.85).aspx
Other users of the Keil tools (you know, we - the end users) can help discuss the embedded side of the problem. But you should only have been able to find "hello world" applications for the LPC2148.
Serial communication for the Windows side is definitely not a Keil thing. If any Microsoft or Windows forum gave you the recommendation to visit Keil, then it must be because you gave them the impression that you wanted sample code for the microcontroller side.
Well of course it does!
Obviously, anything that runs on a Windows platform is going to have to use the Windows API(s) to access the features of that platform!
Similarly, if you were using a Linux platform, you'd need to use the appropriate Linux API(s).
"UART using visual studio but it was to complex to understand"
You should not think about using the UART - you should think, instead, about using a COM Port...
Note that there are various 3rd-party libraries available to help with COM port handling on Windows...
"Because on there forum when I posted..."
How about giving a link to that post, then?
i have done a small code to send data though serial communication using visual studio.. i think it may help u...
below is the code in VB.net
in this i have used two text boxes and one button when we a enter some text in a textbox1 after clicking the butto, the text will be transfer to controller which we have connected to com port
Public Class Form2 Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load SerialPort1.Open() // End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim a As String SerialPort1.Write("abc") // transmitting data to controller though serial port a = SerialPort1.ReadExisting() // receiving data from controller through serial port TextBox2.Text = a.ToString() // displaying the data which we received in textbox End Sub End Class
"the text will be transfer to controller which we have connected to com port"
Just to re-emphasise that the the PC application neither knows nor cares what is connected to the COM port.
It makes absolutely no differences whatsoever to the PC application whether that COM port is connected to a terminal, or another PC, or a microcontroller, or anything else...
Part of the OP's original problem was, probably, due to failing to have this clear.
Hence it is better not to talk about stuff being sent "to the controller" or received "from the controller" - keep it clear by just saying "to the COM port" and "from the COM port"
Can I get a code which does the same thing in visual studio, but uses C languagee. Because I would be using openCv library which is used for image processing
"Can I get a code which does the same thing in visual studio, but uses C languagee."
Yes you can. The best way would be to use Google.
Can you get it? Well, that rather depends on how much effort you're prepared to put into getting it!
As already noted, using the COM ports on Windows PCs is not an uncommon task, and there is plenty of information to be had about it.
"but uses C languagee"
For anything PC these days - including VS - you're far more likely to find C++ than C. But that shouldn't really be a problem...
"But that shouldn't really be a problem..."
Absolutely. There are a good collection of functions to communicate via the COM ports within the WinApi - And they are easily accessible via C or C++.