Hi Eric One way of make communication whit pic is: Use a MAX232 IC, this IC drive the level voltage of RS-232 to TTL or CMOS level, attach 1 input to pin RX of PIC an 1 output to TX. for the software you need fix the format of your commands, example: command for active a valve: O[CR][LF] the letter "O" have a value in hex , so as, CR(CARRY RETURN) and LF(LINE FEED), one time that defined the format of you command, make a code for use the USART module of the pic and for magnament the commands. you can search in the MICROCHIP url in application note for details of the code Francisco "Wittinger, Eric R" wrote: > HI, I am new to this list and to PIC's. My question is about using the UART. > What I need to do it talk from a computer to a PIC, and give this PIC commands . > Then have the PIC respond to these commands back to the computer after the PIC > has preformed some simple tasks based on what info the computer sent to the PI C. > > An example is A user wished to open a valve. So user clicks a button in the > computer interface to open valve #1. The actions that follow : The PIC opens > the valve #1 and responds to the computer letting the user know that valve #1 is > open, it was unable to open valve #1 for some unknown reason. > > Okay, now the question, can I do this? I have a book I am reading, and learnin g > about PIC's with. I have made a test board up (my own design). The problem is I > have never done this before and am not quite grasping what has to happen in th e > PIC for this to work. > > Next is there a simple bit of code that will interface the PIC to a PC. > I can get this kind of thing to work with if pin 1 goes hi open valve #1, > > I am doing my testing on a PIC16F84 > I also have a C compiler for the PIC, I am trying to use, it seems simpler the n > Assembly and a little quicker for a newbie. > > Thanks for any suggestions or help. > > Eric Wittinger Content-Type: text/x-vcard; charset=us-ascii; name="briones.vcf" Content-Transfer-Encoding: 7bit Content-Description: Card for Francisco Armenta Content-Disposition: attachment; filename="briones.vcf" Attachment converted: wonderland:briones.vcf 1 (TEXT/CSOm) (0000E0D0)