Hi Bob, Thanks for your help thus far! Perhaps if I explain my project a little. This is my first PIC project, and I am constrained to the 16F84 as one of the choices I made before I started was that I wanted to do my coding in C as I knew this and didn't want to learn Assembler for the PIC. I chose to use the demo version of Hi-Tech C, and this only supports the PIC16F84 :-( I am trying to build an "motor controller". How it will work is that it will receive one byte serial commands from a BASIC STAMP II saying "forward", "stop", etc... The PIC will then give the appropriate output pulses to the two hobby servos. The PIC will also be counting 'ticks' on encoders attached to each motor. I am hoping, if I can fit it all in the 1k code space, to implement some basic PID control as well. To make the project managable for a total newbie I have broken it down into a series of steps, the first of which was the old blinking LED ! then I built a 1ms timer ( will be used for keeping track of servo pulses). Next I worked out the servo control. Now I'm trying to get the serial coms between the stamp and the PIC going.... > I generally use timer based interrupts at a regular rate unless I > absolutely need not to. That way I can do lots of things "at once" and also > keep track of time without constantly polling T0. > > Also if you intend to receive serial data you will have to poll very > frequently or else lose data. An alternative would be to use the RB0 > interrupt for receive. Something I had thought of was using the port B interrupt on change functionality. This way I wouldn't have to poll and could just receive the data after the first interrupt? >A 16F873 would make things a lot easier and since I'm lazy > would be my choice. Me too, but for reasons mentioned above this is not possible :-( Would you expect the Hi-Tech C serial code to wrok as is? Reason I ask is because I am trying to send a stream of 'A's to my terminal program from my PIC using a MAX232 interface, and instead am getting ||~|~| |~|~| |~|~| |~|~|..... I had a similar problem with my Stamp and it was to do with the data being inverted. Do I need extra hardware between the PIC output and the TTL input on the 232? Thanks very much for all your help, I really appreciate it! Kind regards, James Fitzsimons -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads