Skip to content
Snippets Groups Projects
Commit 5a4ea709 authored by Peter Gerwinski's avatar Peter Gerwinski
Browse files

Nachbereitung 16.11.2022

parent 967625e0
No related branches found
No related tags found
No related merge requests found
#include <boost/asio/io_service.hpp>
#include <boost/asio/write.hpp>
#include <boost/asio/buffer.hpp>
#include <boost/asio/ip/tcp.hpp>
#include <array>
#include <string>
#include <iostream>
using namespace boost::asio;
using namespace boost::asio::ip;
io_service ioservice;
tcp::resolver resolv{ioservice};
tcp::socket tcp_socket{ioservice};
std::array<char, 4096> bytes;
void read_handler(const boost::system::error_code &ec,
std::size_t bytes_transferred)
{
if (!ec)
{
std::cout.write(bytes.data(), bytes_transferred);
tcp_socket.async_read_some(buffer(bytes), read_handler);
}
}
void connect_handler(const boost::system::error_code &ec)
{
if (!ec)
{
std::string r = "GET /\r\n";
write(tcp_socket, buffer(r));
tcp_socket.async_read_some(buffer(bytes), read_handler);
}
}
void resolve_handler(const boost::system::error_code &ec,
tcp::resolver::iterator it)
{
if (!ec)
tcp_socket.async_connect(*it, connect_handler);
}
int main()
{
tcp::resolver::query q{"ngc224.gerwinski.de", "http"};
resolv.async_resolve(q, resolve_handler);
ioservice.run();
}
20221116/330px-R2r-netzwerk.png

7.04 KiB

Quelle: https://de.wikipedia.org/wiki/Datei:R2r-netzwerk.png
Lizenz: CC BY-SA 2.0 DE - https://creativecommons.org/licenses/by-sa/2.0/de/deed.de
No preview for this file type
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
% Attribution-ShareAlike 3.0 Unported License along with this % Attribution-ShareAlike 3.0 Unported License along with this
% document. If not, see <http://creativecommons.org/licenses/>. % document. If not, see <http://creativecommons.org/licenses/>.
% README: Bus-Systeme: SPI, PWM, Sonstiges; Echtzeit % README: Bus-Systeme: SPI, PWM, Sonstiges
\documentclass[10pt,t]{beamer} \documentclass[10pt,t]{beamer}
...@@ -79,13 +79,11 @@ ...@@ -79,13 +79,11 @@
\item[4.1] PWM \item[4.1] PWM
\item[4.1] Sonstiges \item[4.1] Sonstiges
\end{itemize} \end{itemize}
\item[\textbf{\dots}] \item[\textbf{5}] \textbf{Echtzeit}
\end{itemize} \end{itemize}
% \strut\hfill \url{https://www.peter.gerwinski.de/download/net-2013ss.tar.gz}
% \vspace*{-1cm plus 1filll} \vspace*{-2cm}
\underconstruction
% \underconstruction
\end{frame} \end{frame}
...@@ -482,15 +480,15 @@ ...@@ -482,15 +480,15 @@
\item[4.1] PWM \item[4.1] PWM
\item[4.1] Sonstiges \item[4.1] Sonstiges
\end{itemize} \end{itemize}
\item[\textbf{6}] \textbf{Echtzeit} \item[\textbf{5}] \textbf{Echtzeit}
\begin{itemize} \begin{itemize}
\color{red} \color{red}
\item[6.1] Was ist Echtzeit? \item[5.1] Was ist Echtzeit?
\item[6.2] Echtzeitprogrammierung \item[5.2] Echtzeitprogrammierung
\item[5.3] Multitasking
\color{black} \color{black}
\item[6.3] Multitasking \item[5.4] Ressourcen
\item[6.4] Ressourcen \item[5.5] Prioritäten
\item[6.5] Prioritäten
\end{itemize} \end{itemize}
\end{itemize} \end{itemize}
...@@ -499,6 +497,8 @@ ...@@ -499,6 +497,8 @@
\end{frame} \end{frame}
\iffalse
\section{Echtzeit} \section{Echtzeit}
\subsection{Was ist Echtzeit?} \subsection{Was ist Echtzeit?}
...@@ -868,8 +868,6 @@ ...@@ -868,8 +868,6 @@
\end{frame} \end{frame}
\iffalse
\subsectionnonumber{Zombies} \subsectionnonumber{Zombies}
\begin{frame} \begin{frame}
......
UART und USART, 16.11.2022, 12:28:08
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
UART = Universal Asynchronous Receiver Transmitter
USART = Universal Synchronous/Asynchronous Receiver Transmitter
... sind elektronische Schaltungen, die zur Realisierung
digitaler serieller Schnittstellen dienen. [Wikipedia: UART]
UART = Baustein, der RS-232 und/oder RS-485 kann
USART = Baustein, der zusätzlich noch I²C/TWI und/oder SPI kann
SPI: Bezeichnungen, 16.11.2022, 12:33:35
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Statt Master/Slave:
- Primary/Replica
- Primary/Standby
- Leader/Follower
- Conductor/Follower
MOSI: Master Out, Slave In --> PORI, POSI, LOFI, COFI
MISO: Master In, Slave Out --> PIRO, PISO, LIFO, CIFO
Die Open Source Hardware Association (OSHWA)
und de.wikipedia.org benutzen Controller/Peripheral
und somit PICO (peripheral in / controller out),
POCI und CS (chip select). Siehe:
https://www.oshwa.org/a-resolution-to-redefine-spi-signal-names/
20221116/led-matrix.png

56.9 KiB

20221116/pwm-100-prozent.png

27.1 KiB

20221116/pwm-50-prozent.png

37.8 KiB

20221116/pwm-75-prozent.png

34 KiB

20221116/pwm-analoge-signaluebertragung.png

60 KiB

File added
20221116/tastermatrix.png

45.3 KiB

20221116/widerstandsnetzwerk-1.png

17.7 KiB

20221116/widerstandsnetzwerk-2.png

52.6 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment