![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
WORK please
Diff: main.cpp
- Revision:
- 0:b183b7569045
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon Oct 05 22:06:06 2020 +0000 @@ -0,0 +1,12 @@ +/* Program Example: Set up the mbed as SPI master*/ + +#include "mbed.h" +SPI ser_port(p11, p12, p13); // mosi, miso, sclk +char switch_word; //word we will send + +int main() +{ + + ser_port.format(12,1); // Setup the SPI for 12 bit data, Mode 1 operation + ser_port.frequency(4000000); // Clock frequency is 4MHz +}