background preloader

See at time

Facebook Twitter

ELECTROMAGNETISM (FULL SHOW) Gammon Forum : Electronics : Microprocessors : RS485 communications. This post describes how you can connect multiple Arduinos together via an RS485 connection.

Gammon Forum : Electronics : Microprocessors : RS485 communications

This is useful in situations where you need to connect devices together over longer distances than I2C or SPI can handle. The RS485 protocol is described here: Basically it is an electrical protocol which allows you to communicate over long wires because it is "balanced". MICROCONTROLLER to PC Communication via PL2303 (USB TO UART TTL) Converter - 2. Data Communication: Communication between/among systems physically or remotely.

MICROCONTROLLER to PC Communication via PL2303 (USB TO UART TTL) Converter - 2

Types of Data Communication Point-to-point Communication (RS-232)Bus-based Communication (I^2C,SPI,PCI,PCI-EXPRESS, USB, SATA) Speed Rates PC serial port: Serial communication means transferring a single bit at a time. RS-232 is a standard communication protocol for linking computer and its peripheral devices to allow serial data exchange. Serial Data Transmission Types: Simplex mode: Sender----------------------->Receiver(T) one-way (as, sensor data) Half Duplex mode: Sender<=============>Receiver(T/R), once at a time (as, radio-system) Full Duplex mode: Sender<=============>Receiver (T&R), two way simultaneously (as, telephone) Problem: IT didn't define elements such as--- >>character encoding, >>framing of characters, >>error detection protocols etc that are essential features when data transfer takes place between a computer and a printer.

Solution: The Physical Transmission: The RS232C port of PC uses voltages: On-line CRC calculation and free library. Whenever digital data is stored or interfaced, data corruption might occur.

On-line CRC calculation and free library

Since the beginning of computer science, people have been thinking of ways to deal with this type of problem. For serial data they came up with the solution to attach a parity bit to each sent byte. This simple detection mechanism works if an odd number of bits in a byte changes, but an even number of false bits in one byte will not be detected by the parity check. To overcome this problem people have searched for mathematical sound mechanisms to detect multiple false bits. The CRC calculation or cyclic redundancy check was the result of this. One might think, that using a checksum can replace proper CRC calculations. In this example we have used a one byte long checksum which gives us 256 different values. The idea behind a check value calculation is simple. Int F_chk_8( int bval, int cval ) { retun ( bval + cval ) % 256; } The idea behind CRC calculation is to look at the data as one large binary number. Interrupt request (PC architecture) - Wikipedia.

In a computer, an interrupt request (or IRQ) is a hardware signal sent to the processor that temporarily stops a running program and allows a special program, an interrupt handler, to run instead.

Interrupt request (PC architecture) - Wikipedia

Hardware interrupts are used to handle events such as receiving data from a modem or network card, key presses, or mouse movements. Interrupt lines are often identified by an index with the format of IRQ followed by a number. For example, on the Intel 8259 family of PICs there are eight interrupt inputs commonly referred to as IRQ0 through IRQ7. In x86 based computer systems that use two of these PICs, the combined set of lines are referred to as IRQ0 through IRQ15.

Technically these lines are named IR0 through IR7, and the lines on the ISA bus to which they were historically attached are named IRQ0 through IRQ15. Newer x86 systems integrate an Advanced Programmable Interrupt Controller (APIC) that conforms to the Intel APIC Architecture. Gilluwe, Frank van. Search terms. Direct memory access - Wikipedia. AMD DirectGMA is a form of DMA.

Direct memory access - Wikipedia

It enables low-latency peer-to-peer data transfers between devices on the PCIe bus and AMD FirePro-branded products. SDI devices supporting DirectGMA can write directly into the graphics memory of the GPU and vice versa the GPU can directly access the memory of a peer device. Direct memory access (DMA) is a feature of computer systems that allows certain hardware subsystems to access main system memory (RAM), independent of the central processing unit (CPU).

Without DMA, when the CPU is using programmed input/output, it is typically fully occupied for the entire duration of the read or write operation, and is thus unavailable to perform other work. With DMA, the CPU first initiates the transfer, then it does other operations while the transfer is in progress, and it finally receives an interrupt from the DMA controller when the operation is done. Configuration Data: Using the Internal FLASH instead of an external EEPROM. Many applications need to store persistent (non-volatile) data at runtime: configuration data, error logs, sensor data, calibration values, etc.

Configuration Data: Using the Internal FLASH instead of an external EEPROM

The question is: where to store that data? If it is only a few kBytes, an SD card or similar is an overkill. Adding an external EEPROM? Sure, that works, but adds an extra part to the design. Some microcontroller have internal EEPROM.