khalid el horri
/
nucleo_F746ZG_TDC502_port_programm_test
programme tdc502
main.cpp
- Committer:
- schnf30
- Date:
- 2017-05-16
- Revision:
- 0:893cddb940f0
- Child:
- 1:346b69769c2e
File content as of revision 0:893cddb940f0:
#include "mbed.h" #include "TDC502.h" Serial pc(USBTX,USBRX); DigitalOut ale(PE_0,1); TDC502 tdc502(PortD, 0x00FF, //PD_7, PD_6, PD_5, PD_4, PD_3, PD_2, PD_1, PD_0, DataD7 - D0 PortA, 0x00F0, //PA_7,PA_6,PA_5,PA_4, adresse AD3 à AD0 PD_11,PD_12,PD_13, // rdn wrn csn PE_2, PA_0 ); // INTFLAG TDC_READY int main() { pc.baud(115200); tdc502.TestPerformanceWrite(); tdc502.TestPerformanceRead(); tdc502.init(); tdc502.ReadAllRegister(); tdc502.StartMesure(); while(1) if (tdc502.data_ready()) { tdc502.ReadData(); wait(10.0); tdc502.StartMesure(); } }