General discussion relating to the library modules supplied with the compiler
Moderators: David Barker, Jerry Messina
-
Coccoliso
- Posts: 152
- Joined: Mon Feb 17, 2014 10:34 am
Post
by Coccoliso » Mon Jun 23, 2014 12:40 pm
Hello.
Question about SetMode, from help:
Code: Select all
sub SetMode(pMode as byte)
pMode - UART Mode. Can be umTrue, umInverted, umOpen, umOpenTrue, umOpenInverted.
Set the UART mode. By default, mode is set to umInverted.
umInverted is the default..
in this mode the Software UART works like the standard MCU USART or what else for the same signals as polarity?
Thanks.
-
Jerry Messina
- Swordfish Developer
- Posts: 1473
- Joined: Fri Jan 30, 2009 6:27 pm
- Location: US
Post
by Jerry Messina » Mon Jun 23, 2014 1:31 pm
Setting the mode to 'umTrue' will make the signals work like the standard USART peripheral, where the TX pin idles high.
Are you sure you really want to use the software UART? All of the timing is done using software delays, so TX usually works "ok", but RX almost never works.
-
Coccoliso
- Posts: 152
- Joined: Mon Feb 17, 2014 10:34 am
Post
by Coccoliso » Tue Jun 24, 2014 11:26 am
OK Jerry.
The MPU USART is used to directly drive an RS232 TTL GSM module.
I want only debug using Software UART and wait only some small responses from MPU.
So all right by setting the Software UART mode to "umTrue".
Thanks.
-
Coccoliso
- Posts: 152
- Joined: Mon Feb 17, 2014 10:34 am
Post
by Coccoliso » Wed Jun 25, 2014 12:11 pm
Great suggestion,
exactly what I want, no other connector to add
.. thanks Jon