Shop OBEX P1 Docs P2 Docs Learn Events
Sample Test for Parallax PMB-648 GPS — Parallax Forums

Sample Test for Parallax PMB-648 GPS

DMN90DMN90 Posts: 3
edited 2011-09-09 12:09 in Accessories
Hello,

I am trying to develop a driver for the PMB-648 GPS chip. I have been looking through a number of PDF documents (Parallax, NMEA, and SiRF) and have had a hard time finding a command or recommendation to test the chip. I want to verify I can write/read messages to the chip. Does anyone have any suggestions? It would be greatly appreciated.

Thank you

Comments

  • LeonLeon Posts: 7,620
    edited 2011-09-09 11:51
    Most GPS chips have a standard serial interface, so you just need something with a UART. I've never had any problems using a small PIC with the GPS devices I've used, I've even used a software UART if the hardware UART is required for GSM.
  • DMN90DMN90 Posts: 3
    edited 2011-09-09 12:00
    Thank you Leon, I appreciate your feedback. But my question isn't referring to hardware but just setting up a verification test to establish communication to the device. I am in the process of obtaining the material to connect the chip to my computer's serial port, but what commands or test can I send to it to verify the device is working properly?
  • LeonLeon Posts: 7,620
    edited 2011-09-09 12:09
    Assuming that the module and antenna are working properly, you should see a stream of data coming out of it at 9600 baud. Here is my code for extracting an RMC sentence and putting it into a buffer:
    ;------------------------------------------------------------------------
    ; get_GPS
    ; This routine extracts an RMC sentence from the incoming data.
    ; Data are read in until '$GPRMC' is detected. The following ',' is rejected
    ; and the rest of the sentence is placed in a buffer.
    ; RMC record is 65 bytes
    ; eg GPRMC,225446,A,4916.45,N,12311.12,W,000.5,054.7,191194,020.3,E*68
    ;------------------------------------------------------------------------
    get_GPS:
    			call	inch_n			; get char in W
    			sublw	'$'				; $?
    			skpz					; yes, continue
    			goto	get_GPS			; no, loop back
    			call	inch_n			; repeat for G, P, R, M and C
    			sublw	'G'
    			skpz
    			goto	get_GPS
    			call	inch_n
    			sublw	'P'
    			skpz
    			goto	get_GPS
    			call	inch_n
    			sublw	'R'
    			skpz
    			goto	get_GPS
    			call	inch_n
    			sublw	'M'
    			skpz
    			goto	get_GPS
    			call	inch_n
    			sublw	'C'
    			skpz
    			goto	get_GPS
    			call	inch_n			; skip ','
    			movlw	Buffer			; initialise buffer pointer
    			movwf	FSR
    			movlw	.70				; initialise byte counter
    			movwf	counter2
    next_char:	
    			call	inch_n			; received byte in W		
    			movwf	INDF			; save in buffer
    			incf	FSR,F			; bump pointer
    			decf	counter2,F		; decrement counter
    			bz		done			; done? Yes, return
    			goto	next_char		; No, get next character
    done:
    			return
    

    I could then examine the buffer contents with the MPLAB debugger.

    I was using a Telit GE863-GPS module.
Sign In or Register to comment.