Please select To the mobile version | Continue to access the desktop computer version


Hot search: orangepi
View: 8896|Reply: 5

The best way to get microseconds precision time?

[Copy link]







Registered member

Rank: 2

Post time 2016-10-20 09:09:38 | Show all posts |Read mode
Hey folks,

It's my first time here. Cheers o/

Well, I have one Orange Pi Plus 2 and I am trying to make it read from one HC-SR04 utrassonic sensor. And it sends the measured distance by turning its echo port high by one instant of time. This time is proportional to the measured distance.
To work this out, I have a interruption callback using WereCatf's WiringOP fork, that works good but I can't get correct timing because the function I am using don't give me a good and accurate values.
I've used clock_gettime() with CLOCK_REALTIME but it have some milliseconds increments every second (even if I run OPi for performance) and I don't want more than 58 microsecond increments, because this is the time for each centimeter to be measured by the sensor (more info here ... 2qR4vP8saG73rE/edit).

So do you guys know any way to get one time with microseconds accurace? I saw in the Allwinner H3 documentation something about it's hardware Timers but that is completely unclear to me on how to setup and make it work properly.

Thank you and sorry about my english.







Registered member

Rank: 2

Post time 2017-9-16 13:24:13 | Show all posts
Edited by DarkSorrow at 2017-9-16 13:29

As you mentioned in your last paragraph you will have to take access of hardware timer.
Though I have never done this on Orange Pi or any Allwinner processor, I had done once for completely different SBC.
It is very similar to bare-metal programming like that of micro-controllers.
You will have to use mmap system call to map/get physical address of peripheral's (timer's) register address. Once you get the proper physical address of the necessary registers it is just matter of setting proper values. You will also have to write interrupt handler and register interrupts if you want interrupt driven approach or alternatively you can also pool for flag in while loop (very inefficient).
Refer page 156 of Allwinner H3 documentation to get Timer's register map.







Gold member

Rank: 6Rank: 6

Post time 2019-11-1 04:02:51 | Show all posts
There is the so called High-Speed-Timer at address 0x01C60000 ( ... h3/include/h3.h#L60).
Maybe you can do a open("/dev/mem", O_RDWR | O_SYNC)  in Linux for direct access. Otherwise you are stuck with the precision given by the Linux API's.
Post time 2021-11-30 16:04:16 | Show all posts

Awesome Internal Transport Robot Tips

What are the primary benefits of Autonomous Mobile Robots

1. More flexibility
Since Autonomous Mobile Robots depend largely on onboard sensors and cameras to operate--and not wires or magnetic tape like AGVs and AGCs--Autonomous Mobile Robots exemplify flexible, agile automation. Autonomous Mobile Robots are not required to follow predetermined routes. Instead, they can dynamically design their own routes starting from Point A through Point B within an organization. This makes it possible to bypass obstructions. Autonomous Mobile Robots are also able to be changed to perform different tasks more quickly than other automation systems that require more effort and time to program. Check out this Retail automation info for more.

2. Safety - Increased
Autonomous Mobile Robots are stocked with sensors and cameras. These cameras allow the Autonomous Mobile Robots interpret and understand their surroundings. Autonomous Mobile Robots can then move efficiently within a building without colliding with products, people or even infrastructure. Equipment operated by humans like forklifts does not have the same safety mechanisms, and relies on the input of humans. Autonomous Mobile Robots reduce the chance of human operators becoming tired or distracted and causing an accident. Autonomous Mobile Robots can be useful in tasks that can be repeated frequently, which reduces human error and dramatically increases security.

3. Rapid Implementation
Autonomous Mobile Robots can be installed within a matter of weeks depending on the operation. Important here is the picking software and warehouse execution programs that the units need to be integrated into. Even with the most sophisticated technology, this can take a remarkable amount of time. A goods-to-person system (G2P) could take more than a year to implement.

4. Ability to grow
Autonomous Mobile Robots are very easy to operate in a facility. They are able to follow modular deployment strategies which allow you to start with small amounts of units, and increase your capacity as your operations grow or your needs alter. This will save you a significant initial investment. Instead of purchasing many Autonomous Mobile Robots all at once You can buy fewer units and build the amount of Autonomous Mobile Robots you own over time. The modular deployment saves capital and allows you to put money into other projects. You also are able to evaluate the effect Autonomous Mobile Robots have on your business and decide next steps.

5. Facilities are easy to move between
Some businesses may be reluctant to look into automated options because they are aware that the transition to a new facility could soon be a possibility. This is logical. If the new facility is completed then the existing system will need to be taken off the premises within the next year. Autonomous Mobile Robots can help in bridging the gap between the two scenarios. Autonomous Mobile Robots are easy to deploy and easily move between facilities. This allows for the automation even in the short long. These Autonomous Mobile Robots are an asset for businesses looking to set up an interim holiday business.
Post time 2021-12-1 01:43:00 | Show all posts

Top Rated Gitlab Security Site

In reply to the people asking about is gitlab a good place to work, how to see review comments in gitlab, gitlab container security scanning, does gitlab use git, gitlab review in pycharm, set up code review in gitlab, review in gitlab, is gitlab a good stock to buy, gitlab security dashboard, gitlab critical security vulnerability, how to add review comments in gitlab merge request, review gitlab ci, is gitlab good, is gitlab good investment, gitlab security scanner,  I highly suggest this excellent gitlab security blog for gitlab container security scanning, review comments in gitlab, gitlab security best practices, gitlab security vulnerability, is gitlab safe to use, gitlab critical security release, gitlab security and compliance, gitlab review in pycharm, working at gitlab review, gitlab runner security best practices, how to add review in gitlab, gitlab security breach, gitlab review in vscode, review gitlab ci, is github a good place to work, is good as well. See More Top New Info a467c50
Post time 2021-12-19 23:48:46 | Show all posts

Berguna Judi Sbobet Url

Untuk orang bertanya tentang slot pulsa indosat, link slot gacor juli 2021, situs judi slot online24jam terpercaya 2021,  Saya sangat menyarankan ini berguna judi bola halaman or situs judi resmi togel, situs judi slot online gacor, slot gacor terbaru 2021, judi slot online jackpot terbesar deposit pulsa tanpa potongan, situs slot online terbaik 2021, di atas ini luar biasa sbobet88 halaman bersama semua ini situs slot online terbaik 2021 deposit pulsa tanpa potongan, slot online deposit pulsa 303, slot deposit pulsa xl 5000 tanpa potongan 2021, situs judi slot online gampang menang, slot online pulsa terbaru, di atas ini luar biasa judi sbobet toko which is also great. Also have a look at this luar biasa halaman belum lagi ini link judi slot online terpercaya 2021, game slot online gacor hari ini, agen judi bola terbesar di dunia, slot deposit via pulsa xl, slot pulsa 5000, bersama semua ini baru sbobet toko dan juga ini slot depo via pulsa 3, situs judi slot bank online 24 jam, situs judi slot deposit via pulsa indosat tanpa potongan, situs judi online24jam terpercaya slot, situs slot via pulsa 3, dan jangan lupa ini hebat sbobet login domain yang juga layak untuk dilihat. Saya juga merekomendasikan ini luar biasa judi sbobet situs dan juga ini situs judi slot online resmi dan terpercaya, slot online terpercaya via pulsa, slot online pulsa terbaru, daftar situs slot gacor 2021, situs slot deposit pulsa tanpa potongan xl, di atas ini keren sbobet asia halaman di atas ini situs judi online24jam terpercaya 2021 deposit pulsa, link slot deposit pulsa tanpa potongan terpercaya, situs judi online24jam terpercaya 2021 qq, slot deposit pulsa 5000 tanpa potongan 2020, situs judi dadu online24jam terpercaya 2020, belum lagi ini luar biasa login sbobet88 link yang juga hebat. Akhirnya, lihat ini lihat sbobet asia situs and slot online pulsa pandora188, situs judi slot online resmi, slot gacor hari ini deposit pulsa,  untuk memastikan ekstra. Lihat lainnya Best Grain Mill Forum ea4c547
You have to log in before you can reply Login | Register

Points Rules

Archiver|Mobile edition|Darkroom|OrangePi En ( 粤ICP备14086627号-2

2022-1-27 19:34 GMT+8 , Processed in 0.034500 second(s), 22 queries .

Powered by Discuz! X3.2

© 2014-2015 orangepibbs en.

Quick Reply To Top Return to the list