Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 19:38 27 Nov 2024 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 : Serial Communication

Author Message
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1873
Posted: 03:11am 20 Sep 2023
Copy link to clipboard 
Print this post

MM V5.05.05 throws an error if INV is used with the OPEN command. From the manual pg. 85
  Quote  Five options can be added to the end of 'comspec$' These are DE, 9BIT, INV, OC and S2:
.
I suspect it is an obsolete command and has been inadvertently left in the manual.
Edited 2023-09-20 13:12 by palcal
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6100
Posted: 03:27am 20 Sep 2023
Copy link to clipboard 
Print this post

I think that INV was only relevant where the hardware supported it.

Jim
VK7JH
MMedit   MMBasic Help
 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1873
Posted: 03:32am 20 Sep 2023
Copy link to clipboard 
Print this post

I have a VK2828U7G5LF that works OK with a Micromite, I also have a VK2828U8G5LF, thats with a U8 not U7 it will not work with the Micromite but works OK with a Picomite using the GPS function. What's the difference.
"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 Kingdom
Posts: 6798
Posted: 06:41am 20 Sep 2023
Copy link to clipboard 
Print this post

INV is usually an option on a "proper" UART or USART but not on a "serial communications module" or whatever they like to call it. If something has a true UART or USART module built in then it may well be supported. If it's only a simulated UART then it may not. What it does, of course, is to allow TXD and/or RXD to be inverted so that they can be connected to inverting line drivers and/or receivers.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2135
Posted: 07:58am 20 Sep 2023
Copy link to clipboard 
Print this post

If memory serves, the PIC32 hardware serial ports can use the INV option to allow connection to RS232 gear using just rudimentary level conversion. Often just a resistor in the MM2 RX line.
I have used it in the past when connected to a laptop for the console.
Perhaps INV is only available on COM1:

If your modules work on a Pico then they must be TTL serial and don't require inversion.

Edit
INV should also be available on COM2: but not on any "Embedded C Module" ports.
Edited 2023-09-20 18:06 by phil99
 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1873
Posted: 08:24am 20 Sep 2023
Copy link to clipboard 
Print this post

Yes INV is only available on COM1: and I am using COM2:, which explains the error. I will try COM1: with INV and the GPS module that did not work on COM2: and see if it works.
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2135
Posted: 08:37am 20 Sep 2023
Copy link to clipboard 
Print this post

Just tested a MM2 and INV does not throw an error on COM2 if you do it like this:-
> OPEN "COM2:9600",inv as #2
>

The manual shows it should be like this OPEN "COM2:9600, INV" AS #2 but that gives:- Error : COM specification

Have not tested for actual inversion yet.

Edit

Now I see it in the manual, COM1 only!
Edited 2023-09-20 18:54 by phil99
 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1873
Posted: 01:03am 22 Sep 2023
Copy link to clipboard 
Print this post

OK I finally got this sorted the VK2828U8 version did not work because the sentence we have to look for is not GPRMC but GNRMC
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2135
Posted: 01:17am 22 Sep 2023
Copy link to clipboard 
Print this post

the sentence we have to look for is not GPRMC but GNRMC

Good to know. Will have to update my old MM+ and MM2 programs.
 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1873
Posted: 01:20am 22 Sep 2023
Copy link to clipboard 
Print this post

Well not yet, I just unplugged from my computer and put on a 5v charger and it has stopped working. I'll look some more but getting close to giving up. I have one of these U8 versions working OK with Geoff's GPS tracker ???
"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: Australia
Posts: 1873
Posted: 01:57am 22 Sep 2023
Copy link to clipboard 
Print this post

I'll give up on this, it works sometimes and not others, maybe a problem with the module.
Edit... still don't understand why it runs on a Picomite OK.
Edited 2023-09-22 12:40 by palcal
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
Print this page


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

© JAQ Software 2024