maharadga 0 24 января, 2013 Опубликовано 24 января, 2013 · Жалоба "...Hi there. I need correction program for PIC16F876A. I do not understand programming. Sending file. The scheme works, but there's one problem. When there is no load on the output reading of I is not 0.000 A, and depending on the scope is as follows: 1A - 0,001 A 2A - 0,002 A 4A - 0.004 A 8A - 0.008 A Can this be corrected? I'd also like to extend coverage to 30 V. If anyone can help I would be very grateful. For a fee, of course... :-)....." PIC_Power_Supply.rar Цитата Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты Поделиться
_Pasha 0 24 января, 2013 Опубликовано 24 января, 2013 (изменено) · Жалоба Hi. Tell us first, what is the voltage between AIN0 & AIN1 in no-load condition? This question appears because of R4 potentiometer in the ckt, so it may be no need to correct a program - simply ajust zero by R4 :) Изменено 24 января, 2013 пользователем _Pasha Цитата Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты Поделиться
maharadga 0 25 января, 2013 Опубликовано 25 января, 2013 · Жалоба AIN1 meassure current, AIN0 measure the voltage. R4 is for adjust correct witness of current /it's adjust gain of the OP Amp IC3b/. If no load condition and pin AIN1 is grounded, witness is the same, like I say: 0,001 to 0,008A. I think reason is the software, because resolution of the range is the same 0,001 to 0,008A. Цитата Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты Поделиться
xemul 0 25 января, 2013 Опубликовано 25 января, 2013 · Жалоба Author make an incorrect rounding in voltage and current averagings. Replace amp_lue=amp_lue/16; amp_lue=amp_lue+1; with amp_lue = (amp_lue + amp_lue/32) / 16; and by same reason volt_lue=volt_lue/16; volt_lue=volt_lue+2;// compenser pour le restant de la division a l'affichage with volt_lue = (volt_lue + volt_lue/32) / 16; Цитата Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты Поделиться
maharadga 0 25 января, 2013 Опубликовано 25 января, 2013 · Жалоба I replace that, but I can't compile C file. Here is the mesage: >>> Warning 208 "alim876a.c" Line 49(1,19): Function not void and does not return a value comparer_Iset_Ilue *** Error 112 "alim876a.c" Line 87(1,1): Function used but not defined: ... comparer_Iset_Ilue SCR=382 1 Errors, 1 Warnings. Build Failed. I don't know what is the reason. Цитата Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты Поделиться
xemul 0 25 января, 2013 Опубликовано 25 января, 2013 · Жалоба I replace that, but I can't compile C file. Me too. Neither author nor you do advert about used compiler. UPD: remove line 49 49: comparer_Iset_Ilue(); and try again Цитата Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты Поделиться
_Pasha 0 25 января, 2013 Опубликовано 25 января, 2013 · Жалоба seems like it's neither SDCC nor C18. Anymore? Hi-tech? I didn't use it. Цитата Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты Поделиться
maharadga 0 26 января, 2013 Опубликовано 26 января, 2013 · Жалоба "UPD: remove line 49 Код 49: comparer_Iset_Ilue();" I've already tried it and no problem with the compiler (using PIC C Compiler). But if I remove this subroutine, the arrow at the bottom of the display no longer shows what is under control - U or I. Instead, there are other indications. This is not a decision for me. Can anyone fix this program? Цитата Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты Поделиться
lightKnight 0 26 января, 2013 Опубликовано 26 января, 2013 · Жалоба Try to increase R6 value. Цитата Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты Поделиться
xemul 0 26 января, 2013 Опубликовано 26 января, 2013 · Жалоба "UPD: remove line 49 Код 49: comparer_Iset_Ilue();" I've already tried it and no problem with the compiler (using PIC C Compiler). But if I remove this subroutine, the arrow at the bottom of the display no longer shows what is under control - U or I. Instead, there are other indications. This is not a decision for me. Missing string on the display is another error in the program not related to removed string. I had use three different PIC C compilers and listen half-dosen about yet more different ones. I can't recognize your's used compiler and have no time and no wish try each possible to compile your program. Suppose, if you type '<compiler-name> -v' (substitute <compiler-name> with real .exe) in console you see a needed magic words. Can anyone fix this program? Of course. Keep try. Цитата Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты Поделиться
maharadga 0 27 января, 2013 Опубликовано 27 января, 2013 (изменено) · Жалоба Thanks to "xemul " for the time given. I do not understand what you mean, because, as I am not an expert. "lightKnight"- I do not use R6. Or if I use, have connected between +out and gnd. I think my BIG problem unable to compile the file. Изменено 27 января, 2013 пользователем maharadga Цитата Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты Поделиться
xemul 0 27 января, 2013 Опубликовано 27 января, 2013 · Жалоба I do not understand what you mean, because, as I am not an expert. I had ask you run a console window (cmd.exe in WinXXX, something like bash in Linux/Unix), type in few words like these and post here an output of command '<compiler-name> --version' (compiler name is picc.exe in this case). The same output you can find in compiler log window, you see where it's results like ">>> Warning 208 "alim876a.c" Line 49(1,19): ...", just scroll to top of output. Цитата Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты Поделиться
maharadga 0 28 января, 2013 Опубликовано 28 января, 2013 · Жалоба If I understand correctly, you want the version of the compiler. Upload. I tried a few compiler, but it is not. What is the reason, I do not know. Цитата Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты Поделиться
xemul 0 28 января, 2013 Опубликовано 28 января, 2013 · Жалоба Change line 294 to 294: void comparer_Iset_Ilue(void) accordingly prototype of this function in line 48 48: void comparer_Iset_Ilue(void); // determiner qui est en controle, E ou I Цитата Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты Поделиться
maharadga 0 1 февраля, 2013 Опубликовано 1 февраля, 2013 · Жалоба Tanks, xemul. You're a genius for me. :) I can now compile the file. But with changes in post №4 current measurements is wrong, instead x,xxxA is xA. Only one position. Цитата Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты Поделиться