AnsweredAssumed Answered

GPS trouble SCI reception in HCS08QG8

Question asked by mauromoreyra on Feb 17, 2013
Latest reply on Feb 18, 2013 by bigmac

Hi everybody!, i'm form Argentina and this is my first time posting in the forum...

 

I'm working on QG8 microcontroller, and i have problems trying communicating with a GPS module (ET-332 of GlobalSat). Specifically, while the program runs and de RX pin is receiving GPS data string, it doesn't enters in the RX interrupt subroutine (

 

I've verified that RX pin is receiving data from GPS transmitter (@4800 bauds) with a scope.

 

This is my interrupt subroutine code of the RX in assembler:

 

sci_rx_isr:

            lda   SCIS1          ; clear RDRF flag

            lda   SCID          ; clear RDRF flag

            mov   SCID,X+     ; data vector from GPS

            cpx   #68         ; string length

            bne   no_end

            ldhx  #RMC_string ;  start again when 68 bytes string data is complete

no_end:            

            rti

 

 

Also I've verified many times the configuration of the SCI registers, and is OK. The bus frequency is 2.4576 MHz and BR bits value is 32. Here is my initialization code of the SCI module.

 

mov   #$00,SCIBDH ;

mov   #$20,SCIBDL ; BR [SBR12:SBR0] = 32

           

mov   #%00000000,SCIC1 ; 8 data bits, no parity bit

; LOOPS = 0 (Normal operation — RxD and TxD use separate pins)

; SCISWAI = 0 (SCI clocks freeze while CPU is in wait mode)

; RSRC = 0 (util solo cuando LOOPS = 1)

; M = 0 (Normal — start + 8 data bits (LSB first) + stop)

; WAKE = 0 (Idle-line wakeup)

; ILT = 0 (Idle character bit count starts after start bit)

; PE = 0 (No hardware parity generation or checking)

; PT = 0 (util solo cuando PE = 1)

           

mov   #%00100100,SCIC2 ; interrupt enabled when RDRF flag = 1, RxD SCI receiver enabled

; TIE = 0 (Hardware interrupts from TDRE disabled (use polling))

; TCIE = 0 (Hardware interrupts from TC disabled (use polling))

; RIE = 1 (Hardware interrupt requested when RDRF flag is 1), se genera interrupción cuando se completa la recepción de un dato en el registro SCID

; ILIE = 0 (Hardware interrupts from IDLE disabled (use polling))

; TE = 0 (Transmitter OFF)

; RE = 1 (Receiver ON)

; RWU = 0 (Normal SCI receiver operation)

; SBK = 0 (Normal transmitter operation)

           

mov   #$00,SCIC3  ; no interrupts generated by errors

 

 

 

 

Someone can help me??

 

Thanks!!

 

 

Outcomes