At 02:44 PM 3/14/2006, Simon Dyer wrote: >GPS Data can be as slow as 2400 baud, although 9600 baud is often used. >Bit bashing methods can be used to read a data stream so long as you >service the port with low latency. Does the 18F620 have a UART serial >port? If so then standard C to read a serial port will suffice. I've >been wondering whether this could be done on a PIC10F ! I've got some very ugly code that works darned well using the built-in RC oscillator in a 12c508. Its based upon John Payson's 40 bit register concept: sample the incoming serial at 3X the expected data rate and shift the bits into a 40 bit long shift register. When bits start to appear at the end of the register, use the end bit positions to decide where to sample the individual data bits. I appear to get reliable reception over the full range of the 12c508's internal RC oscillator error. Its ugly because its isochronous and because it uses a handful of jump tables to pick out the individual bits. Fastest I can make it run is at 9600 baud with the internal 4 MHz oscillator. Allows up to 20 cycles for your own task out of each 104 cycle loop. Also includes full duplex serial TX, 4 byte SPI output to some displays, and a simple 30 level PWM output at 972 Hz. The PWM output was used to keep the display brightness constant as the battery discharged (unregulated supply). The cool thing about it is that it is always able to receive serial data, no matter what else it is doing. I'm pretty sure it will run just fine in a PIC10F. And standard NMEA at 4800 baud would be a cinch. dwayne -- Dwayne Reid Trinity Electronics Systems Ltd Edmonton, AB, CANADA (780) 489-3199 voice (780) 487-6397 fax Celebrating 22 years of Engineering Innovation (1984 - 2006) .-. .-. .-. .-. .-. .-. .-. .-. .-. .- `-' `-' `-' `-' `-' `-' `-' `-' `-' Do NOT send unsolicited commercial email to this email address. This message neither grants consent to receive unsolicited commercial email nor is intended to solicit commercial email. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist