Hi, I wonder if someone could please clarify something regarding SPI;
Im running multiple slaves of a single SPI port by using a slave select bus. This is a pretty standard layout and works well. My question is when your using devices that run on different SPI formats (polarity and phase) IE the mobileLCD which of the top of my head runs on format 1 spi.format(8,1) and a ADXL345 which runs on format 3 spi.format(8,3). I have already had this working but after doing some slight rewiring the LCD appears not to function when i reset the SPI format.
When you set up a second SPI on the same port, does the MBed automatically switch between the 2 (or more) formats, or does the format become associated with the port and would need to be changed again before communication with another device?
Depends on the implementation, but I suspect you need to reset the format each time.
I'm running an AD345 on SPI, but get a lot of noise from the MBED even when running without the USB and on batteries - about +/- 10 counts or more at times. Did you have a similar problem? I've tried moving away from the PC and decoupling the AD345 but it doesn't seem to make much difference. The scope shows a lot of spiky noise about.
if any body have verilog code for spi slave?please send to me
Please log in to post a reply.
mbed, the fastest way to prototype with ARM based microcontrollers.
^ back to top