Hi Shaun, The sample & transmit code will have to run in a timer interrupt handler. You can use the built in ADC and USART in the PIC16F87x to simplify the code. Depending on how accurate your sampling has to be, you can choose between TMR0 or TMR2 (using the PWM period calculations). You will have to come up with a data protocol to understand how quickly you have to send the data (ie if you are sending 1 byte, you will have to transmit at better than 40kbps (for 2 Bytes, better than 80 kbps, etc...). Is this for a school project? myke ----- Original Message ----- From: "Shaun Schulze" To: Sent: Saturday, August 24, 2002 5:17 PM Subject: accurate a/d sampling > I need to do accurate analog to digital sampling (at 4000Hz) with a PIC16F876 > , perform calculations after each sample and then transmit the result over a > rs232 interface. I am using CCS C compiler. > How would I manage to perform the routines between each sample and still > sample at a accurate sample rate? > > Shaun > > -- > http://www.piclist.com hint: To leave the PICList > mailto:piclist-unsubscribe-request@mitvma.mit.edu > > > > -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu