Good day all. I design a circuit that requires RG4 and RG3 be used as RTS and CTS flow control. Under properties for the RS232 component
I don't have G as an optional port. The board for my circuit is already done. Is there a way I can use the G port for my flow control pins?
Thanks in advance.
Ondra
18F6722 RS232 flow control, is this a bug?
Moderator: Benj
Re: 18F6722 RS232 flow control, is this a bug?
The 18F6722 has two EUSART's EUSART1 is on port RC6 (RX) and RC7 (TX) EUSART2 is on port RG1 (RX) and RG2 (TX)
If you want to use flow control you are able to select any pin of the ports A-E The flow control pins are user selectable.
If you want to use flow control you are able to select any pin of the ports A-E The flow control pins are user selectable.
Re: 18F6722 RS232 flow control, is this a bug?
When I designed the board I used G3 and G4 for my flow control pins. Is there no way to access them, maybe by changing the FCD file for that chip and if so, what and where do I make the changes?
Ondra
Ondra
- 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: 18F6722 RS232 flow control, is this a bug?
Hello Ondra,
Yes this is a bug with the RS232 component properties not allowing any ports past PortE.
To get around this you can use the code customisation feature.
Select the RS232 component and then click the edit code button,
Select the Defines code section and click edit.
Find the following lines in the defines section.
Then change these to make them relevant for your hardware. eg.
Note that you will still have to enable the flow control in the component properties. The port and pin values shown in the properties page will be overridden by your values.
Yes this is a bug with the RS232 component properties not allowing any ports past PortE.
To get around this you can use the code customisation feature.
Select the RS232 component and then click the edit code button,
Select the Defines code section and click edit.
Find the following lines in the defines section.
Code: Select all
#define %m_RTS_PORT %a
#define %m_RTS_TRIS %b
#define %m_CTS_PORT %c
#define %m_CTS_TRIS %d
#define %m_RTS_PIN %e
#define %m_CTS_PIN %f
Code: Select all
#define %m_RTS_PORT portg
#define %m_RTS_TRIS trisg
#define %m_CTS_PORT portg
#define %m_CTS_TRIS trisg
#define %m_RTS_PIN 4
#define %m_CTS_PIN 3
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: 18F6722 RS232 flow control, is this a bug?
Hi Benj.
I spent the better part to the day trying to get the USART 2 working with now success. I tried Receiving without using flow control and had no success. Using a scope I can see that the data is at the pin. At 9600 the bit width is .11ms. I think there maybe more issues with USART 2 on this PIC, could it be that the inability to select the G port for flow control also goes for the TX and RX as well? Could someone have a look at this? It's got me at a stand still. Thanks in advance.
Ondra
I spent the better part to the day trying to get the USART 2 working with now success. I tried Receiving without using flow control and had no success. Using a scope I can see that the data is at the pin. At 9600 the bit width is .11ms. I think there maybe more issues with USART 2 on this PIC, could it be that the inability to select the G port for flow control also goes for the TX and RX as well? Could someone have a look at this? It's got me at a stand still. Thanks in advance.
Ondra
Re: 18F6722 RS232 flow control, is this a bug?
OK. forget about what I said earlier. I got it working. Oscillator was set to HS-PLL I set it to HS and it worked.
Ondra
Ondra
- 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: 18F6722 RS232 flow control, is this a bug?
Hi Ondra,
Phew, you had me a bit worried there for a minute. Thanks for letting us know the problem is resolved.
Phew, you had me a bit worried there for a minute. Thanks for letting us know the problem is resolved.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel