mirror of
https://github.com/eddyem/STM8_samples.git
synced 2025-12-06 10:45:12 +03:00
add
This commit is contained in:
parent
48a3b5a31e
commit
18dbf01b15
6
voltmeters/calc/K.m
Normal file
6
voltmeters/calc/K.m
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
function [u dmax] = K(U, ADU)
|
||||||
|
adu = uint32(ADU);
|
||||||
|
U = uint32(bitshift(U*1000,17));
|
||||||
|
u = uint32(U/adu);
|
||||||
|
dmax = 2*uint32(2^31/u);
|
||||||
|
endfunction
|
||||||
6
voltmeters/calc/Ux.m
Normal file
6
voltmeters/calc/Ux.m
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
function u = Ux(ADU, K)
|
||||||
|
adu = uint32(ADU);
|
||||||
|
adu *= K;
|
||||||
|
adu = bitshift(adu, -17);
|
||||||
|
u = uint32(adu);
|
||||||
|
endfunction
|
||||||
BIN
voltmeters/kicad/5-digit/5digit_voltmeter.pdf
Normal file
BIN
voltmeters/kicad/5-digit/5digit_voltmeter.pdf
Normal file
Binary file not shown.
BIN
voltmeters/kicad/5-digit/sch.png
Normal file
BIN
voltmeters/kicad/5-digit/sch.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 173 KiB |
Loading…
x
Reference in New Issue
Block a user