Dear Andre
i need the sample code for implementing modbus slave on a PIC16F877A
please help me
Dear Andre
i need the sample code for implementing modbus slave on a PIC16F877A
please help me
Dear Andre
thank you for the code you have posted,actually i am trying to use the PIC16F877A
another thing i have copy and pasted your code to proton+ compiler and i got some error messages one of them was
for this part of the code:
IF CRC16.Bit0=1 Then '<------ error here is saying Invalid Cast for this type of variable
CRC16=$A001^(CRC16>>1)
Else
CRC16=CRC16>>1
EndIF
i don't know what does that means,please help me.
Best Regards
First of all this is PBP forum list not Proton.
Second, as this is PBP, all examples are for this compiler. The syntax is a little different.
The syntax of the line IF CRC16.Bit0=1 Then means: Set bit 0 of the word variable CRC16.
You have to open your manual and find how this can be accomplished in your Compiler.
Ioannis
Daer Andre
can you please post the circuit schematic for such code?
i want to know what is the use for the
PORTB.4 = 1
PORTB.5 = 0
any clue?
best regards
Have you read the document emplementing modbus on serial comms,
You can get it at www.modbus.org
Dear Andre
yes i have the modbus specification.
but these pins or at least PortB.5 is not something related to the specification,i think it is related to RS485 handshaking (correct me if i am wrong).
is it correct?and which pin it is connected to?
Bookmarks