Search found 1179 matches
- 28 Mar 2021 00:18
- Forum: mikroC PRO for PIC General
- Topic: FM Receiver AR1010 I2C problem <1ST VER SOLVED> update:17.Mar.2021
- Replies: 22
- Views: 4593
Re: FM Receiver AR1010 I2C problem <1ST VER SOLVED> update:17.Mar.2021
The AR1000 has been discontinued for quite awhile. Your posting of the Airoha data release for this product line is over 14 years old. The AR1010 is the only model still offered by them and its a safe bet it will probably be discontinued in the not too distant future (mature or end of life product)....
- 24 Mar 2021 19:50
- Forum: mikroC PRO for PIC General
- Topic: FM Receiver AR1010 I2C problem <1ST VER SOLVED> update:17.Mar.2021
- Replies: 22
- Views: 4593
Re: FM Receiver AR1010 I2C problem <1ST VER SOLVED> update:17.Mar.2021
Yes, that looks perfect. The ground between the signal lines helps balance out the parasitic capacitance of the cable, lowering cross-coupling effects. I would add 10nF and 1uF caps across each I2C slave VDD pins and see if this helps too. Same goes for the PIC VDD except make the 1uF cap 10uF or mo...
- 23 Mar 2021 18:14
- Forum: mikroC PRO for PIC General
- Topic: FM Receiver AR1010 I2C problem <1ST VER SOLVED> update:17.Mar.2021
- Replies: 22
- Views: 4593
Re: FM Receiver AR1010 I2C problem <1ST VER SOLVED> update:17.Mar.2021
Tomorrow I will try to use a ribbon bus for the i2c signal (low parasitic capacity). This will help. You should also try placing ground on each side of I2C lines as you wire the ribbon cable (i.e. 3 ground lines). Lastly, you might try placing a small amount of resistance in series with the I2C lin...
- 18 Jun 2020 06:52
- Forum: mikroC PRO for PIC General
- Topic: Preprocessor not doing calculation when const changes
- Replies: 2
- Views: 1016
Re: Preprocessor not doing calculation when const changes
Be careful with the definition of constant. A constant is defined at compile time not run time. By this declaration it is not a "variable" anymore and the code is not allowed to modify it during execution, even when initializing global variables. A better way to deal with this is to generate an equa...
- 16 Feb 2020 20:37
- Forum: mikroC PRO for PIC General
- Topic: Checksum calculation
- Replies: 2
- Views: 1212
Re: Checksum calculation
0xA27A is incorrect also. Your result and the one provided in the code comments are suspect because you should get 0x6ECE for the CRC result of your data string. 0x1189 is the polynomial (x^16 + x^12 + x^8 + x^7 + x^3 + x + 1). 0xFFFF as the starting value. 0x6ECE CRC result assumes no reflected inp...
- 11 Aug 2019 20:05
- Forum: mikroC PRO for PIC General
- Topic: MikroC learning question.
- Replies: 3
- Views: 1190
Re: MikroC learning question.
Patience... sometimes it take a while for people to read the post and reply. When dealing with motor circuits there always some form of load current surge momentarily lowering the voltage (especially on a line branch the is some distance from the mains source (like a transformer). The same applies w...
- 06 Aug 2019 19:59
- Forum: mikroC PRO for PIC General
- Topic: Making a frequency measurement meter with LCD display
- Replies: 10
- Views: 2499
Re: Making a frequency measurement meter with LCD display
Other points: CCP1 is a 16-bit register requiring you to read the high and low bytes in order to get the actual time interval for calculating the period. Edit: I guess mikroC performs this two step read for you by allowing the CCPR1 command. Remember there should be a delay after the LCD write in or...
- 28 Jul 2019 19:59
- Forum: mikroC PRO for PIC General
- Topic: Pic16LF1788 ADC not giving the correct reading
- Replies: 2
- Views: 964
Re: Pic16LF1788 ADC not giving the correct reading
The 12K divider resistance exceeds the input impedance of the ADC. See usage and electrical specs / ADC... in the data sheet. This will cause error in the measurement result. You can get around this impedance requirement somewhat by adding capacitance (typ 0.01uF or greater) across the ADC input. Th...
- 28 Nov 2018 22:10
- Forum: mikroC PRO for PIC General
- Topic: Convert Byte Array to Unsigned Long
- Replies: 6
- Views: 1891
Re: Convert Byte Array to Unsigned Long
Another way is to multiply each array byte value by the weighted binary value for unsigned long byte position and OR it to the final result. The mikroC Highest, Higher, Hi, Low built in library functions basically do this for you (as rus51's code shows). Below shows the details of how it's done manu...
- 23 Nov 2018 20:55
- Forum: mikroC PRO for PIC General
- Topic: Led and Frequencies
- Replies: 6
- Views: 1969
Re: Led and Frequencies
if instead I replace this pic with one with CCP module I should succeed in my intent? If the signal to be measured is reasonably clean (low jitter), is a square wave, and is a single frequency, then yes (using techniques from Microchip tips & tricks application note DS41214A) Can you suggest one? N...
- 23 Nov 2018 20:05
- Forum: mikroC PRO for PIC General
- Topic: Led and Frequencies
- Replies: 6
- Views: 1969
Re: Led and Frequencies
To read the frequency from the RA2 pin how do I do it? This is a complex and advanced topic question not answered easily on a forum. If the frequency signal is a single pure tone then use the PIC CCP module in capture mode (search web for how to do this. As a start look for Microchip tips & tricks ...
- 23 Nov 2018 00:01
- Forum: mikroC PRO for PIC General
- Topic: Led and Frequencies
- Replies: 6
- Views: 1969
Re: Led and Frequencies
Use the "if" statement and logical AND (&&) relational operator... if ((X >= 312) && (X < 1388)) { Light up freq band 1 LEDs ; } else if ((X >= 1388) && (X < 2464)) { Light up freq band 2 LEDs ; } else if ... else if ... else if ... else { All freq band LEDs off ; // if nothing matches shut off LEDs...
- 02 Nov 2018 16:43
- Forum: mikroC PRO for PIC General
- Topic: SPI 18 bits?
- Replies: 6
- Views: 2244
Re: SPI 18 bits?
While I'm reading sspbuf will the SPI module continue to clk out and shift bits into sspsr? No, you failed to grasp what I was saying in the previous post. The SPI module only works with 8-bits at a time per communication instance. You have to initiate the process over for successive bytes. I sugge...
- 02 Nov 2018 02:28
- Forum: mikroC PRO for PIC General
- Topic: SPI 18 bits?
- Replies: 6
- Views: 2244
Re: SPI 18 bits?
I don't think that will work, I only have 3 maybe 4 instruction cycles to read the SSPBUF before the next bit comes in. What bits? Have I misunderstood your reply? The PIC SPI output/input buffer operates in 8-bit chunks (1-byte), is clock dependent internally since it is the master, and is self ti...
- 01 Nov 2018 22:15
- Forum: mikroC PRO for PIC General
- Topic: SPI 18 bits?
- Replies: 6
- Views: 2244
Re: SPI 18 bits?
Another solution would be to place a pull down resistor on the DO line (~10K) so that it has a defined logic low state when the ADC sets it to high-Z. This will allow you to clock those undefined first bits as zeros without any consequence to the data integrity and still use the SPI hardware module ...