Maximum frequency that can be converted with Arduino Uno? - arduino-uno

Arduino Uno Board use successive approach ADC of 12 bits and 16 MHz frequency clock. What is the maximum voice frequency can be converted using arduino uno board?
I want the step by step solution with calculations.

Related

How do i get a 100kbps clock for an I2C on Quartus Prime?

I am doing a university project in which i have to build a I2C which have only one slave and will have to transmit a data with 5 bits, 4 bits for the number which is in the range of 0 to 9 and 1 bit to read or write, i'm using a DE10-LITE with VHDL for this project, which has a 50 Mhz default clock, i was looking into the "ALTPLL" inside quartus prime but i can't find the option to set my clock to 100kbps, i did find in the in some forums that the "Set up PLL in LVDS mode" enables that, but for some reason quartus won't let me activate it. My SDA will be 100kbps, and the SCL 50mhz.
As the Other people have said: You don't need a PLL for that. If you already have a default clock of 50MHz then you just need to divide that by 500, using a counter, and then you have your 100kHz clock.
Anyways, you would want to start the counter only when there is a request on the bus. So user16145658 is correct: The generated clock should be the output of your state machine.
You don't need to change the clock of the FPGA, since you are using an FPGA, you only need to implement an i2c core to communicate with the i2c device.
And the i2c specification specifies the rate of i2c
Standard mode (Sm) 100 kbit/s
Fast mode (Fm) 400 kbit/s

GPIO32 pin works in analog mode, always reads 0 in digital mode

I'm having some difficulty getting PCNT pulse counting working with a prototype ESP32 device board.
I have a water level sensor (model D2LS-A) that signals state by the frequency of a square wave signal it sends to GPIO32 (20Hz, 50Hz, 100Hz, 200Hz, 400Hz).
Sadly, the PCNT counter stays at 0.
To troubleshoot, I tried putting GPIO32 in ADC mode (attenuation 0, 10-bit mode) to read the raw signal (sampling it many times a second), and I'm getting values that I would expect (0-1023). But trying the same thing using digital GPIO mode, it always returns 0, never 1 in all the samples.
Since the PCNT ESP IDF component depends on reading the pin digitally, the counter never increments past 0.
So the real problem I'm having is: why aren't the ADC readings (between 0-1023) translating to digital readings of 0-1 as one would expect?

PIC ADC measuring voltage value that are higher than voltage reference

I am using PIC18F26K83 which has 12 bit ADC in it and I want to measure voltage values on a specific pin. Voltage values will be between 10 V and 30 V. I supply my MCU with 4.9 V. And from my research it is equivalent to voltage reference ( I am not sure in this point.). Which means if the voltage value on the a pin is 4.9 V I will get 4095 from ADC and if the voltage value is 2.45 V ADC value will be 2048. Is it correct? My main question is: can I measure voltages that are between 10 V and 30 V with 4.9V voltage reference? If no, is there a way to measure that range with ADC without changing the voltage reference? Thanks.
Edit: So I added a voltage divider circuit now I divide that voltage by 11. In that case calculations looks like: (4.9 * adc_out / 4096) *11 = voltage_value.
It looks like only way is to use voltage divider. We can close the topic.
Yes, you need a hardware divider circuit to measure 10V.
And please have a look at the Absolute Maximum Ratings in the Electrical Spezifications:
The maximum voltage for any pin is VDD + 0,3V !!!
So any higher voltage will destroy the chip.

Use DCM for generate clock of 78 mhz from 100 mhz clock

I have a clock of 100 mhz. I want to use DCM to create a clock of 78 mhz.
I think I should use two DCM, where the output of first DCM goes into the second DCM but I don't know if this will work.
Best Regards
Rather than using a DCM directly you can investigate using a Direct Digital Frequency Synthesizer (DDFS). It amounts to an accumulator that is incremented by a constant count value. You can control the precision by the size of the accumulator.
It is helpful if there is as much disparity between the accumulator clock and the generated frequency as possible. Consider using a DCM to scale the 100MHz up to the highest speed you can run a counter of the necessary width and still meet timing for your target device. There will be some jitter equal to one period of whatever clock is driving the accumulator but the average frequency can be made very close to 78 MHz.
accum_freq = 100 MHz * DCM_MULTIPLIER
accum_size = ceil(log2(accum_freq / (78 MHz * tolerance)))
increment = 78 MHz / accum_freq * 2**accum_size
accum = accum + increment
You then tap off the MSB of the accumulator to get your synthesized 78 MHz clock.
You can either manually compute these constants for use as magic numbers or do the arithmetic natively in VHDL to define the size and increment as machine computed constants. By reducing the tolerance you will increase the required size of the accumulator. Start off with 0.01% (0.0001) and see if it is satisfactory.
What device are you targeting? On a Spartan-6 the DCM_CLKGEN allows a multiplier of 39 and a divider of 50, which gets you your 78MHz.
If you set your multiplier to 7 and your divider to 9 you'll be able to get to 77.77 MHz. Will that work for you?

high frequency from low frequency clock

My spartan 3a fpga board has a 50mhz clock while implementing a microblaze with ram ddr2 , it required a frequency of 62mhz which was edited by my program , when asked about this , they told me that 60mhz clock is used to generate other clocks internally but how does a 50mhz clock produce a 62mhz clock which is higher !?
in Xilinx Spartan devices you can use so called DCMs (digital clock managers) that give you a whole lot of possibilities; see Spartan User Guide or Xilinx Spartan 3 DCM. with the synthesizer option, clock multiplication/division is possible.
There are built in technologies that multiply the clock to higher frequencies. See Frequency Multiplier and Phase Locked Loop
under your design name in Implementation window in ISE right click and add new sorce select IPcore then select clocking wizard you can enter the primary freq : 50 mhz and required out freq: 62 mhz and the core generator will do it for you.

Resources