{"id":20195436,"url":"https://github.com/charkster/samd21-32bit-timer","last_synced_at":"2025-03-03T08:12:19.543Z","repository":{"id":158988131,"uuid":"295260807","full_name":"charkster/samd21-32bit-timer","owner":"charkster","description":"SAMD21 32bit Timer","archived":false,"fork":false,"pushed_at":"2022-10-22T23:37:10.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-13T19:26:56.487Z","etag":null,"topics":["arduino","gpio","samd21","seeeduino-samd","timer","trinket-m0"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/charkster.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-14T00:07:04.000Z","updated_at":"2022-10-22T23:37:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"fb79cbdd-46c4-43ef-842a-1705513e2e4b","html_url":"https://github.com/charkster/samd21-32bit-timer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charkster%2Fsamd21-32bit-timer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charkster%2Fsamd21-32bit-timer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charkster%2Fsamd21-32bit-timer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charkster%2Fsamd21-32bit-timer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/charkster","download_url":"https://codeload.github.com/charkster/samd21-32bit-timer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241629773,"owners_count":19993710,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arduino","gpio","samd21","seeeduino-samd","timer","trinket-m0"],"created_at":"2024-11-14T04:17:24.598Z","updated_at":"2025-03-03T08:12:19.532Z","avatar_url":"https://github.com/charkster.png","language":"C++","readme":"SAMD21 32bit timer.\n\nThis arduino program will enable a 32bit timer on a SAMD21 by combining TC Counters 4 \u0026 5.\nThe SAMD21 is configured to load the CC0 and CC1 with pulse and period measurements from a single pin.\nMy purpose for creating this was to trim oscillators and measure longer durations.\nThis arduino file will work on both the Seeeduino XIAO and Adafruit Trinket M0 (tested on both).\nOnce programmed a serial port needs to be opened to the device before the measurement is made.\nAn optional delay is included after a single period has been measured (as to not overwhelm the serial port).\n\nI highly recommend the Seeedino Xiao over the Trinket M0 as it is cheaper and has more pins.\nI'm not a big fan of the USB C connector on the Xiao (I prefer the Trinket M0's micro USB), as I needed to buy more C type cables.\nMy Seedino Xiao spends most of the time connected to my Raspberry Pi (as the Pi does not have any real-time measuring capability). \n\nWhy use a 32bit timer instead of a 16bit one? A 32bit timer can measure a period/pulse of 89.5 seconds at maximum precision without overflowing ( 20.8ns * 2 ^ 32 ).\nWhat can a 16bit timer measure (without overflowing, at maximum precision)... 1.36 milliseconds.\n\nThere is no license for this work, it is use-at-your-own-risk (I assume no liability).\nMany parts of this program came from on-line forums. I included the URLs in the program header to give credit.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharkster%2Fsamd21-32bit-timer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcharkster%2Fsamd21-32bit-timer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharkster%2Fsamd21-32bit-timer/lists"}