treyz
Member level 5
Hi Everyone,
I am writting my code on c18 compiler from Mplab,
I am sending a frame: stx-address-data-checksum-etx. The frame is done and I am able to send it via RS232 from PC to a PIC 18f4680.
The things is according to the value of "address",the position of "address" might changes such as if address is equal to zero, send out (from the PIC via SPI)the frame as it is, but if it is greater than 0(between 1 and 99), send it out like that : address-stx-data-checksum-etx.
I don't know how to do it in C, Does anyone have a template that I can use, or something similar to that then I can start from scratch?
Thanks
I am writting my code on c18 compiler from Mplab,
I am sending a frame: stx-address-data-checksum-etx. The frame is done and I am able to send it via RS232 from PC to a PIC 18f4680.
The things is according to the value of "address",the position of "address" might changes such as if address is equal to zero, send out (from the PIC via SPI)the frame as it is, but if it is greater than 0(between 1 and 99), send it out like that : address-stx-data-checksum-etx.
I don't know how to do it in C, Does anyone have a template that I can use, or something similar to that then I can start from scratch?
Thanks