robot

Dependencies:   FastPWM3 mbed

Committer:
bwang
Date:
Tue Feb 28 03:32:21 2017 +0000
Revision:
79:d0b1bb3dcf68
Parent:
56:c681001dfa46
Child:
80:64732542010a
added FlashWriter class

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bwang19:a6cf15f89f3d 1#ifndef __CONFIG_PINS_H
bwang19:a6cf15f89f3d 2#define __CONFIG_PINS_H
bwang19:a6cf15f89f3d 3
bwang24:5e18a87a0e95 4#define PWMA PA_8
bwang24:5e18a87a0e95 5#define PWMB PA_9
bwang19:a6cf15f89f3d 6#define PWMC PA_10
bwang19:a6cf15f89f3d 7#define EN PB_15
bwang19:a6cf15f89f3d 8
bwang19:a6cf15f89f3d 9#define IA PA_4
bwang19:a6cf15f89f3d 10#define IB PB_0
bwang19:a6cf15f89f3d 11
bwang19:a6cf15f89f3d 12#define TH_PIN PB_8
bwang42:030e0ec4eac5 13#define TH_LIMIT_LOW 1100 //uS
bwang56:c681001dfa46 14#define TH_LIMIT_HIGH 1750
bwang78:b8df106126a7 15#define TH_LIMIT_CRAZY 2000
bwang19:a6cf15f89f3d 16
bwang19:a6cf15f89f3d 17#define I_SCALE_RAW 25.0f //mv/A
bwang19:a6cf15f89f3d 18#define R_UP 12000.0f //ohms
bwang19:a6cf15f89f3d 19#define R_DOWN 3600.0f //ohms
bwang19:a6cf15f89f3d 20#define R_BIAS 3600.0f //ohms
bwang19:a6cf15f89f3d 21#define AVDD 3300.0f //mV
bwang19:a6cf15f89f3d 22
bwang19:a6cf15f89f3d 23#define I_OFFSET (AVDD * R_DOWN * R_UP / (R_DOWN * R_UP + R_BIAS * (R_DOWN + R_UP)))
bwang19:a6cf15f89f3d 24#define I_SCALE (R_BIAS * R_DOWN * I_SCALE_RAW / (R_DOWN * R_UP + R_BIAS * (R_DOWN + R_UP)))
bwang19:a6cf15f89f3d 25
bwang19:a6cf15f89f3d 26#define set_dtc(phase, value) *phase = (value)
bwang19:a6cf15f89f3d 27
bwang19:a6cf15f89f3d 28#endif