|
This is a very simple example to use the UART (low level).
Test PCB with RaspberryPI B and FTDI CP2102.
The UART read-write-loop works very fast. The baud rate of 256000 answers the sending characters without an error.
RPI and UART (low level): RPI_UART.ZIP
RPI and LC-Display SSD1289: RPI2_UART.ZIP
The unit "RUART.pas" use the unit "PReg.pas".
"procedure UART_Init(baud_rate : LongWord); " - initializing the UART with baud rate as parameter
"function UART_Status : Boolean;" - read the status of the receiving register
"function UART_Read : Byte;" - reads the byte in the receiving register (waits until a byte is available)
"procedure UART_Write(UW_Value : Byte);" - send a byte to UART (waits until the register is ready to send)