Thanks by answer Skimask, Darrel !
you both Are right, there is no interfacing conflicts, but unfortunately I always get the ' no gps ' string on the LCD (with or without running the RTC), I mean, I have made changes for using Hserin instead serin2,
Code:
'''''''''''''' INCLUDES ''''''''''''''''''''''''''''''''''''
DEFINE OSC 4
INCLUDE "DT_INTS-18.bas"
INCLUDE "ReEnterPBP-18.bas"
INCLUDE "Elapsed_INT-18.bas"
INCLUDE "LCDPICDEM2.BAS" ' it runs on PIDEM2 PLUS Board
DEFINE HSER_TXSTA 20h
DEFINE HSER_RCSTA 90h
DEFINE HSER_BAUD 4800
''''''''''''' VARIABLES ''''''''''''''''''''''''''''''''''''
j var byte
rmc var byte[100] ' this gets RMC data
led1 var portb.2
b0 var byte
adcon1 =$07
trisa.2 = 0
trisa.4 = 1
trisb.1 = 1
trisb.2 = 0
trisb.0 = 1
trisc.2 = 0
trisc.7 = 1
porta.2 = 0
gps var portb.1
spk var portc.2
''''''''''''' CODE ''''''''''''''''''''''''''''''''''''
init:
ASM
INT_LIST macro ; IntSource, Label, Type, ResetFlag?
INT_Handler TMR1_INT, _ClockCount, PBP, yes
endm
INT_CREATE
ENDASM
@ INT_ENABLE TMR1_INT
GOSUB ResetTime
GOSUB StartTimer
hours = 11 : minutes = 30: seconds = 0
Start:
LCDOUT $FE,1 ' Initialize LCD
PAUSE 200
lcdout $fe,2,"Starting ..." : pause 500
Main:
Hserin 1500,no_gps,[wait("MC"),str rmc\15\10] '15 bytes only for testing () wait for RMC message
lcdout $fe,$c0,"Time : ",dec2 hours,":",dec2 minutes,":",dec2 seconds
lcdout $fe,2,"$",str rmc\15 :pause 500 ' these are the bytes as captured !
goto main
no_gps:
lcdout $fe,1,"No Gps stream "
lcdout $fe,$c0,"Time : ",dec2 hours,":",dec2 minutes,":",dec2 seconds
goto main
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

currently for debug I'm using an GPS software simulator:

and I'm sure that it works, this is a debug rs232 window (hyperterm)

that was taken on Sub-DB9 connector of the picdem2 board
there is something missing in the set-up hardware UART ???
Thanks again !
Bookmarks