autowp / arduino-mcp2515

Arduino MCP2515 CAN interface library
MIT License
793 stars 279 forks source link

No calculations for 95KBPS in the source #67

Closed CrimSoon closed 2 years ago

CrimSoon commented 3 years ago

I am interested in the speed of 95kbps for the 16MHZ and 8MHZ quartz crystal resonator. Can you show how to calculate CFG1, CFG2, CFG3 for this speed? BR CS

CrimSoon commented 3 years ago

I found a solution for 95kbps with 16Mhz Insert in:

mcp2515.h

define MCP_16MHz_95kBPS_CFG1 (0x03)

define MCP_16MHz_95kBPS_CFG2 (0xBE)

define MCP_16MHz_95kBPS_CFG3 (0x04)

mcp2515.cpp case (CAN_95KBPS): // 95Kbps cfg1 = MCP_16MHz_95kBPS_CFG1; cfg2 = MCP_16MHz_95kBPS_CFG2; cfg3 = MCP_16MHz_95kBPS_CFG3; break;