+ Post New Thread
Results 1 to 4 of 4
  1. #1
    Newbie level 4
    Points: 1,040, Level: 7

    Join Date
    Nov 2010
    Posts
    5
    Helped
    0 / 0
    Points
    1,040
    Level
    7

    Simulation error of CAN BUS on proteus using PIC18F458.

    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.

    •   AltAdvertisment

        
       

  2. #2
    Newbie level 1
    Points: 160, Level: 2

    Join Date
    Feb 2012
    Posts
    1
    Helped
    0 / 0
    Points
    160
    Level
    2

    Re: Simulation error of CAN BUS on proteus using PIC18F458.

    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



    •   AltAdvertisment

        
       

  3. #3
    Full Member level 1
    Points: 919, Level: 6
    manikandanshine's Avatar
    Join Date
    Aug 2012
    Location
    india
    Posts
    105
    Helped
    8 / 8
    Points
    919
    Level
    6

    Re: Simulation error of CAN BUS on proteus using PIC18F458.

    Is it possible for doing can protocol simulation in proteus?
    Thanks and Regards,
    MANIKANDANSHINE



    •   AltAdvertisment

        
       

  4. #4
    Banned
    Points: 23,048, Level: 36

    Join Date
    Dec 2012
    Location
    Bangalore, India
    Posts
    4,294
    Helped
    828 / 828
    Points
    23,048
    Level
    36

    Re: Simulation error of CAN BUS on proteus using PIC18F458.

    Zip and post the mikroC project files and Proteus file. Try clearing CANSTAT register.



--[[ ]]--