UART (RS232) PIC16F1937 & 1939 FC10

Any bugs you encounter with Flowcode should be discussed here.
Post Reply
simon-sandtcontrols
Posts: 43
http://meble-kuchenne.info.pl
Joined: Sun Mar 21, 2021 3:56 pm
Has thanked: 5 times
Been thanked: 7 times

UART (RS232) PIC16F1937 & 1939 FC10

Post by simon-sandtcontrols »

Hi Ben,

I have just gone to use the UART (RS232) component in FC10 with the PIC 1937 and discovered that the Tx Pin is incorrect and the Rx shows unconnected, both of which are greyed out and can not be changed. I tried changing to the PIC16F1939 as well and that's the same, that's as far as I went.

I have used this component may times in FC9 quite successfully and started questioning myself, but with no joy, I have reverted back to FC9 for the program I need to write this evening and that's fine, so I think this is a bug. Any chance you could have a look, please. Its a component and PIC I use a lot.

I have attached screenshots of FC9 & FC10.



Many Thanks.

Simon
Attachments
FC10 UART.png
FC10 UART.png (203 KiB) Viewed 11674 times
FC9 UART.png
FC9 UART.png (203.44 KiB) Viewed 11674 times

medelec35
Matrix Staff
Posts: 1956
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 626 times
Been thanked: 657 times

Re: UART (RS232) PIC16F1937 & 1939 FC10

Post by medelec35 »

Hello.
Within properties, you need to select either software or channel before the pins can be allocated.
It is selected for FC9, but it's blank for FC10
Martin

simon-sandtcontrols
Posts: 43
Joined: Sun Mar 21, 2021 3:56 pm
Has thanked: 5 times
Been thanked: 7 times

Re: UART (RS232) PIC16F1937 & 1939 FC10

Post by simon-sandtcontrols »

Thanks Martin,

Yep, that's it, I don't think I have ever looked at that property on any of the previous versions and it didn't enter my mind to try it.

Simon.

medelec35
Matrix Staff
Posts: 1956
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 626 times
Been thanked: 657 times

Re: UART (RS232) PIC16F1937 & 1939 FC10

Post by medelec35 »

You're welcome.
At least you are all sorted now.
Martin

Lambra
Posts: 11
Joined: Thu Nov 24, 2022 11:55 pm
Been thanked: 1 time

Re: UART (RS232) PIC16F1937 & 1939 FC10

Post by Lambra »

Hello folks... now one problem I have encountered.. I dunno how to rectify it.. BUT.. my project needs to send number digits.. 0 thru 9.. inclusive.
so I would also use in FC9 only.. When I made my program transmit the digit 1..which is decimal 49 ASCII .. my oscilloscope (real scope - 1054Z from Rigol) - showed up.. the correct bit pattern, on the scope.. showing the LSB bit first from left to right across the screen. So the MSB was on the right side. I did this for digits 1 through 9 .. and all correct.. When I sent the digit 0 ... the incorrect bit pattern was sent out to the scope.!!
Also .. characters A through F ... like are decimal 65 through 70 .. are all correct.. When I send 64 decimal.. I do not get the correct bit pattern for 64.. I think '@' ...
SO can someone please check this out for me... ??
thanking all folks...
kindest regards
Lambra..

Lambra
Posts: 11
Joined: Thu Nov 24, 2022 11:55 pm
Been thanked: 1 time

Re: UART (RS232) PIC16F1937 & 1939 FC10

Post by Lambra »

Hello folks.. again .. it is Lambra ...and now I asking for someone to help me with a simple solution... The UART sends out characters as bits.. from LSB to MSB .. Can anyone show me... please .. a simple routine.. to probably store each bit into a different variable say.. then when all bits are saved.. then to help me send out my program ...these bits.. MSB first through to LSB ..
I appreciate that bits maybe right shifted .. etc etc.. but .. how do I convert the UART output into bits .. easily..?? then also to skip.. (get rid of) the .. start or stop bits as well..??
Kindest Regards
Lambra..

chipfryer27
Valued Contributor
Posts: 1575
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 357 times
Been thanked: 560 times

Re: UART (RS232) PIC16F1937 & 1939 FC10

Post by chipfryer27 »

Hi

I don't think any of the two posts above should be in the bug report sections as I don't believe they are bugs. I find it hard to believe that the UART component would suddenly change the way it performs during a transmission. More likely finger trouble or a dodgy connection somewhere. Screenshots showing the alleged crime would be helpful.

As for reversing the sequence the bits are sent, why would you need that? Also, any overhead such as Start/Stop are removed for you as part of the protocol.

Sounds like you wish to write your own protocol. Good luck :)

Regards

Post Reply