您好,您在演示板上的PIC18F45 50与当前PIC18设备没有明显不同,PIC18FXKK50、PIC18FXXK20、PIC18FXKK22和PIC18FXXK40的指令集和中断系统都是相同的。在所有这些设备中,SPI外围设备通常称为MSSP。一些设备家族具有2个SPI硬件实例,因此在寄存器名称中有一个额外的数字,1或2。一些现代设备家族具有PPS,外围引脚选择(PPS),将某些信号路由到D的可能性。不同的引脚。可能有一个额外的控制寄存器1位额外的SPI。在PIC微控制器上有大量的GPIO引脚在演示板上,但很少有连接到板边缘上的连接器,可以自由使用。4个信号到板上的%LED,都是G。PIO引脚,就像芯片上没有电源、接地或USB的任何引脚一样。稍加修改,您可以重新使用其中一个LED信号,为额外的SPI器件进行芯片选择。控制微控制器中的CS信号,与打开和关闭LED没有什么不同,只需在T中完成。他在代码中放置了PIC微控制器,内置了CAN硬件。在PIC18系列产品中,它们的型号为PIC18FXXK80。但是使用其中的一个,将不会使开发比MCP2515+PIC18F更简单。一个替代的开发板,一个好奇心8位高引脚计数板,可以用于PIC18设备在28引脚或40引脚PDIP封装:HTTP://www. MyCHIP.COM/DealthTooSts/StudioDeLiels.ASPX?PARTNO=DM164136它可以与此一起使用:HTTPS://Suff.MikROE.COM/CLICK/IdFACE/MCP2517FD,Mysil
以上来自于百度翻译
以下为原文
Hi,
The PIC18F4550 on the demo board you have, is not significantly different from current PIC18 devices.
The instruction set, and interrupt system in PIC18FxxK50, PIC18FxxK20, PIC18FxxK22 and PIC18FxxK40,
are all the same. The SPI peripheral, called MSSP is generally the same in all these devices.
Some device families have 2 SPI hardware instances, and thus an additional digit, 1 or 2, in register names.
Some of the modern device families have PPS, Peripheral Pin Select (PPS), the possibility to route some signals to different pins.
There may be one additional control register with 1 extra bit for SPI.
There are plenty of GPIO pins on the PIC microcontroller on the demo board you have,
but few of those connected to Connectors on the edge of the board, are free to use.
The 4 signals going to %LEDs on the board, are GPIO pins, just as any pin on the chip that isn't Power, Ground, or USB.
A little rework, you may repurpose one of the LED signals, to Chip Select for the additional SPI device.
Controlling a CS signal in the microcontroller, is no different from switching a LED On and Off,
it just have to be done in the right place in the code.
There exists PIC microcontrollers with CAN hardware built in. In the PIC18 series of products, they have type numbers PIC18FxxK80.
But using one of those, will Not make development any simpler than the MCP2515 + PIC18F... configuration you already have.
As for an alternative development board, a Curiosity 8 bit High Pin Count board, could be used for PIC18 devices in 28 pin or 40 pin PDIP packages:
http://www.microchip.com/developmenttools/productdetails.aspx?partno=dm164136
It might be used together with this:
https://shop.mikroe.com/click/interface/mcp2517fd
Regards,
Mysil