sarra WROTE:OK..this is simple blinking led..
I want to make a coding for UART..
what the error?
Could anybody help me?
#include <p18f452.h>
#include <sw_uart.h>
...............clip off................
data = ReadUART(); //read a byte
WriteUART( data ); //bounce it back
}
}
Forget about the C program that you're writing for interfacing your LEDs and pushbuttons to VB or C# first.
First, you PIC must be able to detect switches and on/off LED. (completed)
Second, Are you able to send chars A to Z to PC using Hyperterminals?
Third, is you PIC able to receive chars from the PC's hyperterminal and display them on LCD?
Once the above 3 thing are working, then you can devise a way to make you PIC to send the status of Inputs and outputs to your VB or C# in PC.
Take a look at the discussions here to get some ideas. We cannot provide the exact solution for you, as we are also as busy as you are. So pointers are what the best we can afford.
http://forum.best-microcontroller-proje ... ions#p2706Did you search all the past threads in cytron using the search key "RS232"? You'll be surprise what you can find there.
Allen