Hello,
I have a program that uses parallel task processing feature of M2 and would like to send UART data with 9600 Bd with serout command.
As far as I understand, programs with parallel task processing automatically use 16 MHz clock frequency, but using N9600_16 results in a baudrate of 2400 Bd. Unfortunately, N9600_4 is not available.
Is there any trick to configure 9600 Bd?
Thanks.
I have a program that uses parallel task processing feature of M2 and would like to send UART data with 9600 Bd with serout command.
As far as I understand, programs with parallel task processing automatically use 16 MHz clock frequency, but using N9600_16 results in a baudrate of 2400 Bd. Unfortunately, N9600_4 is not available.
Is there any trick to configure 9600 Bd?
Thanks.
Code:
#picaxe 08m2
symbol P_SEROUT = C.0
symbol P_LED = C.2
#define LED_OFF high P_LED
#define LED_ON low P_LED
start0:
task0_loop:
serout P_SEROUT,N9600_16,("Test",cr,lf) ; N9600_16 results in only 2400 Bd
pause 1000
goto task0_loop
start1:
task1_loop:
LED_OFF
pause 500
LED_ON
pause 500
goto task1_loop