I am fairly new to PICs and PBP (v2.47). I have designed a small general purpose A/D I/O interface card utilizing a PIC 16F876A. It will be used by my students to gather and graph data using LabVIEW graphical programming language. It must communicate through a USB converter module (FTDI UM232R) because my students are online and use Macs or laptop PCs with no serial port.
Eventually, I would like to have the card execute several commands, and so need two way communication. So far, I have the Defines setup and a program written to read AD port 0 and send 10 bit result to the hardware serial port. It sends data continuously without a request from the PC. It works fine, except that if I stop receiving data, the serial buffer fills or overflows and when I start receiving data again, it is erratic for many seconds before it returns to normal operation. I need a program that tells the PIC chip to read A/D Port 0 and send result to the hardware serial port just once and then wait for another command. Any thread or archive with such a program? Any suggestions for writing one? Thanks for your help.
Bookmarks