Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mkr2 #97

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Mkr2 #97

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions dk92_cheltsov/Readmy.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

- Full name: Cheltsov Heorhee
- **Group:** ДК-92
- Organization/University: Igor Sikorsky Kyiv Polytechnic Institute
- Department: The Department of Design of Electronic Digital Equipment
- Ph.number: +380963904072
- Telegram `@dj0bsh <https://t.me/dj0bsh>`_.
- Email: [email protected]
27 changes: 27 additions & 0 deletions dk92_cheltsov/laba0/laba0.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
def voltage_ripple(VAC, Iav, C):
VDC = 0
Vrip = 0
Vrip_per = 0
print('You enter VAC = %fV'%VAC)
print ('Current of load = %fA'%Iav)
print('Capacitance = %fuF'%C)
VDC = VAC*1.414-1.2
print('Maximum voltage after full bridge rectifier = %fV'%VDC)
Vrip = Iav/(2*C*(10**-6)*50)
print('Voltage ripple on load = %fV'%Vrip)
Vrip_per = Vrip/VDC*100
print('Voltage ripple on load = %f%%' %Vrip_per)
print('Percent of ripple is', end=' ')
if Vrip_per <= 1:
print('exelent')
elif Vrip_per <= 2:
print('good')
elif Vrip_per <= 5:
print('not bad')
elif Vrip_per <= 10:
print('normal')
elif Vrip_per <= 20:
print('very bad')
else:
print('it`s won`t work correctly')
return Vrip
14 changes: 14 additions & 0 deletions dk92_cheltsov/laba1/Readme.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Лабораторна робота №1
=====================

Данна лаболаторна робота створена для органызації комфортного вводу ввиводу для курсової роботи

`Репозиторій курсової роботи <https://github.com/dj0b/Corse_work_morse>`_.


Алгоритм користування

- запустити программу, ввести повідомлення яке потрібно передати
- запустити тестберч проекту у ModelSim (-vsim -do sim_controller.do)
- після симуляції перевірити вхідні та вихідні файли

4 changes: 4 additions & 0 deletions dk92_cheltsov/laba1/inh.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
4c
4f
4c
ff
1 change: 1 addition & 0 deletions dk92_cheltsov/laba1/input.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
LOL
64 changes: 64 additions & 0 deletions dk92_cheltsov/laba1/morse_consol.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
#!/usr/bin/env python3

"""This module created for using as consol in project
https://github.com/dj0b/Corse_work_morse
BEFORE START PROJECT OPEN MODELSIM
inh.txt(input ROM) - input text file every letter in new line and in heximal format
outh.txt(outpur ROM) - output text file lines 0-5 is service, xx - undefined symbols
"""

end_str = "ff"
print('!Max length is 4095 symbols!')
in_str = input('Enter your messege: ')
"""read and save massege for transmission"""

in_str = in_str.upper()
t = open("input.txt", "w")
t.write(in_str)
t.close()
"""write massege for transmission analis"""

in_list = []
in_list = list(in_str)
print(in_list)
"""convert string to list for a simpler next convertion in ASCII(hex) """

hex_str = ""
for in_list in in_list:
hex_str += format(ord(in_list), "x") + "\n"
"""convert letters to ASCII format """

hex_str += end_str
print(hex_str)

i = open("inh.txt", "w")
in_str = in_str.upper()
i.write(hex_str)
i.close()
"""write in files for initialization input ROM"""

input('pres enter when simulation end ')

o = open("outh.txt", "r")
lines = o.read().splitlines()
o.close()
del(lines[0:5])
del(lines[len(in_str):4099])
print(lines)
"""read file delate service and undefined lines"""

text = ""
for lines in lines:
bytes_object = bytes.fromhex(lines)
ascii_string = bytes_object.decode("ASCII")
text += ascii_string
"""convert ASCII to letters"""

print(text)
f = open("output.txt", "w")
f.write(text)
f.close()
"""write in files analis"""



Loading