![]() |
Forum Index : Microcontroller and PC projects : COM port problems_PICO
Author | Message | ||||
palcal![]() Guru ![]() Joined: 12/10/2011 Location: AustraliaPosts: 1993 |
OK, loaded beta 19. I have two Picos, the main one is receiving GPS data as well as WIFI from a HC-12 module. The HC-12 is getting weather information from the second Pico. I have the GPS on COM2 Pins 6,7 and the WIFI on COM1 Pins 1,2 Problem is COM1 is receiving data meant for COM2. I'll see if I can come up with a short piece of code to demonstrate. "It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all" |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7938 |
It might be an idea to cross connect the ports, COM1 TX to COM2 RX and vice versa then send from one to the other. That would test from the hardware upwards. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6283 |
Is the reverse happening? COM1 data (WIFI) appearing on COM2. Can you just connect the GPS and test to see if there is activity on both sets of pins with a CRO to eliminate physical crosstalk? Software people always blame the hardware (and visa-versus) Its a bugger when you try to be both... Jim VK7JH MMedit |
||||
palcal![]() Guru ![]() Joined: 12/10/2011 Location: AustraliaPosts: 1993 |
COM2 was working OK. I had both Com ports open at the same time, I have now altered the code to OPEN and CLOSE as they are needed. but a different problem I have SetPin GP4, GP5, COM2 SetPin GP0, GP1, COM1 and when I run I get Edited 2021-09-20 08:18 by palcal "It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all" |
||||
palcal![]() Guru ![]() Joined: 12/10/2011 Location: AustraliaPosts: 1993 |
Well it turned out to be another stupid mistake on my part. I have used two different lots of code one was for GPS the other for weather. Both originally used 'COM1 as #1'. I changed one of them to 'COM2 as #2' but didn't go through the code and change all the instances of #1 to #2. All now running as it should. I must also say a big thanks to Geoff and especially Peter for all the hard work. I'm in my twilight years and without the MM and Pico to play with I don't know where I would be. Edited 2021-09-20 16:12 by palcal "It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all" |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7938 |
No need to apologize. :) These things are certainly good brain exercise and in this case it's doing its job well! Peter: It would be nice if the error message referred to COM1 rather than UART0. :) Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10315 |
Glad its all working now. Following discussion with Geoff we agreed for compatibility with other MMBasic variants to move from COM0/COM1 to COM1/COM2 so making the change was always going to cause a bit of disruption and it wasn't impossible I'd missed something. NO FURTHER CHANGES - PROMISE Will do |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |