pic16f877a to pc

Thread Starter

cecece

Joined Feb 26, 2011
3
Hello. I am a newbie in this forum. I hope somebody can help me. Thx

I use hi-tech c to write the program. As I see that the mickroC has some internal functions such as usart_data_ready, usart_read, usrt_write, these can be convenient for the user. So I hope to know that any "replacement" function in hi-tech c??

if no, what can I do in the program for pic communication through serial port to pc??

Thanks!
 

t06afre

Joined May 11, 2009
5,934
In the Hi-Tech C install folder you will find a folder named samples. Inside here you will find some serial port examples. However small modifications to the sample may be required depending on which chip you use. Check the data sheet to see what is required in order to get the serial port working. You can use the MPLAB simulator to simulate data on the serial port.
See also here
http://forum.allaboutcircuits.com/showthread.php?t=44852
 

Thread Starter

cecece

Joined Feb 26, 2011
3
In the Hi-Tech C install folder you will find a folder named samples. Inside here you will find some serial port examples. However small modifications to the sample may be required depending on which chip you use. Check the data sheet to see what is required in order to get the serial port working. You can use the MPLAB simulator to simulate data on the serial port.
See also here
http://forum.allaboutcircuits.com/showthread.php?t=44852
Thanks for your help.
But I can't find that "samples" folder. Do u mean user manual? If no, can u give me the website link to me?
 

Thread Starter

cecece

Joined Feb 26, 2011
3
Huh do not have something like this:confused:
C:\Program Files\HI-TECH Software\PICC\9.80\samples
oh, thank you so much. I got that file.
But I see that there are "serial" file and "usart" file. If I need to communicate between pic and pc, which one is more suitable for my task?:(
 

t06afre

Joined May 11, 2009
5,934
oh, thank you so much. I got that file.
But I see that there are "serial" file and "usart" file. If I need to communicate between pic and pc, which one is more suitable for my task?:(
Start with the example you can understand. And READ THE DATA SHEET! It is many small details that need to be correct. Before a serial datalink may work. Also the art of debugging is important. Using the MPLAB SIM that is a software simulator in MPLAB may help you a lot.
se more here http://forum.allaboutcircuits.com/showthread.php?t=44852
As a first step build a simple app that can take a single char from some terminal tool. Read it and echo it back to the terminal program.
 
Top