Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Simulation error of CAN BUS on proteus using PIC18F458.

Status
Not open for further replies.

mfahadsheikh

Newbie level 4
Joined
Nov 29, 2010
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,312
I copied the code for CAN BUS... from the book "Advanced PIC microcontroller projects"... Dogan Ibrahim... It is compiled and gives no error in MikroC Compiler but when i simulate that program on Proteus, i get an error "Read of Can Controller Register 0x0F6E(CANSTAT) returns last value stored". May anyone help me why this error occurs?
I have tried on my side and found that if i comment the functions used to initialize CAN Controller
e.g //Initialise CAN
CANInitialize(SJW,BRP,Phase_Seg1,Phase_Seg2,Prop_S eg,init_flag);

CANSetOperationMode(CAN_MODE_CONFIG,0xFF);
mask=-1;

CANSetMask(CAN_MASK_B1,mask,CAN_CONFIG_STD_MSG);
CANSetMask(CAN_MASK_B2,mask,CAN_CONFIG_STD_MSG);

CANSetFilter(CAN_FILTER_B2_F3,44,CAN_CONFIG_STD_MS G); //panic id==44
CANSetOperationMode(CAN_MODE_NORMAL,0xFF);

... no error occurs in simulation... else the error sustains... Kindly reply soon.
 

prabu.bang

Newbie level 1
Joined
Feb 2, 2012
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,286
Hi...


When u see this message please reply me.., How did you simulate the CAN protocol in Proteus vsm.., i am using 7.8 version., it doesnot have mcp2551 transeceiver., without MCP2551 can possible to communicate please guide me.., lot of times i tried to make a device in proteus..but i cant do.., Can you help me..

advance thanks to reply


Regards

Karan
 

manikandanshine

Advanced Member level 4
Joined
Aug 15, 2012
Messages
105
Helped
7
Reputation
14
Reaction score
7
Trophy points
1,298
Location
india
Activity points
1,846
Is it possible for doing can protocol simulation in proteus?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top