lanternfish
Senior Member
A recent edition of Silicon Chip contains a PIC controlled GPS Car Trip Meter project (sorry, I can't remeber the PIC id).
What is interesting about this project is that the GPS module is 3V, the PIC 5V (why didn't they just use a 3V PIC?) and to interface the serial from the GPS to the PIC they have used a neat trick utilising an onboard (PIC) comparator and onboard (PIC) voltage reference.
Essentially the serial from the GPS is applied to the non-inverting input of the comparator and the reference voltage is applied to the inverting input of the comparator. The output of the comparator is connected to the hserin of the PIC.
The internal Vref is programmed internally. (In this project it is set to 1.35V).
So, having had an admittedly brief look at the datasheets for the PIC18F2420(28X2) I am wondering how the Comparator Vref output pin can be accessed on the 28X2.
In regards to the 20X2, the Vref for the Comparator is also the Vref for the ADC's so this may cause problems there if both are required. Mind you, a little clever programming will get around that.
Will post a circuit diagram and more info later.
What is interesting about this project is that the GPS module is 3V, the PIC 5V (why didn't they just use a 3V PIC?) and to interface the serial from the GPS to the PIC they have used a neat trick utilising an onboard (PIC) comparator and onboard (PIC) voltage reference.
Essentially the serial from the GPS is applied to the non-inverting input of the comparator and the reference voltage is applied to the inverting input of the comparator. The output of the comparator is connected to the hserin of the PIC.
The internal Vref is programmed internally. (In this project it is set to 1.35V).
So, having had an admittedly brief look at the datasheets for the PIC18F2420(28X2) I am wondering how the Comparator Vref output pin can be accessed on the 28X2.
In regards to the 20X2, the Vref for the Comparator is also the Vref for the ADC's so this may cause problems there if both are required. Mind you, a little clever programming will get around that.
Will post a circuit diagram and more info later.