谢谢你的回复。我有点担心K40从我在论坛上看到的所有问题。我知道PIC24一般比PIC18要好,但我想我在PIC18公司做过足够的PIC18工作,感觉很舒服。如果我转到一个UART接口,那么我很可能会使用PIC16。新的是非常好的。我知道这是冗长的,但这里有一个更详细的,如果你有兴趣。我们有很多设计与VixTe7或Zynq FPGAs做信号处理与非易失性IGLO FPGA做了大量的硬件接口-包括阅读ADCs和传感器,电源MON控制和排序,并控制所有的时钟发生器和RF硬件。IGLO没有内置的振荡器,所以有一个运行IGLO,而其他一切都关闭了。这些设计已经被难以置信地挤满了多达34层的板,有盲孔、受控深度钻、回程钻。一种新的设计有一半的硬件在不到一半的空间,ZYNQ将做RF硬件接口,所以我想把PIC投入电源控制,Mon。监测、测序、温度和电流传感器。Zynq(和DDR4和LPDRD4)有一组功率轨,需要对PUPUP /DOWN -0.85 V 0.9V 1.9V 1.2V 1.8V 2.5V 3.3V进行排序,并且分别有多个0.85 V和1.2V轨分别进行排序。0.85伏电源为30A(预期为2A)。计划中的下一个设计将所有这些都放在1.6x5的板上。所有传导冷却。你知道我为什么要拍摄小包装。FPGAs用30MHz的SPI控制了所有这些老产品的IGLO。基本上,它是一个32位寄存器接口,具有8B地址/32字节数据写入,以及8B ADDR/8位虚拟数据/32 B读取数据。这并不一定是很多流量,但我正在考虑最小化FPGA级别的变化。然而,对于这个新产品,没有很多数据写入PIC,只是传感器数据的数据读取。也许是一个权力下放的命令。一个UART接口可能会让PIC更清楚地显示状态信息,而FPGA只是被动地吸收它。也许软件/固件的家伙会更喜欢这个。没有真正考虑过。在SPI时序文档中有一些有趣的差异,我不确定在一些数据表中应该相信什么。注意,我在这里专门处理SPI从属操作。大多数设备在1或1.25个+2030纳秒时指定时钟高和低,所以SC。LK永远不会像指令周期的一半那么快。因为它只是一个移位寄存器,我不知道背景中发生了什么,需要这样一个缓慢的SCLK。PIC18F45 K22数据表是不同的-它只是说25ns时钟高,30ns时钟低。然而,我不相信,因为方块图与所有其他PIC18相同。PIC24F32 KA304系列也不同,它特别指出SCLK最小周期为100NS。我可以相信这一点,因为8字节FIFO意味着软件不必跟上输入数据(至少是短脉冲)。这就是为什么我特别选择KA304,即使它是旧的和更昂贵的。我看的所有其他PIC24都有XC*++Y用于SCLK高和低(或者它们需要额外的时间在字节之间),即使它们也有FIFO(在很多情况下)。Slave操作是有问题的,因为PIC软件必须解释第一个字节,如果它是一个读取,得到请求的数据并且是ST。在发送缓冲器中用第三字节来填充它。在最大SCLK速度,这不是很多指令周期。
以上来自于百度翻译
以下为原文
Thanks for the replies. I was a little worried about the K40 from all the issues I've seen in the forums. I know the PIC24 in general is better than the PIC18, but I guess I've done enough PIC18 work at previous companies to feel comfortable with it. If I shift to a UART interface, then I could very likely stick with a PIC16. The new ones are really quite nice.
I know this is wordy but here's a little more detail if you're interested.
We have a lot of designs with Virtex7 or Zynq FPGAs doing signal processing with a non-volatile Igloo FPGA doing a lot of hardware interfacing - Including reading ADCs and sensors, power monitoring and sequencing, and controlling all the clock generators and RF hardware. And the Igloo doesn't have a built in oscillator so there's one of those to run the Igloo while everything else is off. These designs are already incredibly packed with up to 34layer boards with blind vias, controlled depth drills, backdrilling.
A new design has half the hardware in less than half the space and the Zynq is going to do the RF hardware interfacing, so I want to put a PIC in to do the power control, monitoring, sequencing, temp and current sensors. The Zynq (and DDR4 and LPDDR4) has a bunch of power rails that need to be sequenced for powerup/down - 0.85V 0.9V 1.1V 1.2V 1.8V 2.5V 3.3V, and there are multiple 0.85V and 1.2V rails that are sequenced separately. And the 0.85V supply is 30A (23A expected). And the next design in planning puts all that on a 1.6x5" board. All conduction cooled. You see why I'm shooting for small packages.
The FPGAs have controlled the Igloo using SPI at 30MHz for all these older products. Basically it's a 32bit register interface with 8b address/32b data writes, and 8b addr/8bit dummy data/ 32b read data. It's not necessarily a lot of traffic, but I was figuring to minimize the changes at the FPGA level.
For this new product, however, there's not a lot of data writes to the PIC, just data reads of sensor data. Maybe a command to power down. A UART interface may make more sense with the PIC just spewing status information and the FPGA just passively absorbing it. Perhaps the software /firmware guys will like that better. Hadn't really thought about that.
There are some interesting discrepancies in the SPI timing documentation, and I'm not sure what to believe in some of the datasheets.
Note I'm specifically dealing with SPI Slave operation here.
Most devices specify clock high and low at 1 or 1.25 Tcy + 20-30ns, so SCLK can never be as fast as half the instruction cycle. Since it's just a shift register I'm not sure what's going on in the background to require such a slow SCLK. The PIC18F45K22 datasheet is different - it just says 25ns clock high, 30ns clock low. I don't believe it, however, as the block diagram is identical to all the other pic18's.
The PIC24F32KA304 family is also different in that it specifically says SCLK minimum period is 100ns. I can believe this because the 8 byte fifo means that software doesn't have to keep up with incoming data (at least for short bursts).
This is why I specifically picked out the KA304 even though it is older and more expensive. All the other PIC24's I looked at had the X*Tcy+Y for SCLK high and low (or they require extra time in between bytes), even though they also have fifos (in many cases).
Slave operation is problematic as PIC software has to interpret the first byte and if it's a read, get the requested data and be stuffing it in the transmit buffer by the third byte. At max SCLK speed that's not many instruction cycles.