Search found 25 matches
- 11 May 2024 08:18
- Forum: mikroC PRO for PIC General
- Topic: 1 uSec using Timer1 on PIC12F675
- Replies: 6
- Views: 153
Re: 1 uSec using Timer1 on PIC12F675
Screenshot_2024-05-11-12-43-24-703_com.adobe.reader.jpg Even with a quartz of 20MHZ 1 Cycle is allways 4/FOSC (MHz) in µS 1 Cycle time = 1/20 *4 = 4/ 20 => 0.2µS if interrupt duration takes more than 5 cycles => 1µS ... include also the call interrupt (time) and return (time) to the main programm t...
- 10 May 2024 18:51
- Forum: mikroC PRO for PIC General
- Topic: 1 uSec using Timer1 on PIC12F675
- Replies: 6
- Views: 153
Re: 1 uSec using Timer1 on PIC12F675
hello, Impossible to use a timer with 1µS delay with at Fosc 4MHz , 1 cycle T=FOSC/4= 1µS 1 NOP execution need 1µS so if you want a delay of 1µS, just use : _asm nop; your interrupt treatment needs more than 4µS to be executed !! or use 18F27K42 with FOSC=64Mhz by internal special hardware 24 bits ...
- 10 May 2024 06:38
- Forum: mikroC PRO for PIC General
- Topic: 1 uSec using Timer1 on PIC12F675
- Replies: 6
- Views: 153
Re: 1 uSec using Timer1 on PIC12F675
Surprising that no one knows how to configure the Timer0 or Timer1 to 1us
- 09 May 2024 17:21
- Forum: mikroC PRO for PIC General
- Topic: 1 uSec using Timer1 on PIC12F675
- Replies: 6
- Views: 153
1 uSec using Timer1 on PIC12F675
I need a 1 us timer using Timer1 or Timer0 using PiC12F675 using internal oscillator at 4 MHz. Unfortunately the Timer Calculator doesnt calculate for PIC12F.. I mofified the code from the examples on libstock, 2561_timer_interruption_of_100_ms_with_pic_12f675_pic12f675_v1.0.0.0. The best i can reac...
- 05 Mar 2024 15:47
- Forum: mikroC PRO for PIC General
- Topic: Coulometer Time Remaining Not changing Instantly(SOLVED)
- Replies: 9
- Views: 1305
Re: Coulometer Time Remaining Not changing Instantly
can you please help me to read write custom character array to EEPROM?
viewtopic.php?f=88&t=80542&p=318319#p318319
- 03 Mar 2024 08:30
- Forum: mikroC PRO for PIC General
- Topic: Read write custom character array from EEPROM
- Replies: 1
- Views: 293
Read write custom character array from EEPROM
How to read and write custom character array to EEPROM? Please guide. // [b]want to write/ read const char STR,RC,NC,NU,SQR,RU to EEPROM[/b] const char STR[] = {3,3,3,3,3,3,3,3}; const char RC[] = {31,31,3,3,3,3,31,31}; const char NC[] = {31,31,24,24,24,24,31,31}; const char NU[] = {27,27,27,27,27,2...
- 10 Aug 2023 10:41
- Forum: mikroC PRO for PIC General
- Topic: Combining 8 bit integers to 32 bit long integer
- Replies: 2
- Views: 484
Combining 8 bit integers to 32 bit long integer
I have split a 32 bit long integer to 8 bits and saved to 4 locations on the EEPROM. The For loop code doesn't work, there seems to be problem with "Distance |=" but I do not know how to solve it. Please guide // PIC16F886 void read_saved_odo(){ unsigned long int Distance = 12345678; unsigned int i;...
- 01 Jul 2023 06:42
- Forum: mikroC PRO for PIC General
- Topic: Coulometer Time Remaining Not changing Instantly(SOLVED)
- Replies: 9
- Views: 1305
Re: Coulometer Time Remaining Not changing Instantly
I have checked the code in Proteus simulation, will program the pic and check it in actual hardware.
- 30 Jun 2023 07:43
- Forum: mikroC PRO for PIC General
- Topic: Coulometer Time Remaining Not changing Instantly(SOLVED)
- Replies: 9
- Views: 1305
Re: Coulometer Time Remaining Not changing Instantly
Updated code version attached See comments at top of code to see what has changed Your previous code works perfectly. I have done some changes in it to suite me. Your code if(batt_cap = 0xffff){ // is EEPROM blank? batt_cap = 18000; // if so, then default to 18 AH } I want it to be universal upto 6...
- 29 Jun 2023 15:49
- Forum: mikroC PRO for PIC General
- Topic: Coulometer Time Remaining Not changing Instantly(SOLVED)
- Replies: 9
- Views: 1305
Re: Coulometer Time Remaining Not changing Instantly
Attached is my attempt at a quick fix // status 29 June 2023 // // Only changes from original are : // 1 default to 18 AH if EEPROM is blank (as when programmed) // 2 formatting improvements // 3 timing display over-ridden with a new simpler function // // - will latewr provide a function for text ...
- 28 Jun 2023 13:13
- Forum: mikroC PRO for PIC General
- Topic: undeclared identifier in expression
- Replies: 5
- Views: 600
Re: undeclared identifier in expression
Here is my full code viewtopic.php?f=88&t=80057
- 28 Jun 2023 10:28
- Forum: mikroC PRO for PIC General
- Topic: Coulometer Time Remaining Not changing Instantly(SOLVED)
- Replies: 9
- Views: 1305
- 28 Jun 2023 10:25
- Forum: mikroC PRO for PIC General
- Topic: Coulometer Time Remaining Not changing Instantly(SOLVED)
- Replies: 9
- Views: 1305
Coulometer Time Remaining Not changing Instantly(SOLVED)
I have modified code available in the internet to create a battery coulometer using PIC16F886 and 20x4 LCD display. All function works well, except Time remaining. All other readouts change instantly only time remaining literally works like a counter. eg. If I draw 18 amps from a 18aH battery the ba...
- 30 May 2023 22:18
- Forum: mikroPascal PRO for PIC General
- Topic: how to enable internal pull ups?
- Replies: 14
- Views: 18194
Re: how to enable internal pull ups?
Found the answer
- 29 May 2023 18:40
- Forum: mikroPascal PRO for PIC General
- Topic: how to enable internal pull ups?
- Replies: 14
- Views: 18194
Re: how to enable internal pull ups?
How to enable weak pull up resistor on all pins of PORTB except RB1 on PIC16F886