yuenkit
Advanced Member level 4
Hi,
I need help to code Asynchronous Transmission Protocol in CCS-C.
I am using one IO pin. So I cann't use "#use rs232" (which use one XMIT and one RCV pin).
Someone told me ppl usually use ASM to code Async protocol, instead of C, because of tight timing.
1. How to code it using C? I know it's possible, but I dont know how to calculate the delay and timing.
2. If i have to use ASM, i will tend to use #ASM which mix with C code. The problem is, It might mess up my code, because C and ASM may use the same memory location, and I don't know in advance where C will use to store data.
Thanks for solving my problem.
I need help to code Asynchronous Transmission Protocol in CCS-C.
I am using one IO pin. So I cann't use "#use rs232" (which use one XMIT and one RCV pin).
Someone told me ppl usually use ASM to code Async protocol, instead of C, because of tight timing.
1. How to code it using C? I know it's possible, but I dont know how to calculate the delay and timing.
2. If i have to use ASM, i will tend to use #ASM which mix with C code. The problem is, It might mess up my code, because C and ASM may use the same memory location, and I don't know in advance where C will use to store data.
Thanks for solving my problem.