mirror of
https://github.com/sergeyyarkov/pdsp188x.git
synced 2026-10-11 18:38:53 +03:00
50 lines
1.2 KiB
Markdown
50 lines
1.2 KiB
Markdown
# PDSP188x Dot Matrix Display Interfacing Library
|
|
|
|
[](https://opensource.org/licenses/Apache-2.0)
|
|
|
|
This library provides an interfacing API for displaying characters and numbers.
|
|
<br>
|
|
<br>
|
|
|
|
<p align="center">
|
|
<img src="./media/pdsp188x-image.jpg" alt="PDSP188x" width="300">
|
|
<br>
|
|
PDSP188x Dot Matrix Display
|
|
</p>
|
|
|
|
<a href="./media/datasheet.pdf">Datasheet</a>
|
|
|
|
## Connection
|
|
|
|
This connection method uses a 595 shift register. For AVR MCUs, you need to connect the CLK, DATA, and LATCH pins to SCK, MOSI, and SS respectively. Connect the remaining pins to any GPIO pin.
|
|
|
|
<p align="center">
|
|
<img src="./media/schematic.png" alt="Schematic" width="600">
|
|
<br>
|
|
Connection method with shift register
|
|
</p>
|
|
|
|
## Example Usage
|
|
|
|
1. Clone the repository and configure the port numbers inside the `config_{arch}.h` file.
|
|
2. Pass the interface implementation into the initialization function:
|
|
|
|
```c
|
|
#include "main.h"
|
|
#include "pdsp188x/port/avr/avr.h"
|
|
|
|
int main(void) {
|
|
uint16_t counter = 0;
|
|
|
|
PDSP188x_Init(&PDSP188x_AVR_Driver);
|
|
PDSP188x_SetBrightness(PDSP188x_BRIGHTNESS_LEVEL_100);
|
|
|
|
while (1) {
|
|
PDSP188x_Clear();
|
|
PDSP188x_SendStr("C=");
|
|
PDSP188x_SendInt16(counter++);
|
|
_delay_ms(500);
|
|
}
|
|
}
|
|
```
|