aaa
Dependencies: MCP4822 mbed-STM32F103C8T6 mbed
Fork of STM32F103C8T6_USBSerial by
main.cpp
- Committer:
- artembio
- Date:
- 2018-02-19
- Revision:
- 6:d3175b589df4
- Parent:
- 5:0be85f1bdb35
File content as of revision 6:d3175b589df4:
#include "stm32f103c8t6.h" #include "mbed.h" #include "MCP4822.h" MCP4822 MCP(SPI_MOSI, SPI_SCK, SPI_CS); // MOSI, SCLK, nCS int main() { while(1){ MCP.writeA(1650); // 1650 V out MCP.writeB(1650); // Same on B output wait(5); MCP.writeA(0); // Zero v out MCP.writeB(0); // Same on B wait(5); MCP.writeA(3300); // Guess what? MCP.writeB(3300); // 3.3 V wait(5); } // Return to beginning. }