Hello Kiste,

I use Termite to check what flows in my comm line.
Here's what I see and makes my project work good enough, using 
serial_software (small extract):

09 00 ed ef 2a f1 09 00 ed ef 2a f1 09 00 ed ef  ..íï*ñ..íï*ñ..íï
2a f1 09 00 ed ef 2a f1 09 00 ed ef 2a f1 09 00  *ñ..íï*ñ..íï*ñ..
ed ef 2a f1 09 00 ed ef 2a f1 09 00 ed ef 2a f1  íï*ñ..íï*ñ..íï*ñ
09 00 ed ef 2a f1 09 00 ed ef 2a f1 09 00 ed ef  ..íï*ñ..íï*ñ..íï
2a f1 09 00 ed ef 2a f1 09 00 ed ef 2a f1 09 00  *ñ..íï*ñ..íï*ñ..
ed ef 2a f1 09 00 ed ef 2a f1 09 00 ed ef 2a f1  íï*ñ..íï*ñ..íï*ñ
09 00 ee ef 2a f1 09 00 ed ef 2a f1 09 00 ed ef  ..îï*ñ..íï*ñ..íï
2a f1 09 00 ed ef 2a f1 09 00 ed ef 2a f1 09 00  *ñ..íï*ñ..íï*ñ..
ed ef 2a f1 09 00 ed ef 2a f1 09 00 ed ef 2a f1  íï*ñ..íï*ñ..íï*ñ
09 00 ed ef 2a f1 09 00 ed ef 2a f1 09 00 ed ef  ..íï*ñ..íï*ñ..íï
2a f1 09 00 ed ef 2a f1 09 00 ed ef 2a f1 09 00  *ñ..íï*ñ..íï*ñ..
ed ef 2a f1 09 00 ee ef 2a f1 09 00 ee ef 2a f1  íï*ñ..îï*ñ..îï*ñ
09 00 ed ef 2a f1 09 00 ed ef 2a f1 09 00 ed ef  ..íï*ñ..íï*ñ..íï
2a f1 09 00 ed ef 2a f1 09 00 ed ef 2a f1 09 00  *ñ..íï*ñ..íï*ñ..

Now here's what I see using serial_hardware: 

9a f1 81 80 f5 ef 92 f1 81 80 fd ef 9a f1 81 80  šñ €õï’ñ €ýïšñ €
f5 ef 9a f1 81 80 f6 ef 9a f1 89 80 fd ef 9a f1  õïšñ €öïšñ‰€ýïšñ
89 80 fe ef 9a f1 89 80 fd ef 9a f1 89 80 f5 ef  ‰€þïšñ‰€ýïšñ‰€õï
92 f1 81 80 f5 ef 9a f1 81 80 f5 ef 92 f1 89 80  ’ñ €õïšñ €õï’ñ‰€
f5 ef 9a f1 81 80 f5 ef 9a f1 81 80 fd ef 9a f1  õïšñ €õïšñ €ýïšñ
89 80 fe ef 9a f1 89 80 fd ef 9a f1 89 80 fd ef  ‰€þïšñ‰€ýïšñ‰€ýï
9a f1 89 80 f5 ef 92 f1 81 80 fd ef 9a f1 89 80  šñ‰€õï’ñ €ýïšñ‰€
fd ef 9a f1 81 80 fd ef 92 f1 89 80 fe ef 9a f1  ýïšñ €ýï’ñ‰€þïšñ
81 80 fd ef 9a f1 89 80 f5 ef 9a f1 81 80 fd ef   €ýïšñ‰€õïšñ €ýï
9a f1 81 80 fe ef 9a f1 81 80 f5 ef 9a f1 89 80  šñ €þïšñ €õïšñ‰€
f5 ef 9a f1 81 80 ed ef 9a f1 81 80 f5 ef 9a f1  õïšñ €íïšñ €õïšñ
89 80 fd ef 9a f1 89 80 f6 ef 92 f1 89 80 fe ef  ‰€ýïšñ‰€öï’ñ‰€þï
92 f1 89 80 fd ef 92 f1 81 80 fe ef 92 f1 89 80  ’ñ‰€ýï’ñ €þï’ñ‰€
f5 ef 9a f1 81 80 fe ef 92 f1 89 80 fd ef 9a f1  õïšñ €þï’ñ‰€ýïšñ
81 80 fd ef 8a f1 89 80 fd ef 92 f1 81 80 fd ef   €ýïŠñ‰€ýï’ñ €ýï
92 f1 81 80 fd ef 9a f1 81 80 ed ef 92 f1 89 80  ’ñ €ýïšñ €íï’ñ‰€

Finally, here's what I see using serial_hardware, inverted data in 
serial_hw_write function ("TXREG = !data"):

82 90 e5 8e fe ff 82 90 e5 8e f6 ff 8a 90 ed 8e  ‚ åŽþÿ‚ åŽöÿŠ íŽ
fe ff 8a 90 ed 8e fe ff 8a 90 e5 8e fe ff 89 90  þÿŠ íŽþÿŠ åŽþÿ‰ 
e5 8e fe ff 82 90 e5 8e f6 ff 81 90 ed 8e f6 ff  åŽþÿ‚ åŽöÿ  íŽöÿ
82 90 ed 8e f6 ff 8a 90 e5 8e f6 ff 82 90 ed 8e  ‚ íŽöÿŠ åŽöÿ‚ íŽ
f6 ff 8a 90 ed 8e fe ff 82 90 e5 8e f6 ff 81 90  öÿŠ íŽþÿ‚ åŽöÿ  
ed 8e f6 ff 82 90 e5 8e f6 ff 82 90 e5 8e fe ff  íŽöÿ‚ åŽöÿ‚ åŽþÿ
8a 90 e5 8e f6 ff 8a 90 e5 8e f6 ff 82 90 ed 8e  Š åŽöÿŠ åŽöÿ‚ íŽ
f6 ff 82 90 e5 8e fe ff 81 90 e5 8e fe ff 82 90  öÿ‚ åŽþÿ  åŽþÿ‚ 
ed 8e fe ff 82 90 ed 8e fe ff 8a 90 ed 8e fe ff  íŽþÿ‚ íŽþÿŠ íŽþÿ
82 90 e5 8e fe ff 82 90 ed 8e fe ff 82 90 e5 8e  ‚ åŽþÿ‚ íŽþÿ‚ åŽ
fe ff 8a 90 e5 8e f6 ff 82 90 ed 8e fe ff 82 90  þÿŠ åŽöÿ‚ íŽþÿ‚ 
e5 8e fe ff 82 90 e5 8e fe ff 82 90 e5 8e f6 ff  åŽþÿ‚ åŽþÿ‚ åŽöÿ
82 90 e5 8e f6 ff 81 90 ed 8e f6 ff 8a 90 ed 8e  ‚ åŽöÿ  íŽöÿŠ íŽ
f6 ff 82 90 e5 8e f6 ff 8a 90 e5 8e f6 ff 89 90  öÿ‚ åŽöÿŠ åŽöÿ‰ 
ed 8e f6 ff 8a 90 e5 8e fe ff 82 90 ed 8e fe ff  íŽöÿŠ åŽþÿ‚ íŽþÿ
82 90 ed 8e f6 ff 82 90 e5 8e f6 ff 82 90 e5 8e  ‚ íŽöÿ‚ åŽöÿ‚ åŽ

It seems serial_hardware is not transmitting same data.
Any help would be great.
Thank you.

Cheers,
Filipe Santos

On Sunday, May 15, 2022 at 6:57:39 AM UTC+1 Kiste wrote:

> Hi Filipe,
>
> If serial_software works with "const bit serial_sw_invert = true", then 
> serial_hardware should also work. serial_software supports the non-inverted 
> mode, the uart hardware in newer PICs also supports the non-inverted mode, 
> but the serial_hardware library does not yet support that mode natively.
>
> Have you tried single chars with time in between?
>
> forever loop
>    serial_hw_data="@"
>    delay_1s(1)
> end loop
>
> This loop transmits a start bit and a single set data bit every second. 
> From the results you're seeing on the PC, the error might be narrowed down.
>
> Greets,
> Kiste
>
>
> Am Samstag, 14. Mai 2022, 22:58:28 MESZ hat flyway38 <[email protected]> 
> Folgendes geschrieben: 
>
>
> Hi to all,
>
> Have been using serial_software library with enough success until now.
> Am coding for use a TTL-232R-5V-AI USB Cable to connect to computer.
> Using serial_software library with invert bit activated, am getting good 
> results.
> It all works good enough sending data to computer
> The problem with this library is while receiving data from computer. As 
> soon as this funcion is activated in PIC code, the library locks in a loop 
> waiting for data.
> So, started to migrate my code for use with serial_hardware library 
> instead, to avoid this lock.
> But now I get Frame Error from COMM PORT with not usefull data, all the 
> time. Even if I invert data received. Have also tried different baud rates, 
> etc...
> Can anyone help about this issue?
> Thank you very much.
>
> Kind regards,
> Filipe Santos.
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "jallib" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jallib/ac896057-cc8b-40e2-9e84-5cc7d7843640n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/jallib/ac896057-cc8b-40e2-9e84-5cc7d7843640n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jallib/1c5acd16-71a0-4b4f-b5a8-f156ebc81377n%40googlegroups.com.

Reply via email to