Advertisement
Guest User

dd

a guest
Nov 19th, 2019
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.32 KB | None | 0 0
  1.   1 #define CPP_EXAMPLE  2 #define SIMULATOR  3  4 #include "main.h"  5  6 unsigned long *ekran;//[8*128*2]  7 #ifdef TMSLAB_C2000  8 unsigned char *textEkran;//[40*16/2]  9 #endif 10 #ifdef TMSLAB_WIN 11 unsigned short int *textEkran;//[40*16/2] 12 extern int (*PartialRefresh)(); 13 char credits[43]="-               DEMO DISC                -"; 14 long Timer2IsrPeriod=1; // okres pracy licznika podany w przybli¿eniu w ms 15 #endif 16 17 18 int Tim=0; 19 unsigned int preScale=0; 20 21 22 int klawisze=0; 23 int k; 24 int b; 25 double calka=0; 26 double pochodna=0; 27 double uchyb[220]; 28 double y[220]; 29 double Tp=5; //0.5 30 double kp=0.3; 31 double Ti=0.5; 32 double Td=2; 33 double u[220]; 34 int i; 35 double wymuszenie[220]; 36 double wymuszenie_[220]; 37 double zad=10; 38 39 40 R_P_LCD_TMSLAB LCD; 41 R_P_KEYBOARD_TMSLAB KEYBOARD; 42 R_P_LEDBAR_TMSLAB LEDBAR; 43 44 45 #ifdef TMSLAB_C2000 46 #pragma CODE_SECTION("prog") 47 #endif 48 49 50 int main() 51 { 52 53   SetUpPeripherials(); 54 55 #ifdef TMSLAB_C2000 56   LCD.LCD_Init(ekran,textEkran); 57 #endif 58 #ifdef TMSLAB_WIN 59   LCD.LCD_Init(&ekran,&textEkran); 60 #endif 61   KEYBOARD.InitKB(100); 62   LEDBAR.InitLedBar(); 63 64 65   for (int a=0;a<(128*8);a++) ekran[a]=0; 66   for (int a=0;a<(40*16);a++) textEkran[a]=' '; 67 68   EnableInterrupts(); 69 70 while(1) 71  { 72
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement