Hi Folks, I am bit new to Arduino due Board & I am intended to read a GPIO pin from Arduino due board whose incoming signal frequency is 1 MHz. Understanding that Arduino DUE main clock frequency runs at 84 MHz, My question is , Apart from Timers and counters peripheral to measure the duty cycle time(i.e, time spent on a high and low), do we have other options available that can be used for this purpose?
Welcome to the Arduino forum. We do not know what you mean by the term "read from a GPIO pin". Then you ask is there other than the obvious ways to process some value read from a pin. What are you really wanting to do?
What measurement are you trying to achieve from this signal?
Are you using a digitalRead call?
There are faster ways of reading an input by using direct port addressing, maybe that will help. But we need the answers to the above questions before we can even begin.
You might want to look at this How to get the best out of this forum before you proceed any further.
We only know what you tell us, and without knowing what you have, we don't stand a chance.
You can only see a zero or a one when you read that pin. What more are you expecting?
see interrupt on change and SysTick->Val
Thank you for the response. Will share more details about my Arduino setup. It has an Arduino DUE board in which one of its digital Pin(33) is wired to an external adapter pin that transmits 1 MHz. The requirement is to read the signal from that external adapter pin(which is wired to arduino due's GPIO digital pin) is to read the clock signal frequency measurement and also its duty cycle(supposed to be in 50% LOW and 50% HIGH). Just curious, if timers and counters can read this 1MHz signal frequency? If so, Just curious if someone has done this before using Arduino Due ? Please let know. Sorry for the delayed response.
Thank you.
You can still only read a 0 or a 1. Everything else has to be done by your programming. Perhaps using interrupts and perhaps keeping track of the time between interrupts. All programming, not reading a pin.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.