Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 07:07 02 Aug 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Picomite and GNSS 7 GPS

Author Message
cdeagle
Senior Member

Joined: 22/06/2014
Location: United States
Posts: 265
Posted: 04:24pm 14 Oct 2021
Copy link to clipboard 
Print this post

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 Kingdom
Posts: 4044
Posted: 04:40pm 14 Oct 2021
Copy link to clipboard 
Print this post

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 Kingdom
Posts: 10315
Posted: 05:36pm 14 Oct 2021
Copy link to clipboard 
Print this post

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 States
Posts: 265
Posted: 09:28am 15 Oct 2021
Copy link to clipboard 
Print this post

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: Netherlands
Posts: 5091
Posted: 09:57am 15 Oct 2021
Copy link to clipboard 
Print this post

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 Kingdom
Posts: 10315
Posted: 12:17pm 15 Oct 2021
Copy link to clipboard 
Print this post

  Quote  When the code runs and I monitor via Teraterm, lots of strange characters appear on the screen.


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 States
Posts: 265
Posted: 01:05pm 15 Oct 2021
Copy link to clipboard 
Print this post

Thanks for the suggestions.

Good things to try to keep my mind from turning to mush.
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4044
Posted: 02:01pm 15 Oct 2021
Copy link to clipboard 
Print this post

When nothing's being sent you could look at the volts on Tx/Rx to see pretty surely whether their signals are inverted.

John
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025