View previous topic :: View next topic |
Author |
Message |
Geps
Joined: 05 Jul 2010 Posts: 129
|
MODBUS - 0C Exception |
Posted: Sun Sep 12, 2010 9:59 am |
|
|
Hi,
I have the following setup:
Code: |
Slave Master
PIC18F4520 PIC18F4580 (on CCS CAN development board)
INTRC_IO 16MHz HS 20MHz
B1 - - - - - - - - - - - - - - - - - - - - - - ->B0
B0 - - - - - - - - - - - - - - - - - - - - - - ->B1
|
Where -> represent simple wires as described in the comment block at the top of the programs.
Both are running their respective CCS example programs.
The menu loads, I enter any command and it comes back with 0C exception.
Any ideas on how to resolve it?
Many thanks, |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Sun Sep 12, 2010 12:36 pm |
|
|
0C exception is a Microsoft Windows error. You are undoubtedly running
some Windows application that is generating this error. If it's not the
CCS compiler, then it's some other Windows app, maybe written by you.
But it's not a CCS problem in that case.
Search for this on Google.
Quote: | windows "exception 0C" |
|
|
|
FvM
Joined: 27 Aug 2008 Posts: 2337 Location: Germany
|
|
Posted: Mon Sep 13, 2010 2:18 am |
|
|
Quote: | 0C exception is a Microsoft Windows error |
Hm. I understand, that exception code 12 respectively 0xc is issued by the MODBUS master. This simply means timeout - no answer received. The next step would be to check if the master is actually sending data, if the slave receives it, feels addressed, answers in time, the master gets the answer ... and so on.
Just the ordinary debugging work, programmers do all day. |
|
|
Geps
Joined: 05 Jul 2010 Posts: 129
|
|
Posted: Mon Sep 13, 2010 2:51 am |
|
|
PCM Programmer the 0C Exception is printed in the console directly from the PIC. Changing the error handling code in the program to, for example "Exton" changes this Exton 0C.
Thanks FvM, I'll hook up my logic analyser to it soon as I get back and see what is being sent.
My initial thoughts were it would be conversion to a 18 series PIC from the 16 series as used in the examples. |
|
|
|