![]() |
Forum Index : Microcontroller and PC projects : Picomite and GNSS 7 GPS
Author | Message | ||||
cdeagle Senior Member ![]() Joined: 22/06/2014 Location: United StatesPosts: 265 |
I'm trying to use the GNSS 7 Click board with the Picomite. The GNSS 7 is one of the more advanced NEO-M9N ublox modules and includes Tx and Rx pins and an I2C interface. ![]() I have used it successfully with an Arduino and the I2C interface. However I cannot get it to work with the Picomite via the TX/RX connection using the default 9600 baud. I would appreciate any suggestions about how to make this work. David |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 4044 |
I guess it's partly a matter of what have you done & what happened: 1. electrically 2. software-wise John |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10315 |
Please try the following and report findings Connect module TX to pin 2 of the Picomite Connect module RX to pin 1 of the Picomite setpin 1,2,com1 open "com1:9600" as gps,0,1 |
||||
cdeagle Senior Member ![]() Joined: 22/06/2014 Location: United StatesPosts: 265 |
Here is a picture of the Picomite/GNSS 7 setup. ![]() The following is a listing of the main MMBASIC code (without subroutines) including Peter's suggestion. Option autorun 1 ' Picomite GPS October 14, 2021 '''''''''''''''''''''''''''''''''''' Font 4 Dim month$(12) As string month$(1) = "January" month$(2) = "February" month$(3) = "March" month$(4) = "April" month$(5) = "May" month$(6) = "June" month$(7) = "July" month$(8) = "August" month$(8) = "September" month$(10) = "October" month$(11) = "November" month$(12) = "December" ' initialize com1 SetPin 1, 2, com1 Open "com1:9600" As gps, 0, 1 Colour RGB(yellow), RGB(black) ' time zone tzone = 5 ' DST (1 = yes, 0 = no) dst = 1 Do If GPS(VALID) = 1 Then tmp1$ = GPS(date) tmp2$ = GPS(time) ' convert calendar date to month-day-year gps1$ = month$(Val(Mid$(tmp1$,4,2))) + " " + Mid$(tmp1$,1,2) + ", " + Mid$(tm$,7,4) gps2$ = GPS(time) ' extract utc hours, minutes and seconds ut_hrs = Val(Mid$(tmp2$, 1, 2)) ut_min = Val(Mid$(tmp2$, 4, 5)) ut_sec = Val(Mid$(tmp2$, 7, 8)) lct_hrs = ut_hrs + ut_min / 60.0 + ut_sec / 3600.0 - tzone + dst hrs2str(lct_hrs, lct_hms$) dd_lat = GPS(latitude) deg2str(dd_lat, gps3$) dd_long = GPS(longitude) deg2str(Abs(dd_long), gps4$) CLS If (dd_lat > 0.0) Then NS$ = " N" Else NS$ + " S" EndIf If (dd_long > 0.0) Then EW$ = " E" Else EW$ = " W" EndIf Text 5,20, "DATE " + gps1$ Text 5,40, "LCT " + lct_hms$ Text 5,60, "UTC " + gps2$ Text 5,80, "LAT " + gps3$ + NS$ Text 5,100, "LON " + gps4$ + EW$ Text 5,120, "ALT " + Str$(Int(GPS(altitude))) + " meters" Text 5,140, "SPD " + Str$(GPS(speed)) + " knots" Text 5,160, "TRK " + Str$(GPS(TRACK)) + " degrees" Text 5,180, "FIX " + Str$(GPS(fix)) Text 5,200, "DOP " + Str$(GPS(DOP)) Text 5,220, "NSAT " + Str$(GPS(satellites)) Else CLS Text 5, 20, "INVALID GPS DATA" EndIf Pause 30000 Loop The code resides in FLASH 1. When the code runs and I monitor via Teraterm, lots of strange characters appear on the screen. |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 5091 |
Some idea's: 1/ For the UART to work, you need to pull the D_SEL pin high (the pin is called "AN" in the microbus module silkscreen) 2/ The baudrate can be anything between 4800 and 900kbaud. Maybe it is set default to 4800baud. Regards, Volhout Edited 2021-10-15 19:58 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10315 |
Sounds like the PicoMite UART input may be inverted. Try a npn in the TX line from the GPS |
||||
cdeagle Senior Member ![]() Joined: 22/06/2014 Location: United StatesPosts: 265 |
Thanks for the suggestions. Good things to try to keep my mind from turning to mush. |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 4044 |
When nothing's being sent you could look at the volts on Tx/Rx to see pretty surely whether their signals are inverted. John |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |