3v to 5v serial at high baud rates

staylo

New Member
I'm trying to interface a 5Hz GPS (An MTK chipset iBlue 747) with a PICAXE-28X1 via the 'ser rx' pin. Ultimately the PICAXE will, with 100% reliability, relay the 115200 baud NMEA sentences (Just ASCII plain text) from the GPS to 'ser tx' (and consequently a MAX233) without any processing, and generate and transmit to 'ser tx' extra NMEA sentences based on data from an i2c compass, accelerometer and DS18B20 1-wire thermometer, all within the 80ms or so between the sentences from the GPS. (Yes, I'm fully expecting to have my expectations dashed, but there's no good reason not to be hopelessly optimistic!)

I believe the logic of the GPS is 3V, but I am underequipped to measure it accurately (I have only a multimeter with peak hold)

The sticking point at the moment is one of the first hurdles - how to convert the ~3V serial of the GPS to reliably interface with the PICAXE-28X1, currently on a regulated 5V supply. (There's no reason why the PICAXE supply can't be bought down - the minimum logic voltage for the MAX233 is 2V) I've seen several suggestions - transistor, mosfet, dedicated logic converter - but all were relating to comparitively low baud rates, and I'm not sure what the best course of action is for 115200 baud, which is after all asking quite a lot from the little PIC.

The question summarised, then: With reliability as the main objective, and with the serial stream purely transmitting from a 2.5 - 3V device to the PICAXE-28X1, what is the recommended way to interface the two?
 

hippy

Ex-Staff (retired)
The simplest way is to run the 3V GPS serial straight into the 5V PICAXE. This works fine, but check the data sheet to make sure you use a TTL input pin rather than Schmitt input pin. There's a list of input pin types in the Finsihed Project forum under Communications.
 

staylo

New Member
Thanks, hippy - that was a very useful page. I eventually bought the PICAXE down to a 3V supply too.

I found that the GPS was firing out 115200 baud data so fast that the PICAXE hserin buffer couldn't keep up. Since there was no need for the GPS data to be processed by the PICAXE for my application I simply joined the GPS serial out and PICAXE serial out at the MAX233 TTL in pin, protecting each output with a diode.

I then additionally took the GPS serial out stream to a PICAXE digital input and set it to interrupt, sending additional data from the PICAXE after a delay. With some tweaks of the timing the GPS serial out and PICAXE serial out are merged without errors.
 
Top