Fork

Dependencies:   mbed libscpi

Revision:
10:a8390614edcc
Parent:
9:76a0b9f29a2d
Child:
11:b86aea372744
--- a/main.cpp	Fri Feb 26 08:45:13 2021 +0000
+++ b/main.cpp	Fri Feb 26 10:16:32 2021 +0000
@@ -13,18 +13,19 @@
     /*control codes*/
     wait_ms(2000);   /* keep FPGA in reset for 5s, to let motor stop*/
     enbale_fpga();   /* enable FPGA */ 
-    wait_ms(1000);     
+    wait_ms(100);     
     led4 = i2c.i2c_window_open();  /*send password 0xd0d0*/
     //wait_ms(1000);
-    //i2c.i2c_set_position_pulse_width(3,4); /*unsigned int mantisaa_2b, unsigned int exponent_3b*/
+    //i2c.i2c_set_position_pulse_width(3,5); /*unsigned int mantisaa_2b, unsigned int exponent_3b*/
     //wait_ms(1000);
+    //i2c.i2c_set_start_up_pulse_width(2,6); /*(unsigned int mantisaa_3b, unsigned int exponent_3b*/
     //led4 = i2c.i2c_set_soft_start_up(1, 1, 0, 1, 1);
     wait_ms(1000);
     i2c.i2c_set_position_anti_cog(1);
     wait_ms(1000);
-    i2c.i2c_set_loop_mode(0);
+    //i2c.i2c_set_loop_mode(0);
     wait_ms(1000);
-    i2c.i2c_set_open_loop_duty(0x8000);
+    i2c.i2c_set_open_loop_duty(0xf000);
     wait_ms(1000);
     led4 = i2c.i2c_motor_start();  /*send password 0xcafe*/