cocoa_STM_ver_BIPOLAR

Dependencies:   mbed FastPWM

Committer:
GiJeongKim
Date:
Tue Aug 20 12:35:26 2019 +0000
Revision:
1:be9b2f6d39c2
Parent:
0:51c43836c1d7
abc;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
GiJeongKim 0:51c43836c1d7 1 #include "mbed.h"
GiJeongKim 0:51c43836c1d7 2 #include "FastPWM.h"
GiJeongKim 0:51c43836c1d7 3
GiJeongKim 0:51c43836c1d7 4 extern DigitalOut check;
GiJeongKim 0:51c43836c1d7 5 extern DigitalOut check_2;
GiJeongKim 0:51c43836c1d7 6 extern AnalogOut dac_1;
GiJeongKim 0:51c43836c1d7 7 extern AnalogOut dac_2;
GiJeongKim 0:51c43836c1d7 8
GiJeongKim 0:51c43836c1d7 9 // pwm
GiJeongKim 1:be9b2f6d39c2 10 #define PIN_V PA_8
GiJeongKim 1:be9b2f6d39c2 11 #define PIN_W PA_7
GiJeongKim 0:51c43836c1d7 12 //#define PWM_ARR 0x465 // loop 80k, pwm 40k
GiJeongKim 0:51c43836c1d7 13 #define PWM_ARR 0x8CA // loop 40k, pwm 20k
GiJeongKim 1:be9b2f6d39c2 14 extern float dtc;
GiJeongKim 0:51c43836c1d7 15
GiJeongKim 0:51c43836c1d7 16 // I2C
GiJeongKim 0:51c43836c1d7 17 extern I2C i2c; // SDA, SCL (for K22F)
GiJeongKim 0:51c43836c1d7 18 extern const int i2c_slave_addr1;
GiJeongKim 0:51c43836c1d7 19 extern unsigned int value; // 10bit output of reading sensor AS5510
GiJeongKim 0:51c43836c1d7 20
GiJeongKim 0:51c43836c1d7 21 // SPI
GiJeongKim 0:51c43836c1d7 22 extern SPI eeprom; //(SPI_MOSI, SPI_MISO, SPI_SCK);
GiJeongKim 0:51c43836c1d7 23 extern DigitalOut eeprom_cs;
GiJeongKim 0:51c43836c1d7 24 extern SPI enc;
GiJeongKim 0:51c43836c1d7 25 extern DigitalOut enc_cs;
GiJeongKim 0:51c43836c1d7 26
GiJeongKim 0:51c43836c1d7 27 // UART
GiJeongKim 0:51c43836c1d7 28 extern Serial pc; //Serial pc(PA_9,PA_10); _ UART