Communication RX TX pins

Please add any feature requests for Flowcode version 7 here

Moderator: Benj

Post Reply
medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Communication RX TX pins

Post by medelec35 »

With RS232, HC05/06 etc can an option to disable RX or TX be implemented.
For example I'm using 12F1840 and using RX only.
If we can select disable TX then that would free an additional pin.
I have had to do that manually with a Ccode block with

Code: Select all

clear_bit(TXSTA,5);

Would be nice if automated.

Martin
Martin

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Communication RX TX pins

Post by Benj »

Thanks Martin,

I'm having a quick go to see if I can build this into the v8 UART CAL then we can expose it in any components that would suit the option to disable RX or TX.

Also going in is the ability to easily switch the CAL component on or off. This should make multi CAL components much easier to build for example modules that support multiple interfaces - I2C/SPI/UART.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Communication RX TX pins

Post by medelec35 »

Looking further in to this today.
I'm not sure if its even possible?
With

Code: Select all

clear_bit(TXSTA,5); 
the TX is disabled and the o/p drops to 0.
So I would assume output will now work?
Wrong.
Looks like with

Code: Select all

SPEN = 1
there is no i/p or o/p control.
With

Code: Select all

SPEN = 0
i/p & o/p is given control but RX will stop working.

Any idea on how to just use RX and allow the TX to be a controllable i/p or o/p?

Left in features as if it can't be done then this feature request is not possible.
Martin

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Communication RX TX pins

Post by Benj »

Hi Martin,

Hmm I would have thought just clearing the TXEN bit would have done it but if this isn't working then it may be as you say that both pins are always used even if they are not enabled. I've put this code in v8 but not given it a good test yet so I'll try and get onto this for you and see what's possible.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Communication RX TX pins

Post by medelec35 »

Thanks Ben,
I appreciate that.
Martin

Post Reply