hi every one.
i am new to rtx51. i have one doubt as follows:
if i have a round robin time slice of 5msec. and my code is:
job1 () _task_ 1 { while (1) { counter1++; os_wait (K_TMO, 5, 0); } }
job2 () _task_ 2 { while (1) { counter2++; os_wait (K_TMO, 3, 0); } }
if the control is in job1.so, counter1 gets incremented and let us assume the time taken for the increment instruction is 2msec. After that because of os_wait it jumps to task2.
My question is, whether the control goes to task2 after 2msec or 5 msec(completion of timeslice)?
Thanks in advance
Hi If You move from poimt-to point (RS232) to network like RS485, You shouldd think about a lot of issues: 1. Who will be a master? how many masters allowed? 2. How to prevent simultaneous transmit? (collisions) 3. How You handle errors?
this is only a small part of problems in networking, even when only 3 nodes in it...
So dont try to create your own protocol, start from something ready, I recommend You ASCII mode MODBUS protocol, it's very simple and reliable. It divides the protocol to transport and application layers good enough, and there are a lot of samples about it implementation.