3 Copy edited (e.g. ref. <http://arduino.cc/en/Main/ArduinoBoardUno>).
source | link

I have been trying to design a functional board which combines the hardware of the Elecrow Arduino UNOUno CAN bus shield with a microcontroller board, which functions like an Arduino except with different hardware. This design can be programmed, with the appropriate software drivers for the Arduino IDE, but it skips over all of the CAN stuff.  

This picture shows the connections between the PIC32 and the MCP2515MCP2515 CAN controller.

schematic diagramSchematic diagram

Ignore everything in the image except the connections that exist between the CAN controller and the PIC32. I have probed some of the serial lines between the two chips and found that there is no clock signal. As such, there is no way the SPI module can be working, except how does the Arduino code run?

void setup()
{
  Serial.begin(115200);
  while (CAN_OK != CAN.begin(CAN_500KBPS))              
    {
      Serial.println("CAN BUS Shield init fail");
      Serial.println("Init CAN BUS Shield again");
      delay(100);
    }

  Serial.println("CAN BUS Shield init ok!");
 
}

Above is just a snippet of the code used to initialize the CAN bus in the Arduino IDE. When the CS bit is set to anything other than 10, the program will just loop through the while loop, wherein it complains that the CAN bus has failed to initialize. In the alternative case, it will simply skip over all the CAN commands as if they weren't in the code and everything else in the program runs fine.  

So as mentioned, I found there was no serial communication between this chip and the controller. In fact, the program switches on globes connected to FET switch circuits when it senses ground at the analog ports. When this occurs, there is a sudden random surge on the clock line, but how can this be possible unless the chip is broken? I said to somebody before that if the SPI module was damaged, wouldn't the entire chip not work? Please note that the text "CAN bus init OK!" does not appear in the serial monitor, when the PCB is connected via USB.  

My next line of reasoning was that perhaps I needed to change the baud rate to match that of the SPI module of the PIC32. It doesn't matter what I change it to, the CAN bus does not initialize. Another engineer looked at the design and noticed that by connecting the MCP2515 to 5V5 V would cause the crossover voltage on the ports to have a VIH too high for the chip to function. This pin was disconnected and connected to 3v33.3 V which should fix part of the problems I was having, but this serial communications problem remains unsolved.

If anyone has any useful hints or experience in this area and could shed some light on it, I'd appreciate it greatly.

Thanks.

I have been trying to design a functional board which combines the hardware of the Elecrow Arduino UNO CAN bus shield with a microcontroller board, which functions like an Arduino except with different hardware. This design can be programmed, with the appropriate software drivers for the Arduino IDE, but it skips over all of the CAN stuff.  

This picture shows the connections between the PIC32 and the MCP2515 CAN controller.

schematic diagram

Ignore everything in the image except the connections that exist between the CAN controller and the PIC32. I have probed some of the serial lines between the two chips and found that there is no clock signal. As such, there is no way the SPI module can be working, except how does the Arduino code run?

void setup()
{
  Serial.begin(115200);
  while (CAN_OK != CAN.begin(CAN_500KBPS))              
    {
      Serial.println("CAN BUS Shield init fail");
      Serial.println("Init CAN BUS Shield again");
      delay(100);
    }

Serial.println("CAN BUS Shield init ok!");
 
}

Above is just a snippet of the code used to initialize the CAN bus in the Arduino IDE. When the CS bit is set to anything other than 10, the program will just loop through the while loop, wherein it complains that the CAN bus has failed to initialize. In the alternative case, it will simply skip over all the CAN commands as if they weren't in the code and everything else in the program runs fine.  

So as mentioned, I found there was no serial communication between this chip and the controller. In fact, the program switches on globes connected to FET switch circuits when it senses ground at the analog ports. When this occurs, there is a sudden random surge on the clock line, but how can this be possible unless the chip is broken? I said to somebody before that if the SPI module was damaged, wouldn't the entire chip not work? Please note that the text "CAN bus init OK!" does not appear in the serial monitor, when the PCB is connected via USB.  

My next line of reasoning was that perhaps I needed to change the baud rate to match that of the SPI module of the PIC32. It doesn't matter what I change it to, the CAN bus does not initialize. Another engineer looked at the design and noticed that by connecting the MCP2515 to 5V would cause the crossover voltage on the ports to have a VIH too high for the chip to function. This pin was disconnected and connected to 3v3 which should fix part of the problems I was having, but this serial communications problem remains unsolved.

If anyone has any useful hints or experience in this area and could shed some light, I'd appreciate it greatly.

Thanks.

I have been trying to design a functional board which combines the hardware of the Elecrow Arduino Uno CAN bus shield with a microcontroller board, which functions like an Arduino except with different hardware. This design can be programmed, with the appropriate software drivers for the Arduino IDE, but it skips over all of the CAN stuff.

This picture shows the connections between the PIC32 and the MCP2515 CAN controller.

Schematic diagram

Ignore everything in the image except the connections that exist between the CAN controller and the PIC32. I have probed some of the serial lines between the two chips and found that there is no clock signal. As such, there is no way the SPI module can be working, except how does the Arduino code run?

void setup()
{
  Serial.begin(115200);
  while (CAN_OK != CAN.begin(CAN_500KBPS))
  {
    Serial.println("CAN BUS Shield init fail");
    Serial.println("Init CAN BUS Shield again");
    delay(100);
  }

  Serial.println("CAN BUS Shield init ok!");
}

Above is just a snippet of the code used to initialize the CAN bus in the Arduino IDE. When the CS bit is set to anything other than 10, the program will just loop through the while loop, wherein it complains that the CAN bus has failed to initialize. In the alternative case, it will simply skip over all the CAN commands as if they weren't in the code and everything else in the program runs fine.

So as mentioned, I found there was no serial communication between this chip and the controller. In fact, the program switches on globes connected to FET switch circuits when it senses ground at the analog ports. When this occurs, there is a sudden random surge on the clock line, but how can this be possible unless the chip is broken? I said to somebody before that if the SPI module was damaged, wouldn't the entire chip not work? Please note that the text "CAN bus init OK!" does not appear in the serial monitor, when the PCB is connected via USB.

My next line of reasoning was that perhaps I needed to change the baud rate to match that of the SPI module of the PIC32. It doesn't matter what I change it to, the CAN bus does not initialize. Another engineer looked at the design and noticed that by connecting the MCP2515 to 5 V would cause the crossover voltage on the ports to have a VIH too high for the chip to function. This pin was disconnected and connected to 3.3 V which should fix part of the problems I was having, but this serial communications problem remains unsolved.

If anyone has any useful hints or experience in this area and could shed some light on it, I'd appreciate it greatly.

2 Removed signature per site rules: https://electronics.stackexchange.com/help/behavior | Added link to information about the mentioned CAN bus shield. Removed "altium" tag - it is just the EDA package being used, but the question isn't about how to use Altium.
source | link

I have been trying to design a functional board which combines the hardware of the elecrow Arduino UNO CAN bus shieldElecrow Arduino UNO CAN bus shield with a microcontroller board, which functions like an arduinoArduino except with different hardware. This design can be programmed, with the appropriate software drivers for the Arduino IDE, but it skips over all of the CAN stuff.

This picture shows the connections between the PIC32 and the MCP2515 CAN controller.

enter image description hereschematic diagram

Ignore everything in the image except the connections that exist between the CAN controller and the PIC32. I have probed some of the serial lines between the two chips and found that there is no clock signal. As such, there is no way the SPI module can be working, except how does the arduinoArduino code run?

void setup()
{
  Serial.begin(115200);
  while (CAN_OK != CAN.begin(CAN_500KBPS))              
    {
      Serial.println("CAN BUS Shield init fail");
      Serial.println("Init CAN BUS Shield again");
      delay(100);
    }

Serial.println("CAN BUS Shield init ok!");

}

Above is just a snippet of the code used to initialize the CAN bus in the Arduino IDE. When the CS bit is set to anything other than 10, the program will just loop through the whilewhile loop, wherein it complains that the CAN bus has failed to initialize. In the alternative case, it will simply skip over all the CAN commands as if they weren't in the code and everything else in the program runs fine.

So as mentioned, I found there was no serial communication between this chip and the controller. In fact, the program switches on globes connected to FET switch circuits when it senses ground at the analog ports. When this occurs, there is a sudden random surge on the clock line, but how can this be possible unless the chip is broken.? I said to somebody before that if the SPI module was damaged, wouldn't the entire chip not work.? Please notnote that the commandtext "CAN bus init OK!" does not appear in the serial monitor, when the PCB is connected via USB.

My next line of reasoning was that perhaps I needed to change the baud rate to match that of the SPI module of the PIC32. It doesn't matter what I change it to, the CAN bus does not initialize. Another engineer looked at the design and noticed that by connecting the MCP2515 to 5V would cause the crossover voltage on the ports to have a VIH too high for the chip to function. This pin was disconnected and connected to 3v3 which should fix part of the problems I was having, but this serial communcationscommunications problem remains unsolved.

If anyone has any useful hints or experience in this area and could shed some light, I'd appreciate it greatly.

Thanks, Simon.

I have been trying to design a functional board which combines the hardware of the elecrow Arduino UNO CAN bus shield with a microcontroller board which functions like an arduino except with different hardware. This design can be programmed, with the appropriate software drivers for the Arduino IDE, but it skips over all of the CAN stuff.

This picture shows the connections between the PIC32 and the MCP2515 CAN controller.

enter image description here

Ignore everything in the image except the connections that exist between the CAN controller and the PIC32. I have probed some of the serial lines between the two chips and found that there is no clock signal. As such there is no way the SPI module can be working except how does the arduino code run?

void setup()
{
  Serial.begin(115200);
  while (CAN_OK != CAN.begin(CAN_500KBPS))              
    {
      Serial.println("CAN BUS Shield init fail");
      Serial.println("Init CAN BUS Shield again");
      delay(100);
    }

Serial.println("CAN BUS Shield init ok!");

}

Above is just a snippet of the code used to initialize the CAN bus in the Arduino IDE. When the CS bit is set to anything other than 10 the program will just loop through the while loop wherein it complains that the CAN bus has failed to initialize. In the alternative case, it will simply skip over all the CAN commands as if they weren't in the code and everything else in the program runs fine.

So as mentioned, I found there was no serial communication between this chip and the controller. In fact the program switches on globes connected to FET switch circuits when it senses ground at the analog ports. When this occurs there is a sudden random surge on the clock line, but how can this be possible unless the chip is broken. I said to somebody before that if the SPI module was damaged wouldn't the entire chip not work. Please not that the command "CAN bus init OK!" does not appear in the serial monitor when the PCB is connected via USB.

My next line of reasoning was that perhaps I needed to change the baud rate to match that of the SPI module of the PIC32. It doesn't matter what I change it to the CAN bus does not initialize. Another engineer looked at the design and noticed that by connecting the MCP2515 to 5V would cause the crossover voltage on the ports to have a VIH too high for the chip to function. This pin was disconnected and connected to 3v3 which should fix part of the problems I was having but this serial communcations problem remains unsolved.

If anyone has any useful hints or experience in this area and could shed some light I'd appreciate it greatly.

Thanks, Simon.

I have been trying to design a functional board which combines the hardware of the Elecrow Arduino UNO CAN bus shield with a microcontroller board, which functions like an Arduino except with different hardware. This design can be programmed, with the appropriate software drivers for the Arduino IDE, but it skips over all of the CAN stuff.

This picture shows the connections between the PIC32 and the MCP2515 CAN controller.

schematic diagram

Ignore everything in the image except the connections that exist between the CAN controller and the PIC32. I have probed some of the serial lines between the two chips and found that there is no clock signal. As such, there is no way the SPI module can be working, except how does the Arduino code run?

void setup()
{
  Serial.begin(115200);
  while (CAN_OK != CAN.begin(CAN_500KBPS))              
    {
      Serial.println("CAN BUS Shield init fail");
      Serial.println("Init CAN BUS Shield again");
      delay(100);
    }

Serial.println("CAN BUS Shield init ok!");

}

Above is just a snippet of the code used to initialize the CAN bus in the Arduino IDE. When the CS bit is set to anything other than 10, the program will just loop through the while loop, wherein it complains that the CAN bus has failed to initialize. In the alternative case, it will simply skip over all the CAN commands as if they weren't in the code and everything else in the program runs fine.

So as mentioned, I found there was no serial communication between this chip and the controller. In fact, the program switches on globes connected to FET switch circuits when it senses ground at the analog ports. When this occurs, there is a sudden random surge on the clock line, but how can this be possible unless the chip is broken? I said to somebody before that if the SPI module was damaged, wouldn't the entire chip not work? Please note that the text "CAN bus init OK!" does not appear in the serial monitor, when the PCB is connected via USB.

My next line of reasoning was that perhaps I needed to change the baud rate to match that of the SPI module of the PIC32. It doesn't matter what I change it to, the CAN bus does not initialize. Another engineer looked at the design and noticed that by connecting the MCP2515 to 5V would cause the crossover voltage on the ports to have a VIH too high for the chip to function. This pin was disconnected and connected to 3v3 which should fix part of the problems I was having, but this serial communications problem remains unsolved.

If anyone has any useful hints or experience in this area and could shed some light, I'd appreciate it greatly.

Thanks.

1
source | link

CAN Controller + PIC32

I have been trying to design a functional board which combines the hardware of the elecrow Arduino UNO CAN bus shield with a microcontroller board which functions like an arduino except with different hardware. This design can be programmed, with the appropriate software drivers for the Arduino IDE, but it skips over all of the CAN stuff.

This picture shows the connections between the PIC32 and the MCP2515 CAN controller.

enter image description here

Ignore everything in the image except the connections that exist between the CAN controller and the PIC32. I have probed some of the serial lines between the two chips and found that there is no clock signal. As such there is no way the SPI module can be working except how does the arduino code run?

void setup()
{
  Serial.begin(115200);
  while (CAN_OK != CAN.begin(CAN_500KBPS))              
    {
      Serial.println("CAN BUS Shield init fail");
      Serial.println("Init CAN BUS Shield again");
      delay(100);
    }

Serial.println("CAN BUS Shield init ok!");

}

Above is just a snippet of the code used to initialize the CAN bus in the Arduino IDE. When the CS bit is set to anything other than 10 the program will just loop through the while loop wherein it complains that the CAN bus has failed to initialize. In the alternative case, it will simply skip over all the CAN commands as if they weren't in the code and everything else in the program runs fine.

So as mentioned, I found there was no serial communication between this chip and the controller. In fact the program switches on globes connected to FET switch circuits when it senses ground at the analog ports. When this occurs there is a sudden random surge on the clock line, but how can this be possible unless the chip is broken. I said to somebody before that if the SPI module was damaged wouldn't the entire chip not work. Please not that the command "CAN bus init OK!" does not appear in the serial monitor when the PCB is connected via USB.

My next line of reasoning was that perhaps I needed to change the baud rate to match that of the SPI module of the PIC32. It doesn't matter what I change it to the CAN bus does not initialize. Another engineer looked at the design and noticed that by connecting the MCP2515 to 5V would cause the crossover voltage on the ports to have a VIH too high for the chip to function. This pin was disconnected and connected to 3v3 which should fix part of the problems I was having but this serial communcations problem remains unsolved.

If anyone has any useful hints or experience in this area and could shed some light I'd appreciate it greatly.

Thanks, Simon.