STM32F103C8 and NEO-M6N gps module

What are you developing?
User avatar
Pito
Posts: 94
Joined: Tue Dec 24, 2019 1:53 pm

Re: STM32F103C8 and NEO-M6N gps module

Post by Pito »

I've been using bluepill with NEO7M.
Different code however (it writes directly in binary some settings).

Put 470-1kohm resistors in series with Rx/Tx lines to be safe.

Troubleshooting serial is always a mess :)
Pukao Hats Cleaning Services Ltd.
User avatar
Pito
Posts: 94
Joined: Tue Dec 24, 2019 1:53 pm

Re: STM32F103C8 and NEO-M6N gps module

Post by Pito »

I've been sending binary packets to the NEO7 via Serial1 (9600).
I think you have to switch it to the NMEA instead (unless it is done in your driver).
How?? Hmm..
Pukao Hats Cleaning Services Ltd.
jxid
Posts: 17
Joined: Sun Apr 05, 2020 12:27 pm
Answers: 1

Re: STM32F103C8 and NEO-M6N gps module

Post by jxid »

I tried the tip with the leds.
In TX pin the led Blinks but it never goes off.Just change its ilumination.
In RX pin the led stays on with low ilumination.
Is this normal?
User avatar
Pito
Posts: 94
Joined: Tue Dec 24, 2019 1:53 pm

Re: STM32F103C8 and NEO-M6N gps module

Post by Pito »

I think the NEO module sends a message every second by default.
So I would not expect NEO's TX will continual lit.

BPills Serial1 TX shall blink when your code sends something out (otherwise LED is off).

PS: remove both delay() in your loop() code..

PPS: as I wrote above your LEDs have to be wired this way

Vcc(3.3V)-----[1kohm]------|>|-------RX or TX line

thus the LED lits when RX or TX is low (0V).
Pukao Hats Cleaning Services Ltd.
jxid
Posts: 17
Joined: Sun Apr 05, 2020 12:27 pm
Answers: 1

Re: STM32F103C8 and NEO-M6N gps module

Post by jxid »

Can you please sent the code for M7N?
I would like to test it.
User avatar
Pito
Posts: 94
Joined: Tue Dec 24, 2019 1:53 pm

Re: STM32F103C8 and NEO-M6N gps module

Post by Pito »

My code sets the output of the 1PPS to 20kHz, that is all. It does not read anything off the NEO.

There are examples in the TinyGPS++ library - it should work when all wired properly.

Also doublecheck the diodes - that is the best indicator. Confirm they work.

For example write a simple loop sending "Hello World" via Serial1 configured 9600 once a second and you should see the Serial1_TX led blink shortly once a second. If not working that way you do something wrong..

Code: Select all

void setup() {
    Serial1.begin(9600);
    Serial.begin(115200);
    delay(2000);
}

void loop() {
    Serial.println("Hello World!!");  // prints out in terminal
    Serial1.println("Hello World!!");  // Serial1_TX line LED blinks shortly once per second
    delay(1000);
}
Pukao Hats Cleaning Services Ltd.
jxid
Posts: 17
Joined: Sun Apr 05, 2020 12:27 pm
Answers: 1

Re: STM32F103C8 and NEO-M6N gps module

Post by jxid »

Friend Pito thanks for your help.
Suddenly the project works as it should.
I didn't change anything exept from removing the delay at "no gps data" (the first delay in my code)
User avatar
Pito
Posts: 94
Joined: Tue Dec 24, 2019 1:53 pm

Re: STM32F103C8 and NEO-M6N gps module

Post by Pito »

Great, even I recommended to you to better remove both delays() in the loop() :P
Pukao Hats Cleaning Services Ltd.
jxid
Posts: 17
Joined: Sun Apr 05, 2020 12:27 pm
Answers: 1

Re: STM32F103C8 and NEO-M6N gps module

Post by jxid »

Pito wrote: Sun Apr 05, 2020 5:49 pm Great, even I recommended to you to better remove both delays() in the loop() :P
Thanks for everything friend.
jxid
Posts: 17
Joined: Sun Apr 05, 2020 12:27 pm
Answers: 1

Re: STM32F103C8 and NEO-M6N gps module

Post by jxid »

Tried my sketch with M6N M7N and M8N.
Everything works fine.
I display the data in a 240X240 display.
Post Reply

Return to “Projects”