??? 09/28/06 10:56 Read: times |
#125271 - Would have been great if it was in C Responding to: ???'s previous message |
Hello Russell,
Thank you very much indeed, for your response. I think you have posted similar code to an AVR forum a couple of years ago, I saw that while searching the net, unfortunately I am now out of touch with assembler, I was once a die hard assembler fan (with Z80, 8088 and 8031) but now I prefer C. The code you have posted would have been great if it was in C. Beware of atomicity issues - if you don't know what they are, you'd best learn as they apply here. This code ran under a co-operative tasker so modbus register accesses were mutually exclusive between the process_modbus code and the read/write_modbus_reg code. Ignore the above comments at your own peril. I know somewhat about the atomcity issue now, since this came up on my browser, while I was searching stuff about circular buffers, my intention was to receive and transmit modbus frames through circular buffers, instead of processing them in the interrupts, but circular buffer may add more complication to the modbus code in that case I may not use them. I have now began to understand the main points about the modbus protocol, and as I implement them in C, I will have to understand them completely, for it to work correctly and reliably and to maintain the code in the future. Regards, John. |
Topic | Author | Date |
Modubus code... Russell Bull | 01/01/70 00:00 | |
Life's like that! | 01/01/70 00:00 | |
Tell me more... | 01/01/70 00:00 | |
commercial application... Yes! | 01/01/70 00:00 | |
Modbus code | 01/01/70 00:00 | |
Would have been great if it was in C | 01/01/70 00:00 | |
Free is what free gets | 01/01/70 00:00 | |
Thanks anyway | 01/01/70 00:00 | |
modbus in c | 01/01/70 00:00 | |
Read the above. | 01/01/70 00:00 | |
yes, but | 01/01/70 00:00 | |
I dont mind... | 01/01/70 00:00 | |
Happiness | 01/01/70 00:00 | |
Oh! yes great joy..... | 01/01/70 00:00 |