Search found 1552 matches

by paulfjujo
09 May 2024 16:20
Forum: mikroC PRO for PIC General
Topic: MikroC compiler
Replies: 1
Views: 20

Re: MikroC compiler

Hello, Tell us , wich MCU are you using...? it is OK with a 18F26K22 .... using PIckit3 18F27K42 .. a little bug to load eeprom data into the MCU you must modify starting adress manualy in the *.ihex file using Pickit4 Now , you better have to use MPLABX XC8 ! as me ...for new MCU. Even MikroC (with...
by paulfjujo
09 May 2024 08:46
Forum: mikroC PRO for PIC General
Topic: TCS3472 and PIC16F877A
Replies: 1
Views: 33

Re: TCS3472 and PIC16F877A

hello, You need to use a I2C bus ..to dialogue with TCS3472 then use a LCD or Terminal PC to display your data i give you a starting example for 16F877 wich use I2C for a RTCDS1307 ,and read & write to an EEPROM 24LC256 Display infos on a Nokia LCD ( from old phone) or Nokia5510 or ...use a I2C LCD ...
by paulfjujo
07 May 2024 18:05
Forum: mikroC PRO for PIC General
Topic: HELP WITH FUNCTIONS
Replies: 1
Views: 160

Re: HELP WITH FUNCTIONS

Hello, Are MILES and MILESt variables declared as Global ? long MILES; long MILESt; why did you put My_DatA as a comment ? Be carrefull ! My_Dat A is not the same variable as My_Data ! unsigned short My_EEPROM_Read(unsigned int address) { //unsigned short My_DatA; <---- ? NVMCON1=0; //reset all to 0...
by paulfjujo
03 May 2024 18:21
Forum: mikroC PRO for PIC General
Topic: UART1_Read_Text() is not working when I used escape sequences like \r\n
Replies: 6
Views: 191

Re: UART1_Read_Text() is not working when I used escape sequences like \r\n

hello, UART can be blocked if OVERFLOW occurs !!! and error not treated ! when adding a delay , if data are always send by your terminal, during this laps of time .. MCU itslef can't store incomming data anymore -> OVERFLOW i don't know how MikroE manage the function UART1_Read_Text(uart_input,";", ...
by paulfjujo
01 May 2024 17:22
Forum: mikroC PRO for PIC General
Topic: UART1_Read_Text() is not working when I used escape sequences like \r\n
Replies: 6
Views: 191

Re: UART1_Read_Text() is not working when I used escape sequences like \r\n

next thing you are talking about interrupt, could you explain more about this thing like, how to use interrupt? tested on PIC12F1840 #define MAXLEN1 64 char Buffer1[MAXLEN1]; unsigned short error; volatile unsigned int CptErr; volatile int DataReady1 =0; // drapeau Data recu volatile int NB; volati...
by paulfjujo
30 Apr 2024 09:34
Forum: mikroC PRO for PIC General
Topic: PIC18F47K42 EEPROM
Replies: 4
Views: 132

Re: PIC18F47K42 EEPROM

hello, Since One year, i not use anymore MikroC ..because not updated for new MCU Must use Necto Studio wich replace MikroC , but it is to much complicated and Heavy.... and need additional cost to pay !! even you allready have a MickroC Pro Licence. i use MPLABX XC8 , mode difficult to learn, but a...
by paulfjujo
30 Apr 2024 08:52
Forum: mikroC PRO for PIC General
Topic: UART1_Read_Text() is not working when I used escape sequences like \r\n
Replies: 6
Views: 191

Re: UART1_Read_Text() is not working when I used escape sequences like \r\n

Hello, you can try this : Delay located outside of RX loop while(1) { if(UART1_Data_Ready() == 1){ UART1_Read_Text(st, ";", 255); UART1_Write_Text(st); strcpy(str,st); } else{ UART1_Write_Text(str); } UART1_Write_Text("\r\n"); Delay_ms(1000); } A better way is to use interrupt to manage RX UART ...
by paulfjujo
29 Apr 2024 10:28
Forum: mikroC PRO for PIC General
Topic: PIC18F47K42 EEPROM
Replies: 4
Views: 132

Re: PIC18F47K42 EEPROM

Hello, :o There is a bug in MikroC compiler !!!! it is a old problem, not solved by MikroE .. usage de l'eeprom PIC Rappel bug MikroC sur adresse départ Eeeprom => à modifier! dans Eeeprom file *.ihex OLD adresse :02000004[b]0121[/b]D8 2101H because reverse order : LSB then MSB [b]NEW adresse[/b] :0...
by paulfjujo
26 Apr 2024 08:03
Forum: mikroC PRO for PIC General
Topic: PIC18F47K42 USING DS1307 CLOCK I2C
Replies: 2
Views: 191

Re: PIC18F47K42 USING DS1307 CLOCK I2C

hello, you can find here all you need to use I2C1 , specific for 18F27K42 ... without mikroC library ... used for OLED display and DS3231 RTC needs to add specific register names, not included in MikroC registres I2C du MCU 18F27K42 sbit I2C1STAT0_BFRE at I2C1STAT0.B7; sbit I2C1STAT1_TXBE at I2C1STA...
by paulfjujo
17 Apr 2024 15:04
Forum: mikroC PRO for PIC General
Topic: can I read two digit number using UART1_Read()?
Replies: 7
Views: 1315

Re: can I read two digit number using UART1_Read()?

hello, .....Your code is working fine. but if print number in next line it will not work. char c: int value; int i=0; .. somme init here.... do { i=0; if ( (UART1_Data_Ready())&& (i==0)) { c=UART1_Read() ; UART1_Write (c); // echo '6' en ascii value=( c-48)*10; // value=6*10=60 i++; } if ((UART1_Dat...
by paulfjujo
12 Apr 2024 08:12
Forum: mikroC PRO for PIC General
Topic: DHT22 with 18f4550
Replies: 2
Views: 180

Re: DHT22 with 18f4550

hello, You need to convert the values into a string. sprintf is allready used for that .. you try to put 2 bytes into a variable using an integer pointer ....so at same adress test this: define variables as (global) integer value no need to pass parameter to function void dht22_read int dht22_humi; ...
by paulfjujo
08 Apr 2024 19:34
Forum: mikroC PRO for PIC General
Topic: can I read two digit number using UART1_Read()?
Replies: 7
Views: 1315

Re: can I read two digit number using UART1_Read()?

try this char c: int value; int i=0; .. somme init here.... do { i=0; if ( (UART1_Data_Ready())&& (i==0)) { c=UART1_Read() ; UART1_Write (c); // echo '6' en ascii value=( c-48)*10; // value=6*10=60 i++; } if ((UART1_Data_Ready()) && (i==1)) { c=UART1_Read() ; UART1_Write (c); // echo '5' ascii value...
by paulfjujo
07 Apr 2024 19:35
Forum: mikroC PRO for PIC General
Topic: can I read two digit number using UART1_Read()?
Replies: 7
Views: 1315

Re: can I read two digit number using UART1_Read()?

hello,


what is your definition of a digit ?

Uart1_Read ( a_byte);

a value on 2 digits : ex: 65
MSB=6 LSB=5
BCD coded as
0110 00101

On other side : how are send theses 2 digits ?
in binary format 0100 0001
ascii format "65"
BCD format 0110 00101
by paulfjujo
13 Mar 2024 10:14
Forum: mikroC PRO for PIC General
Topic: How to store large integer value greater than 255 at particular location in eeprom(Solved))
Replies: 4
Views: 581

Re: How to store large integer value greater than 255 at particular location in eeprom(Solved))

hello, more simple solution The mikroC PRO for PIC compiler provides a set of useful built-in utility functions. The Lo, Hi, Higher, Highest routines are implemented as macros. If you want to use these functions you must include built_in.h header file (located in the include folder of the compiler) ...
by paulfjujo
12 Mar 2024 19:35
Forum: mikroC PRO for PIC General
Topic: temperature sensors giving wrong value
Replies: 3
Views: 416

Re: temperature sensors giving wrong value

hello, Impossible to give an answer without Schematic ... Does the PIC control Power delivered for the Heater ? Algorithm used PI , or PID ? The CTN formula is very long, use POW , log ... difference beetween TARGET and MEASURE needs an Integrale action .... (PI proportionnal and Integrale controler...

Go to advanced search