element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Embedded and Microcontrollers
  • Technologies
  • More
Embedded and Microcontrollers
Blog C++ library for ST Teseo GPS - pt. 4: PCB to Pico hardware connections
  • Blog
  • Forum
  • Documents
  • Quiz
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Embedded and Microcontrollers requires membership for participation - click to join
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Jan Cumps
  • Date Created: 20 Jul 2024 11:34 AM Date Created
  • Views 394 views
  • Likes 4 likes
  • Comments 5 comments
  • raspberry
  • i2c
  • pico
  • pico_eurocard
  • uart
  • Teseo
  • OO
  • teseo_c++
Related
Recommended

C++ library for ST Teseo GPS - pt. 4: PCB to Pico hardware connections

Jan Cumps
Jan Cumps
20 Jul 2024

The Teseo-LIV3 GPS module (as used in shabaz ' GPS / Galileo / BeiDou / GLONASS receiver) talks UART and I2C. I'm writing an OO driver for it, for embedded systems. In this blog, how to wire the Teseo PCB to a Pico

Pico connections for I2C, UART and shared functions

Pico resources if you use I2C:

  • I2C0
  • SDA: GP16 (Pico I2C0 SDA)
  • SCL:  GP17 (Pico I2C0 SCL)
  • baud: 100 * 1000

for I2C, SDA connects to SDA and SCL to SCL

Pico resources if you use UART:

  • UART1
  • TX: GP4 (Pico UART1 RX)
  • RX:  GP5 (Pico UART1 TX)
  • baud: 9600
  • UART1 RX interrupt

for UART, RX connects to TX and vice versa

Pico common resources:

  • RESET: GP18 (optional)
  • 5V: VBUS
  • 0V: GND

image

Anything else?

Yes: Send UART to a USB comms port while you are developing for I2C:

If you use I2C as communication protocol, you can connect the unused Teseo UART pins to a UART-to-USB passthrough. Then use a serial terminal program (PuTTY, etc...) to connect and interact.

 There are many UART-to-USB converters available. The simplest is an FTDI serial-to-USB cable. Most debuggers have one on board too. I'm using a XIAO PicoProbe for it, because that's the one on the development board that I use:  Pi Pico Eurocard Development Board . See the drawing above for connections.

standard setup: 9600 8 ,1, N

image

You can send and receive commands via the two interfaces at the same time, but they influence each other. The best use for it is to monitor the unformatted Teseo output constantly in a serial terminal. Or to send commands that change the behaviour as part of an interactive debug/troubleshoot/design session (e.g. a warm reset).

for UART, RX connects to TX and vice versa

image

Next post:  C++ library for ST Teseo GPS - pt. 5: ready for a first (0.1) firmware release 

visit the github repository (git clone https://github.com/jancumps/pico_gps_teseo.git --recursive)
view the online documentation
Link to all posts.

  • Sign in to reply
  • Jan Cumps
    Jan Cumps 9 months ago

    It works reliable on a Pico with I2C and UART now.

    support for commands that return 1 reply, and multi line commands (e.g. GPGSV, that returns a line per satellite).

    count of data points, and validation status check, are available via the API. 

    image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps 10 months ago in reply to Jan Cumps

    ... this takes care that any bulk noise the teseo sends (it does that, unless you pre-program it) is ignored.
    ... and that when I do need the data, I get each-and-every character.

    Embedded APIs that have stdio style of abstraction layers for the UART, don't need this at all. They can just use the stdio in and out functions.
    They have the luxury that all the (customised for their platform) stdio lib functions handle all oddities.

    On an Arduino, you can just use a free Serial().

    On Pico, I could use the pico-stdio functionality instead of the raw(er) UART API. But that would take away using printf() for developer/debug use.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • DAB
    DAB 10 months ago

    Nice update Jan.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps 10 months ago in reply to scottiebabe

    In the PICO port, I disabled FIFO. Then only enable the interrupt when I care about data.

    // in init:
        uart_set_fifo_enabled(UART_PORT, false);
        
    // in the code, all disabled until read time:
    // bWantChars is volatile, set by the interrupt handler when it thinks it receib-ved everything,
    // and in the reader function if the wait was too long
    
    // part of the reader code:
    
        bWantChars = true;
        // enable the UART to send interrupts - RX only
        uart_set_irq_enables(UART_PORT, true, false);
        absolute_time_t  fail_at = delayed_by_ms(get_absolute_time(), UART_WAITFORREPLY_MS);
        while (bWantChars){
            if (absolute_time_diff_us(fail_at, get_absolute_time()) >= 0) {
                bWantChars = false; // timeout
            }
        };
        // disable the UART to send interrupts
        uart_set_irq_enables(UART_PORT, false, false);

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • scottiebabe
    scottiebabe 10 months ago

    The OG 16550 UART had a FIFO stale data timeout interrupt.

    image 

    Most MCUs don't include that, which can cause problems if you set the FIFO interrupt level greater than 1 character.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube