From 007e8b9e5af4caab06c2768c58c95ee08ba50836 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sat, 26 Aug 2023 12:01:55 +0200 Subject: [PATCH] added a section about time units --- doc/clocks.md | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/doc/clocks.md b/doc/clocks.md index 161d680fb..b2ba3c995 100644 --- a/doc/clocks.md +++ b/doc/clocks.md @@ -7,6 +7,7 @@ The device side firmware uses a range of different clocks. Here is an attempt t # Table of Contents - [Notes on device side clocks](#notes-on-device-side-clocks) - [Table of Contents](#table-of-contents) + - [Units](#units) - [Slow clock](#slow-clock) - [Main Oscillator / MAINCK](#main-oscillator--mainck) - [PLL clock](#pll-clock) @@ -15,9 +16,48 @@ The device side firmware uses a range of different clocks. Here is an attempt t - [1 kHz RTC: TickCount functions](#1-khz-rtc-tickcount-functions) - [Occasional PWM timer](#occasional-pwm-timer) - [Occasional TC0+TC1 / CountUS functions](#occasional-tc0tc1--countus-functions) - - [Occasional TC0+TC1+TC2 SSP_CLK from FPGA / CountSspClk functions](#occasional-tc0tc1tc2-ssp_clk-from-fpga--countsspclk-functions) + - [Occasional TC0+TC1+TC2 SSP\_CLK from FPGA / CountSspClk functions](#occasional-tc0tc1tc2-ssp_clk-from-fpga--countsspclk-functions) - [Occasional TC0+TC1 / Ticks functions](#occasional-tc0tc1--ticks-functions) + +## Units +^[Top](#top) + +Good calculator +https://www.unitjuggler.com/convert-frequency-from-MHz-to-ns(p).html?val=3.39 + +Basic units of time measurment or how long in time is a Hertz? + +``` +1 hertz = 1 second = 1000 milli seconds +10 Hertz = 1 / 10 = 0,1 = 100 milli seconds +100 Hertz = 1 / 100 = 0,01 = 10 milli seconds +1 kHz = 1 / 1000 = 0,001 = 1 milli seconds +10 kHz = 1 / 10 000 = 0,000 1 = 100 micro seconds +100 kHz = 1 / 100 000 = 0,000 01 = 10 micro seconds +1 MHZ = 1 / 1 000 000 = 0,000 001 = 1 micro seconds +``` + +- kHz, Kilo Hertz, 1000 Hertz +- MHz, Mega Hertz, 1000 000 Hertz + + +Basic units of time you will run into in the RFID world. + +``` +13.56 MHz = 1 / 13 560 000 = 73,74 nano seconds = 0,07374 micro seconds +125 kHz = 1/ 125 000 = 8 micro seconds +``` + +Given these units the following clocks used by Proxmark3 wil make more sense. + +Like the SSP Clock running at 3.39 MHz. +3.39 MHz = 1 / 3 390 000 = 294,98 nano seconds = 0,2949 micro seconds + +1 tick at 3.39 MHz is 294.98 nano seconds. + + + ## Slow clock ^[Top](#top)