Guest User

Untitled

a guest
Apr 23rd, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <clib.h>
  4. #include "..\biblio\carte.h"
  5. #define CS0 2
  6. #define CS1 3
  7.  
  8.  
  9.  
  10. void main (void)
  11. {
  12. int iCapture;
  13. float iv;
  14. BIOS_Set_Focus(FOCUS_APPLICATION);
  15. bus_init();
  16. fast_adc_init();
  17. hal_instal_ISR();
  18.  
  19. while (BIOS_kbhit()==0)
  20. {
  21. iCapture=fast_adc_read(0);
  22. iv=((float)iCapture*5.0)/4096.0;
  23. printf("en volt: %f V \n",iv);
  24. printf ("Valeur: %d\n", iCapture);
  25. RTX_Sleep_Time(1000);
  26. }
  27. BIOS_Set_Focus(FOCUS_SHELL);
  28. }
Add Comment
Please, Sign In to add comment