Log in

View Full Version : trick with Serin



Marcick
- 20th May 2024, 12:50
Hi all,
I'm running a PIC18F67K22 at 4MHz (define OSC 4) and using this command to read serial data at 9600bps


Serin2 Gps_tx, T9600,4000,cnerr,[.........

no problems at all, but in some situation I activate the PLL (so running at 16MHz) because I need to run faster for some particular tasks ("Pause xxx" here and there take account of this).
In this situation, I would expect that using this other Serin parameters would work same way to read at 9600 with the same 4 sec timeout, but it does not work ...



Serin2 Gps_tx, T2400,16000,cnerr

Where is my mistake ?

Marcick
- 20th May 2024, 14:10
No mistake, it works, sorry (you can delete the post eventually)

Ioannis
- 20th May 2024, 20:30
By the way, why don't you use the USART and Hserin/Hserout commands?

Ioannis