Generátor PWM signálu s indikací nastavené frekvence a střídy na OLED displeji SSD1306.
Schéma zapojení

Zdrojové kódy
Funkce main() a CMakeLists.txt pro sestavení projektu
generator_pulsu.c
/* generator_pulsu.c
* Generator PWM pulsu s ovladanim RPi Pico verze 2.0
* (c) Jirka Chráska 2025, <jirka@lixis.cz> All rights reserved.
*
* BSD licence
*/
#include <stdio.h>
#include "pico/stdlib.h"
#include "hardware/pwm.h"
#include "hardware/gpio.h"
// displej OLED SSD1306
// ------------------------------------------------------------------------
#include "ssd1306.h"
#include "font_spleen_16x8a.h"
#define I2C_CISLO i2c0
#define I2C_DATA_PIN 4
#define I2C_HODINY_PIN 5
#define I2C_FREQ 400000
#define DISPLAY_WIDTH 128
#define DISPLAY_HEIGHT 32
#define I2C_ADDRESS 0x3C
// truktura pro displej
ssd1306_t disp;
void setup_oled_displej(void)
{
// nastavení i2c sběrnice
i2c_init(I2C_CISLO, I2C_FREQ);
gpio_set_function(I2C_DATA_PIN, GPIO_FUNC_I2C);
gpio_set_function(I2C_HODINY_PIN, GPIO_FUNC_I2C);
gpio_pull_up(I2C_DATA_PIN);
gpio_pull_up(I2C_HODINY_PIN);
// nastavení dipleje OLED
disp.external_vcc = false;
ssd1306_init(&disp, DISPLAY_WIDTH, DISPLAY_HEIGHT, I2C_ADDRESS, I2C_CISLO);
ssd1306_clear(&disp);
}
// ------------------------------------------------------------------------
// tlačítka na ovládání PWM
const uint FREQ_PLUS = 12; // pin pro tlačítko na přidání frekvence
const uint FREQ_MINUS = 13; // pin pro tlačítko na ubrání frekvence
const uint DUTY_PLUS = 15; // pin pro tlačítko na přidání střídy
const uint DUTY_MINUS = 14; // pin pro tlačítko na ubrání střídy
const uint PWM_PIN = 16; // výstup PWM
static int freq = 1000;
static int duty = 50;
static bool zmena = false;
#define JEDNOTKY 500
#define DESITKY 3000
#define STOVKY 6000
#define TISICE 12000
// ------------------------------------------------------------------------
// výpočet frekvence a střídy
uint32_t pwm_set_freq_duty( uint slice_num, uint chan, uint32_t f, int d)
{
uint32_t clock = 125000000;
uint32_t divider16 = clock / f / 4096 + (clock % (f * 4096) != 0);
if( divider16 / 16 == 0) {
divider16 = 16;
}
uint32_t wrap = clock * 16 / divider16 / f - 1;
pwm_set_clkdiv_int_frac( slice_num, divider16/16, divider16 & 0xf );
pwm_set_wrap( slice_num, wrap );
pwm_set_chan_level( slice_num, chan, wrap * d/100 );
return wrap;
}
// získání události na GPIO pinu gpio
uint32_t gpio_get_events(uint gpio)
{
int32_t mask = 0xF << 4 * (gpio % 8);
return (io_bank0_hw->intr[gpio / 8] & mask) >> 4 * ( gpio % 8);
}
// výmaz události na GPIO pinu gpio
void gpio_clear_events(uint gpio, uint32_t events)
{
gpio_acknowledge_irq(gpio, events);
}
// ------------------------------------------------------------------------
// změny na displeji a v PWM
int udelej_zmeny()
{
char buf[40];
// změna PWM
uint slice = pwm_gpio_to_slice_num (PWM_PIN);
uint channel = pwm_gpio_to_channel (PWM_PIN);
pwm_set_freq_duty(slice, channel, freq, duty);
pwm_set_enabled (slice, true);
// zobrazení na displeji
// výmaz displeje
ssd1306_clear(&disp);
snprintf(buf,40,"Freq: %6d Hz", freq);
ssd1306_draw_string_with_font(&disp, 0, 0, 1, font_spleen_16x8a, buf);
snprintf(buf,40,"Duty: %3d %%", duty);
ssd1306_draw_string_with_font(&disp, 0, 16, 1, font_spleen_16x8a, buf);
// zobrazení na displeji
ssd1306_show(&disp);
zmena = false;
}
// ------------------------------------------------------------------------
// odchytávání a zpracování událostí tlačítek
void chytni_udalost()
{
uint64_t t1;
uint64_t t2;
uint64_t t;
int32_t event_fp = gpio_get_events( FREQ_PLUS );
int32_t event_fm = gpio_get_events( FREQ_MINUS );
int32_t event_dp = gpio_get_events( DUTY_PLUS );
int32_t event_dm = gpio_get_events( DUTY_MINUS );
sleep_ms(1);
if( event_fp & GPIO_IRQ_EDGE_RISE ) { // změna frekvence nahoru
t1 = time_us_64();
gpio_clear_events(FREQ_PLUS, GPIO_IRQ_EDGE_RISE | GPIO_IRQ_EDGE_FALL);
while( !(gpio_get_events(FREQ_PLUS) & GPIO_IRQ_EDGE_FALL)) {
t2 = (uint64_t) time_us_64();
t = (t2 - t1)/1000;
if( t > JEDNOTKY && t <= DESITKY ) {
freq++;
}
if( t > DESITKY && t <= STOVKY ) {
freq += 10;
}
if( t > STOVKY && t <= TISICE ) {
freq += 100;
}
if( t > TISICE ) {
freq += 1000;
}
zmena = true;
udelej_zmeny();
}
if( t<= JEDNOTKY ) {
freq++;
}
zmena = true;
}
if( event_fm & GPIO_IRQ_EDGE_RISE ) { //změna frekvence dolů
t1 = time_us_64();
gpio_clear_events(FREQ_MINUS, GPIO_IRQ_EDGE_RISE | GPIO_IRQ_EDGE_FALL);
while( !(gpio_get_events(FREQ_MINUS) & GPIO_IRQ_EDGE_FALL)) {
t2 = (uint64_t) time_us_64();
t = (t2 - t1)/1000;
if( t > JEDNOTKY && t <= DESITKY ) {
freq--;
}
if( t > DESITKY && t <= STOVKY ) {
freq -= 10;
}
if( t > STOVKY && t <= TISICE) {
freq -= 100;
}
if( t > TISICE ) {
freq -= 1000;
}
if( freq <= 0 ) {
freq = 0;
}
zmena = true;
udelej_zmeny();
}
if( t<= JEDNOTKY ) {
freq--;
}
if( freq < 0) {
freq = 0;
}
zmena = true;
}
if( event_dp & GPIO_IRQ_EDGE_RISE ) { // změna střídy nahoru
t1 = time_us_64();
gpio_clear_events(DUTY_PLUS, GPIO_IRQ_EDGE_RISE | GPIO_IRQ_EDGE_FALL);
while( !(gpio_get_events(DUTY_PLUS) & GPIO_IRQ_EDGE_FALL)) {
t2 = (uint64_t) time_us_64();
t = (t2 - t1)/1000;
if( t > JEDNOTKY ) {
duty++;
if( duty > 99) {
duty = 99;
}
zmena = true;
udelej_zmeny();
}
}
if( t<= JEDNOTKY ) {
duty++;
}
if( duty > 99) {
duty = 99;
}
zmena = true;
}
if( event_dm & GPIO_IRQ_EDGE_RISE ) { // změna střídy dolů
t1 = time_us_64();
gpio_clear_events(DUTY_MINUS, GPIO_IRQ_EDGE_RISE | GPIO_IRQ_EDGE_FALL);
while( !(gpio_get_events(DUTY_MINUS) & GPIO_IRQ_EDGE_FALL)) {
t2 = (uint64_t) time_us_64();
t = (t2 - t1)/1000;
if( t > JEDNOTKY ) {
duty--;
if( duty < 1) {
duty = 1;
}
zmena = true;
udelej_zmeny();
}
}
if( t<= JEDNOTKY ) {
duty--;
}
if( duty < 1) {
duty = 1;
}
zmena = true;
}
gpio_clear_events(FREQ_MINUS, GPIO_IRQ_EDGE_RISE | GPIO_IRQ_EDGE_FALL);
gpio_clear_events(FREQ_PLUS, GPIO_IRQ_EDGE_RISE | GPIO_IRQ_EDGE_FALL);
gpio_clear_events(DUTY_PLUS, GPIO_IRQ_EDGE_RISE | GPIO_IRQ_EDGE_FALL);
gpio_clear_events(DUTY_MINUS, GPIO_IRQ_EDGE_RISE | GPIO_IRQ_EDGE_FALL);
}
// ------------------------------------------------------------------------
int main(void)
{
// konfigurace debugování přes USB
stdio_init_all();
sleep_ms(1000);
// konfigurace displeje
setup_oled_displej();
// nastavení PWM výstupu
gpio_set_function(PWM_PIN, GPIO_FUNC_PWM);
zmena = true;
udelej_zmeny();
// nastavení pinu frekvence přidat
gpio_set_function( FREQ_PLUS, GPIO_FUNC_SIO );
gpio_set_dir( FREQ_PLUS, false );
gpio_pull_down( FREQ_PLUS );
gpio_clear_events(FREQ_PLUS, GPIO_IRQ_EDGE_RISE | GPIO_IRQ_EDGE_FALL);
// nastavení pinu frekvence ubrat
gpio_set_function( FREQ_MINUS, GPIO_FUNC_SIO );
gpio_set_dir( FREQ_MINUS, false );
gpio_pull_down( FREQ_MINUS );
gpio_clear_events(FREQ_MINUS, GPIO_IRQ_EDGE_RISE | GPIO_IRQ_EDGE_FALL);
// nastavení pinu střída přidat
gpio_set_function( DUTY_PLUS, GPIO_FUNC_SIO );
gpio_set_dir( DUTY_PLUS, false );
gpio_pull_down( DUTY_PLUS );
gpio_clear_events(DUTY_PLUS, GPIO_IRQ_EDGE_RISE | GPIO_IRQ_EDGE_FALL);
// nastavení pinu střída ubrat
gpio_set_function( DUTY_MINUS, GPIO_FUNC_SIO );
gpio_set_dir( DUTY_MINUS, false );
gpio_pull_down( DUTY_MINUS );
gpio_clear_events(DUTY_MINUS, GPIO_IRQ_EDGE_RISE | GPIO_IRQ_EDGE_FALL);
// nekonečná smyčka
while(1){
if( zmena ) {
udelej_zmeny();
}
chytni_udalost();
sleep_ms(50);
}
}
// ------------------------------------------------------------------------
CMakeLists.txt
## CMakeLists.txt pro gernerátor pulsů s OLED diplejem
cmake_minimum_required(VERSION 3.13)
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)
#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffunction-sections -fdata-sections -Wl,--gc-sections")
# místo pico můžete napsat picow (Pico s Wifi) nebo pico2 (Pico 2 s procesorem RP3520)
set(PICO_BOARD pico CACHE STRING "Board type")
include($ENV{PICO_SDK_PATH}/external/pico_sdk_import.cmake)
# nastaveni jmena projektu
project(generator_pulsu_oled C CXX ASM)
# nastaveni jmena spustitelneho souboru (abychom to nemuseli stále opisovat)
set(EXE generator_pulsu_oled)
#inicializace Raspberry Pi Pico SDK
pico_sdk_init()
add_executable(${EXE}
generator_pulsu.c
ssd1306.c
)
pico_set_program_name(${EXE} "generator_pulsu")
pico_set_program_version(${EXE} "3.0")
# nastavení standardního výstupu 0 znamená nepoužito, 1 znamená použito
pico_enable_stdio_uart(${EXE} 0)
pico_enable_stdio_usb(${EXE} 1)
# přidání standardní knihovny do projektu
target_link_libraries(${EXE}
pico_stdlib
hardware_i2c
hardware_pwm
)
# volby pro linker
target_link_options( ${EXE} PRIVATE -Xlinker --print-memory-usage)
# toto je potřeba pro generování uf2 souboru, který nahráváme do Pica
pico_add_extra_outputs(${EXE})
Pro OLED SSD130 displej
ssd1306.c
/*
MIT License
Copyright (c) 2021 David Schramm
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#include <pico/stdlib.h>
#include <hardware/i2c.h>
#include <pico/binary_info.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "ssd1306.h"
#include "font.h"
inline static void swap(int32_t *a, int32_t *b) {
int32_t *t=a;
*a=*b;
*b=*t;
}
inline static void fancy_write(i2c_inst_t *i2c, uint8_t addr, const uint8_t *src, size_t len, char *name) {
switch(i2c_write_blocking(i2c, addr, src, len, false)) {
case PICO_ERROR_GENERIC:
printf("[%s] addr not acknowledged!\n", name);
break;
case PICO_ERROR_TIMEOUT:
printf("[%s] timeout!\n", name);
break;
default:
//printf("[%s] wrote successfully %lu bytes!\n", name, len);
break;
}
}
inline static void ssd1306_write(ssd1306_t *p, uint8_t val) {
uint8_t d[2]= {0x00, val};
fancy_write(p->i2c_i, p->address, d, 2, "ssd1306_write");
}
bool ssd1306_init(ssd1306_t *p, uint16_t width, uint16_t height, uint8_t address, i2c_inst_t *i2c_instance) {
p->width=width;
p->height=height;
p->pages=height/8;
p->address=address;
p->i2c_i=i2c_instance;
p->bufsize=(p->pages)*(p->width);
if((p->buffer=malloc(p->bufsize+1))==NULL) {
p->bufsize=0;
return false;
}
++(p->buffer);
// from https://github.com/makerportal/rpi-pico-ssd1306
uint8_t cmds[]= {
SET_DISP,
// timing and driving scheme
SET_DISP_CLK_DIV,
0x80,
SET_MUX_RATIO,
height - 1,
SET_DISP_OFFSET,
0x00,
// resolution and layout
SET_DISP_START_LINE,
// charge pump
SET_CHARGE_PUMP,
p->external_vcc?0x10:0x14,
SET_SEG_REMAP | 0x01, // column addr 127 mapped to SEG0
SET_COM_OUT_DIR | 0x08, // scan from COM[N] to COM0
SET_COM_PIN_CFG,
width>2*height?0x02:0x12,
// display
SET_CONTRAST,
0xff,
SET_PRECHARGE,
p->external_vcc?0x22:0xF1,
SET_VCOM_DESEL,
0x30, // or 0x40?
SET_ENTIRE_ON, // output follows RAM contents
SET_NORM_INV, // not inverted
SET_DISP | 0x01,
// address setting
SET_MEM_ADDR,
0x00, // horizontal
};
for(size_t i=0; i<sizeof(cmds); ++i)
ssd1306_write(p, cmds[i]);
return true;
}
inline void ssd1306_deinit(ssd1306_t *p) {
free(p->buffer-1);
}
inline void ssd1306_poweroff(ssd1306_t *p) {
ssd1306_write(p, SET_DISP|0x00);
}
inline void ssd1306_poweron(ssd1306_t *p) {
ssd1306_write(p, SET_DISP|0x01);
}
inline void ssd1306_contrast(ssd1306_t *p, uint8_t val) {
ssd1306_write(p, SET_CONTRAST);
ssd1306_write(p, val);
}
inline void ssd1306_invert(ssd1306_t *p, uint8_t inv) {
ssd1306_write(p, SET_NORM_INV | (inv & 1));
}
inline void ssd1306_clear(ssd1306_t *p) {
memset(p->buffer, 0, p->bufsize);
}
void ssd1306_clear_pixel(ssd1306_t *p, uint32_t x, uint32_t y) {
if(x>=p->width || y>=p->height) return;
p->buffer[x+p->width*(y>>3)]&=~(0x1<<(y&0x07));
}
void ssd1306_draw_pixel(ssd1306_t *p, uint32_t x, uint32_t y) {
if(x>=p->width || y>=p->height) return;
p->buffer[x+p->width*(y>>3)]|=0x1<<(y&0x07); // y>>3==y/8 && y&0x7==y%8
}
void ssd1306_draw_line(ssd1306_t *p, int32_t x1, int32_t y1, int32_t x2, int32_t y2) {
if(x1>x2) {
swap(&x1, &x2);
swap(&y1, &y2);
}
if(x1==x2) {
if(y1>y2)
swap(&y1, &y2);
for(int32_t i=y1; i<=y2; ++i)
ssd1306_draw_pixel(p, x1, i);
return;
}
float m=(float) (y2-y1) / (float) (x2-x1);
for(int32_t i=x1; i<=x2; ++i) {
float y=m*(float) (i-x1)+(float) y1;
ssd1306_draw_pixel(p, i, (uint32_t) y);
}
}
void ssd1306_clear_square(ssd1306_t *p, uint32_t x, uint32_t y, uint32_t width, uint32_t height) {
for(uint32_t i=0; i<width; ++i)
for(uint32_t j=0; j<height; ++j)
ssd1306_clear_pixel(p, x+i, y+j);
}
void ssd1306_draw_square(ssd1306_t *p, uint32_t x, uint32_t y, uint32_t width, uint32_t height) {
for(uint32_t i=0; i<width; ++i)
for(uint32_t j=0; j<height; ++j)
ssd1306_draw_pixel(p, x+i, y+j);
}
void ssd1306_draw_empty_square(ssd1306_t *p, uint32_t x, uint32_t y, uint32_t width, uint32_t height) {
ssd1306_draw_line(p, x, y, x+width, y);
ssd1306_draw_line(p, x, y+height, x+width, y+height);
ssd1306_draw_line(p, x, y, x, y+height);
ssd1306_draw_line(p, x+width, y, x+width, y+height);
}
void ssd1306_draw_char_with_font(ssd1306_t *p, uint32_t x, uint32_t y, uint32_t scale, const uint8_t *font, char c) {
if(c<font[3]||c>font[4])
return;
uint32_t parts_per_line=(font[0]>>3)+((font[0]&7)>0);
// printf("\nF8[x,y]=[%3d,%2d] scale=%1d char=%02x, ppl=%d\n",x,y,scale,c,parts_per_line);
for(uint8_t w=0; w<font[1]; ++w) { // width
uint32_t pp=(c-font[3])*font[1]*parts_per_line+w*parts_per_line+5;
// printf("pp=%d: ",pp);
for(uint32_t lp=0; lp<parts_per_line; ++lp) {
uint8_t line=font[pp];
// printf("line=%02x, ",line);
for(int8_t j=0; j<8; ++j, line>>=1) {
if(line & 1)
ssd1306_draw_square(p, x+w*scale, y+((lp<<3)+j)*scale, scale, scale);
}
++pp;
}
}
}
void ssd1306_draw_char_with_font16(ssd1306_t *p, uint32_t x, uint32_t y, uint32_t scale, const uint16_t *font, char c) {
if(c<font[3]||c>font[4])
return;
uint32_t parts_per_line=(font[0]>>3)+((font[0]&7)>0);
// printf("\nF16[x,y]=[%3d,%2d] scale=%1d char=%02x, ppl=%d\n",x,y,scale,c,parts_per_line);
parts_per_line = 1;
for(uint16_t w=0; w<font[1]; ++w) { // width
uint32_t pp=(c-font[3])*font[1]*parts_per_line+w*parts_per_line+5;
// printf("pp=%d: ",pp);
for(uint32_t lp=0; lp<parts_per_line; ++lp) {
uint16_t line=font[pp];
// printf("line=%04x, ",line);
for(int16_t j=0; j<16; ++j, line>>=1) {
if(line & 1)
ssd1306_draw_square(p, x+w*scale, y+((lp<<3)+j)*scale, scale, scale);
}
++pp;
}
}
}
void ssd1306_draw_string_with_font(ssd1306_t *p, uint32_t x, uint32_t y, uint32_t scale, const uint8_t *font, const char *s) {
for(int32_t x_n=x; *s; x_n+=(font[1]+font[2])*scale) {
ssd1306_draw_char_with_font(p, x_n, y, scale, font, *(s++));
}
}
void ssd1306_draw_string_with_font16(ssd1306_t *p, uint32_t x, uint32_t y, uint32_t scale, const uint16_t *font, const char *s) {
for(int32_t x_n=x; *s; x_n+=(font[1]+font[2])*scale) {
ssd1306_draw_char_with_font16(p, x_n, y, scale, font, *(s++));
}
}
void ssd1306_draw_char(ssd1306_t *p, uint32_t x, uint32_t y, uint32_t scale, char c) {
ssd1306_draw_char_with_font(p, x, y, scale, font_8x5, c);
}
void ssd1306_draw_string(ssd1306_t *p, uint32_t x, uint32_t y, uint32_t scale, const char *s) {
ssd1306_draw_string_with_font(p, x, y, scale, font_8x5, s);
}
static inline uint32_t ssd1306_bmp_get_val(const uint8_t *data, const size_t offset, uint8_t size) {
switch(size) {
case 1:
return data[offset];
case 2:
return data[offset]|(data[offset+1]<<8);
case 4:
return data[offset]|(data[offset+1]<<8)|(data[offset+2]<<16)|(data[offset+3]<<24);
default:
__builtin_unreachable();
}
__builtin_unreachable();
}
void ssd1306_bmp_show_image_with_offset(ssd1306_t *p, const uint8_t *data, const long size, uint32_t x_offset, uint32_t y_offset) {
if(size<54) // data smaller than header
return;
const uint32_t bfOffBits=ssd1306_bmp_get_val(data, 10, 4);
const uint32_t biSize=ssd1306_bmp_get_val(data, 14, 4);
const uint32_t biWidth=ssd1306_bmp_get_val(data, 18, 4);
const int32_t biHeight=(int32_t) ssd1306_bmp_get_val(data, 22, 4);
const uint16_t biBitCount=(uint16_t) ssd1306_bmp_get_val(data, 28, 2);
const uint32_t biCompression=ssd1306_bmp_get_val(data, 30, 4);
if(biBitCount!=1) // image not monochrome
return;
if(biCompression!=0) // image compressed
return;
const int table_start=14+biSize;
uint8_t color_val=0;
for(uint8_t i=0; i<2; ++i) {
if(!((data[table_start+i*4]<<16)|(data[table_start+i*4+1]<<8)|data[table_start+i*4+2])) {
color_val=i;
break;
}
}
uint32_t bytes_per_line=(biWidth/8)+(biWidth&7?1:0);
if(bytes_per_line&3)
bytes_per_line=(bytes_per_line^(bytes_per_line&3))+4;
const uint8_t *img_data=data+bfOffBits;
int32_t step=biHeight>0?-1:1;
int32_t border=biHeight>0?-1:-biHeight;
for(uint32_t y=biHeight>0?biHeight-1:0; y!=(uint32_t)border; y+=step) {
for(uint32_t x=0; x<biWidth; ++x) {
if(((img_data[x>>3]>>(7-(x&7)))&1)==color_val)
ssd1306_draw_pixel(p, x_offset+x, y_offset+y);
}
img_data+=bytes_per_line;
}
}
inline void ssd1306_bmp_show_image(ssd1306_t *p, const uint8_t *data, const long size) {
ssd1306_bmp_show_image_with_offset(p, data, size, 0, 0);
}
void ssd1306_show(ssd1306_t *p) {
uint8_t payload[]= {SET_COL_ADDR, 0, p->width-1, SET_PAGE_ADDR, 0, p->pages-1};
if(p->width==64) {
payload[1]+=32;
payload[2]+=32;
}
for(size_t i=0; i<sizeof(payload); ++i)
ssd1306_write(p, payload[i]);
*(p->buffer-1)=0x40;
fancy_write(p->i2c_i, p->address, p->buffer-1, p->bufsize+1, "ssd1306_show");
}
ssd1306.h
/*
MIT License
Copyright (c) 2021 David Schramm
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
/**
* @file ssd1306.h
*
* simple driver for ssd1306 displays
*/
#ifndef _inc_ssd1306
#define _inc_ssd1306
#include <pico/stdlib.h>
#include <hardware/i2c.h>
/**
* @brief defines commands used in ssd1306
*/
typedef enum {
SET_CONTRAST = 0x81,
SET_ENTIRE_ON = 0xA4,
SET_NORM_INV = 0xA6,
SET_DISP = 0xAE,
SET_MEM_ADDR = 0x20,
SET_COL_ADDR = 0x21,
SET_PAGE_ADDR = 0x22,
SET_DISP_START_LINE = 0x40,
SET_SEG_REMAP = 0xA0,
SET_MUX_RATIO = 0xA8,
SET_COM_OUT_DIR = 0xC0,
SET_DISP_OFFSET = 0xD3,
SET_COM_PIN_CFG = 0xDA,
SET_DISP_CLK_DIV = 0xD5,
SET_PRECHARGE = 0xD9,
SET_VCOM_DESEL = 0xDB,
SET_CHARGE_PUMP = 0x8D
} ssd1306_command_t;
/**
* @brief holds the configuration
*/
typedef struct {
uint8_t width; /**< width of display */
uint8_t height; /**< height of display */
uint8_t pages; /**< stores pages of display (calculated on initialization*/
uint8_t address; /**< i2c address of display*/
i2c_inst_t *i2c_i; /**< i2c connection instance */
bool external_vcc; /**< whether display uses external vcc */
uint8_t *buffer; /**< display buffer */
size_t bufsize; /**< buffer size */
} ssd1306_t;
/**
* @brief initialize display
*
* @param[in] p : pointer to instance of ssd1306_t
* @param[in] width : width of display
* @param[in] height : heigth of display
* @param[in] address : i2c address of display
* @param[in] i2c_instance : instance of i2c connection
*
* @return bool.
* @retval true for Success
* @retval false if initialization failed
*/
bool ssd1306_init(ssd1306_t *p, uint16_t width, uint16_t height, uint8_t address, i2c_inst_t *i2c_instance);
/**
* @brief deinitialize display
*
* @param[in] p : instance of display
*
*/
void ssd1306_deinit(ssd1306_t *p);
/**
* @brief turn off display
*
* @param[in] p : instance of display
*
*/
void ssd1306_poweroff(ssd1306_t *p);
/**
@brief turn on display
@param[in] p : instance of display
*/
void ssd1306_poweron(ssd1306_t *p);
/**
@brief set contrast of display
@param[in] p : instance of display
@param[in] val : contrast
*/
void ssd1306_contrast(ssd1306_t *p, uint8_t val);
/**
@brief set invert display
@param[in] p : instance of display
@param[in] inv : inv==0: disable inverting, inv!=0: invert
*/
void ssd1306_invert(ssd1306_t *p, uint8_t inv);
/**
@brief display buffer, should be called on change
@param[in] p : instance of display
*/
void ssd1306_show(ssd1306_t *p);
/**
@brief clear display buffer
@param[in] p : instance of display
*/
void ssd1306_clear(ssd1306_t *p);
/**
@brief clear pixel on buffer
@param[in] p : instance of display
@param[in] x : x position
@param[in] y : y position
*/
void ssd1306_clear_pixel(ssd1306_t *p, uint32_t x, uint32_t y);
/**
@brief draw pixel on buffer
@param[in] p : instance of display
@param[in] x : x position
@param[in] y : y position
*/
void ssd1306_draw_pixel(ssd1306_t *p, uint32_t x, uint32_t y);
/**
@brief draw line on buffer
@param[in] p : instance of display
@param[in] x1 : x position of starting point
@param[in] y1 : y position of starting point
@param[in] x2 : x position of end point
@param[in] y2 : y position of end point
*/
void ssd1306_draw_line(ssd1306_t *p, int32_t x1, int32_t y1, int32_t x2, int32_t y2);
/**
@brief clear square at given position with given size
@param[in] p : instance of display
@param[in] x : x position of starting point
@param[in] y : y position of starting point
@param[in] width : width of square
@param[in] height : height of square
*/
void ssd1306_clear_square(ssd1306_t *p, uint32_t x, uint32_t y, uint32_t width, uint32_t height);
/**
@brief draw filled square at given position with given size
@param[in] p : instance of display
@param[in] x : x position of starting point
@param[in] y : y position of starting point
@param[in] width : width of square
@param[in] height : height of square
*/
void ssd1306_draw_square(ssd1306_t *p, uint32_t x, uint32_t y, uint32_t width, uint32_t height);
/**
@brief draw empty square at given position with given size
@param[in] p : instance of display
@param[in] x : x position of starting point
@param[in] y : y position of starting point
@param[in] width : width of square
@param[in] height : height of square
*/
void ssd1306_draw_empty_square(ssd1306_t *p, uint32_t x, uint32_t y, uint32_t width, uint32_t height);
/**
@brief draw monochrome bitmap with offset
@param[in] p : instance of display
@param[in] data : image data (whole file)
@param[in] size : size of image data in bytes
@param[in] x_offset : offset of horizontal coordinate
@param[in] y_offset : offset of vertical coordinate
*/
void ssd1306_bmp_show_image_with_offset(ssd1306_t *p, const uint8_t *data, const long size, uint32_t x_offset, uint32_t y_offset);
/**
@brief draw monochrome bitmap
@param[in] p : instance of display
@param[in] data : image data (whole file)
@param[in] size : size of image data in bytes
*/
void ssd1306_bmp_show_image(ssd1306_t *p, const uint8_t *data, const long size);
/**
@brief draw char with given font
@param[in] p : instance of display
@param[in] x : x starting position of char
@param[in] y : y starting position of char
@param[in] scale : scale font to n times of original size (default should be 1)
@param[in] font : pointer to font
@param[in] c : character to draw
*/
void ssd1306_draw_char_with_font(ssd1306_t *p, uint32_t x, uint32_t y, uint32_t scale, const uint8_t *font, char c);
/**
@brief draw char with builtin font
@param[in] p : instance of display
@param[in] x : x starting position of char
@param[in] y : y starting position of char
@param[in] scale : scale font to n times of original size (default should be 1)
@param[in] c : character to draw
*/
void ssd1306_draw_char(ssd1306_t *p, uint32_t x, uint32_t y, uint32_t scale, char c);
/**
@brief draw string with given font
@param[in] p : instance of display
@param[in] x : x starting position of text
@param[in] y : y starting position of text
@param[in] scale : scale font to n times of original size (default should be 1)
@param[in] font : pointer to font
@param[in] s : text to draw
*/
void ssd1306_draw_string_with_font(ssd1306_t *p, uint32_t x, uint32_t y, uint32_t scale, const uint8_t *font, const char *s );
/**
@brief draw string with builtin font
@param[in] p : instance of display
@param[in] x : x starting position of text
@param[in] y : y starting position of text
@param[in] scale : scale font to n times of original size (default should be 1)
@param[in] s : text to draw
*/
void ssd1306_draw_string(ssd1306_t *p, uint32_t x, uint32_t y, uint32_t scale, const char *s);
// for fonts 16x8 we must use unit16_t
/**
@brief draw char with given font
@param[in] p : instance of display
@param[in] x : x starting position of char
@param[in] y : y starting position of char
@param[in] scale : scale font to n times of original size (default should be 1)
@param[in] font : pointer to font 16x8
@param[in] c : character to draw
*/
void ssd1306_draw_char_with_font16(ssd1306_t *p, uint32_t x, uint32_t y, uint32_t scale, const uint16_t *font, char c);
/**
@brief draw string with given font
@param[in] p : instance of display
@param[in] x : x starting position of text
@param[in] y : y starting position of text
@param[in] scale : scale font to n times of original size (default should be 1)
@param[in] font : pointer to font
@param[in] s : text to draw
*/
void ssd1306_draw_string_with_font16(ssd1306_t *p, uint32_t x, uint32_t y, uint32_t scale, const uint16_t *font, const char *s );
#endif
font.h
#ifndef _inc_font
#define _inc_font
/*
* Format
* <height>, <width>, <additional spacing per char>,
* <first ascii char>, <last ascii char>,
* <data>
*/
const uint8_t font_8x5[] =
{
8, 5, 1, 32, 127,
0x00, 0x00, 0x00, 0x00, 0x00, // mezera
0x00, 0x00, 0x5F, 0x00, 0x00, // ! vykřičník
0x00, 0x07, 0x00, 0x07, 0x00, // "
0x14, 0x7F, 0x14, 0x7F, 0x14, // #
0x24, 0x2A, 0x7F, 0x2A, 0x12, // $
0x23, 0x13, 0x08, 0x64, 0x62, // %
0x36, 0x49, 0x56, 0x20, 0x50, // &
0x00, 0x08, 0x07, 0x03, 0x00, // '
0x00, 0x1C, 0x22, 0x41, 0x00, // (
0x00, 0x41, 0x22, 0x1C, 0x00, // )
0x2A, 0x1C, 0x7F, 0x1C, 0x2A, // *
0x08, 0x08, 0x3E, 0x08, 0x08, // +
0x00, 0x80, 0x70, 0x30, 0x00, // ,
0x08, 0x08, 0x08, 0x08, 0x08, // -
0x00, 0x00, 0x60, 0x60, 0x00, // .
0x20, 0x10, 0x08, 0x04, 0x02, // /
0x3E, 0x51, 0x49, 0x45, 0x3E, // 0
0x00, 0x42, 0x7F, 0x40, 0x00, // 1
0x72, 0x49, 0x49, 0x49, 0x46, // 2
0x21, 0x41, 0x49, 0x4D, 0x33, // 3
0x18, 0x14, 0x12, 0x7F, 0x10, // 4
0x27, 0x45, 0x45, 0x45, 0x39, // 5
0x3C, 0x4A, 0x49, 0x49, 0x31, // 6
0x41, 0x21, 0x11, 0x09, 0x07, // 7
0x36, 0x49, 0x49, 0x49, 0x36, // 8
0x46, 0x49, 0x49, 0x29, 0x1E, // 9
0x00, 0x00, 0x14, 0x00, 0x00, // :
0x00, 0x40, 0x34, 0x00, 0x00, // ;
0x00, 0x08, 0x14, 0x22, 0x41, // <
0x14, 0x14, 0x14, 0x14, 0x14, // =
0x00, 0x41, 0x22, 0x14, 0x08, // >
0x02, 0x01, 0x59, 0x09, 0x06, // ?
0x3E, 0x41, 0x5D, 0x59, 0x4E, // @
0x7C, 0x12, 0x11, 0x12, 0x7C, // A
0x7F, 0x49, 0x49, 0x49, 0x36, // B
0x3E, 0x41, 0x41, 0x41, 0x22, // C
0x7F, 0x41, 0x41, 0x41, 0x3E, // D
0x7F, 0x49, 0x49, 0x49, 0x41, // E
0x7F, 0x09, 0x09, 0x09, 0x01, // F
0x3E, 0x41, 0x41, 0x51, 0x73, // G
0x7F, 0x08, 0x08, 0x08, 0x7F, // H
0x00, 0x41, 0x7F, 0x41, 0x00, // I
0x20, 0x40, 0x41, 0x3F, 0x01, // J
0x7F, 0x08, 0x14, 0x22, 0x41, // K
0x7F, 0x40, 0x40, 0x40, 0x40, // L
0x7F, 0x02, 0x1C, 0x02, 0x7F, // M
0x7F, 0x04, 0x08, 0x10, 0x7F, // N
0x3E, 0x41, 0x41, 0x41, 0x3E, // O
0x7F, 0x09, 0x09, 0x09, 0x06, // P
0x3E, 0x41, 0x51, 0x21, 0x5E, // Q
0x7F, 0x09, 0x19, 0x29, 0x46, // R
0x26, 0x49, 0x49, 0x49, 0x32, // S
0x03, 0x01, 0x7F, 0x01, 0x03, // T
0x3F, 0x40, 0x40, 0x40, 0x3F, // U
0x1F, 0x20, 0x40, 0x20, 0x1F, // V
0x3F, 0x40, 0x38, 0x40, 0x3F, // W
0x63, 0x14, 0x08, 0x14, 0x63, // X
0x03, 0x04, 0x78, 0x04, 0x03, // Y
0x61, 0x51, 0x49, 0x45, 0x43, // Z
0x00, 0x7F, 0x41, 0x41, 0x41, // [
0x02, 0x04, 0x08, 0x10, 0x20, // "\"
0x00, 0x41, 0x41, 0x41, 0x7F, // ]
0x04, 0x02, 0x01, 0x02, 0x04, // ^
0x40, 0x40, 0x40, 0x40, 0x40, // _ podtržítko
0x00, 0x03, 0x07, 0x08, 0x00, // `
0x20, 0x54, 0x54, 0x78, 0x40, // a
0x7F, 0x28, 0x44, 0x44, 0x38, // b
0x38, 0x44, 0x44, 0x44, 0x28, // c
0x38, 0x44, 0x44, 0x28, 0x7F, // d
0x38, 0x54, 0x54, 0x54, 0x18, // e
0x00, 0x08, 0x7E, 0x09, 0x02, // f
0x18, 0xA4, 0xA4, 0x9C, 0x78, // g
0x7F, 0x08, 0x04, 0x04, 0x78, // h
0x00, 0x44, 0x7D, 0x40, 0x00, // i
0x20, 0x40, 0x40, 0x3D, 0x00, // j
0x7F, 0x10, 0x28, 0x44, 0x00, // k
0x00, 0x41, 0x7F, 0x40, 0x00, // l
0x7C, 0x04, 0x78, 0x04, 0x78, // m
0x7C, 0x08, 0x04, 0x04, 0x78, // n
0x38, 0x44, 0x44, 0x44, 0x38, // o
0xFC, 0x18, 0x24, 0x24, 0x18, // p
0x18, 0x24, 0x24, 0x18, 0xFC, // q
0x7C, 0x08, 0x04, 0x04, 0x08, // r
0x48, 0x54, 0x54, 0x54, 0x24, // s
0x04, 0x04, 0x3F, 0x44, 0x24, // t
0x3C, 0x40, 0x40, 0x20, 0x7C, // u
0x1C, 0x20, 0x40, 0x20, 0x1C, // v
0x3C, 0x40, 0x30, 0x40, 0x3C, // w
0x44, 0x28, 0x10, 0x28, 0x44, // x
0x4C, 0x90, 0x90, 0x90, 0x7C, // y
0x44, 0x64, 0x54, 0x4C, 0x44, // z
0x00, 0x08, 0x36, 0x41, 0x00, // {
0x00, 0x00, 0x77, 0x00, 0x00, // |
0x00, 0x41, 0x36, 0x08, 0x00, // }
0x02, 0x01, 0x02, 0x04, 0x02, // ~
0x00, 0x00, 0x00, 0x00, 0x00, //
};
#endif
Malý font 8x5:
font_spleen_8x5.h
/* Spleen font 8x5 */
#ifndef _inc_font_spleen_8x5
#define _inc_font_xpleen_8x5
/*
* Format
* <height>, <width>, <additional spacing per char>,
* <first ascii char>, <last ascii char>,
* <data>
*/
const uint8_t font_spleen_8x5[] =
{
8, 5, 1, 32, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00, // 0x32 mezera
0x00, 0x00, 0x5F, 0x00, 0x00, // ! vykřičník
0x00, 0x07, 0x00, 0x07, 0x00, // "
0x14, 0x7F, 0x14, 0x7F, 0x14, // #
0x44, 0x4A, 0xFF, 0x32, 0x00, // $
0xc6, 0x30, 0x0c, 0x63, 0x00, // %
0x30, 0x4e, 0x59, 0x26, 0x50, // &
0x00, 0x00, 0x07, 0x00, 0x00, // '
0x00, 0x3C, 0x42, 0x81, 0x00, // (
0x00, 0x81, 0x42, 0x3C, 0x00, // )
0x54, 0x38, 0x38, 0x54, 0x00, // *
0x10, 0x10, 0x7c, 0x10, 0x10, // +
0x00, 0x80, 0x60, 0x00, 0x00, // ,
0x10, 0x10, 0x10, 0x10, 0x00, // -
0x00, 0x00, 0x40, 0x00, 0x00, // .
0x20, 0x30, 0x0c, 0x03, 0x00, // /
0x3c, 0x52, 0x4a, 0x3c, 0x00, // 0
0x00, 0x44, 0x7e, 0x40, 0x00, // 1
0x64, 0x52, 0x52, 0x4c, 0x00, // 2
0x24, 0x42, 0x4a, 0x34, 0x00, // 3
0x1e, 0x10, 0x7c, 0x10, 0x00, // 4
0x4e, 0x4a, 0x4a, 0x32, 0x00, // 5
0x3C, 0x4A, 0x4a, 0x32, 0x00, // 6
0x06, 0x62, 0x12, 0x0e, 0x00, // 7
0x34, 0x4a, 0x4a, 0x34, 0x00, // 8
0x0c, 0x52, 0x52, 0x3c, 0x00, // 9
0x00, 0x00, 0x48, 0x00, 0x00, // :
0x00, 0x80, 0x68, 0x00, 0x00, // ;
0x00, 0x18, 0x24, 0x42, 0x00, // <
0x28, 0x28, 0x28, 0x28, 0x00, // =
0x00, 0x42, 0x24, 0x18, 0x00, // >
0x02, 0x51, 0x09, 0x06, 0x00, // ?
0x3c, 0x42, 0x5a, 0x5c, 0x00, // @
0x7C, 0x12, 0x12, 0x7c, 0x00, // A LATIN CAPITAL LETTER A
0x7e, 0x4a, 0x4a, 0x34, 0x00, // B LATIN CAPITAL LETTER B
0x3c, 0x42, 0x42, 0x42, 0x00, // C LATIN CAPITAL LETTER C
0x7e, 0x42, 0x42, 0x3c, 0x00, // D LATIN CAPITAL LETTER D
0x3c, 0x4a, 0x4a, 0x42, 0x00, // E LATIN CAPITAL LETTER E
0x7c, 0x0a, 0x0a, 0x02, 0x00, // F LATIN CAPITAL LETTER F
0x3c, 0x42, 0x4a, 0x7a, 0x00, // G LATIN CAPITAL LETTER G
0x7e, 0x08, 0x08, 0x7e, 0x00, // H LATIN CAPITAL LETTER H
0x00, 0x42, 0x7e, 0x42, 0x00, // I LATIN CAPITAL LETTER I
0x40, 0x42, 0x3e, 0x02, 0x00, // J LATIN CAPITAL LETTER J
0x7e, 0x08, 0x08, 0x76, 0x00, // K LATIN CAPITAL LETTER K
0x7e, 0x40, 0x40, 0x40, 0x00, // L LATIN CAPITAL LETTER L
0x7e, 0x0c, 0x0c, 0x7e, 0x00, // M LATIN CAPITAL LETTER M
0x7e, 0x0c, 0x30, 0x7e, 0x00, // N LATIN CAPITAL LETTER N
0x3c, 0x42, 0x42, 0x3c, 0x00, // O LATIN CAPITAL LETTER O
0x7e, 0x12, 0x12, 0x0c, 0x00, // P LATIN CAPITAL LETTER P
0x3c, 0x42, 0xc2, 0xbc, 0x00, // Q LATIN CAPITAL LETTER Q
0x7e, 0x12, 0x12, 0x6c, 0x00, // R LATIN CAPITAL LETTER R
0x44, 0x4a, 0x4a, 0x32, 0x00, // S LATIN CAPITAL LETTER S
0x02, 0x02, 0x7e, 0x02, 0x02, // T LATIN CAPITAL LETTER T
0x3e, 0x40, 0x40, 0x7e, 0x00, // U LATIN CAPITAL LETTER U
0x1e, 0x60, 0x60, 0x1e, 0x00, // V LATIN CAPITAL LETTER V
0x7e, 0x30, 0x30, 0x7e, 0x00, // W LATIN CAPITAL LETTER W
0x66, 0x18, 0x18, 0x66, 0x00, // X LATIN CAPITAL LETTER X
0x4e, 0x50, 0x50, 0x3e, 0x00, // Y LATIN CAPITAL LETTER Y
0x62, 0x52, 0x4a, 0x46, 0x00, // Z LATIN CAPITAL LETTER Z
0x00, 0xff, 0x81, 0x81, 0x00, // [
0x03, 0x0c, 0x30, 0xc0, 0x00, // "\"
0x00, 0x81, 0x81, 0xff, 0x00, // ]
0x08, 0x04, 0x02, 0x04, 0x08, // ^
0x80, 0x80, 0x80, 0x80, 0x00, // _ podtržítko
0x00, 0x01, 0x02, 0x08, 0x00, // `
0x20, 0x54, 0x54, 0x78, 0x00, // a LATIN SMALL LETTER a
0x7F, 0x44, 0x44, 0x38, 0x00, // b LATIN SMALL LETTER b
0x38, 0x44, 0x44, 0x44, 0x00, // c LATIN SMALL LETTER c
0x38, 0x44, 0x44, 0x7f, 0x00, // d LATIN SMALL LETTER d
0x38, 0x54, 0x54, 0x5c, 0x00, // e LATIN SMALL LETTER e
0x08, 0x7e, 0x09, 0x01, 0x00, // f LATIN SMALL LETTER f
0x98, 0xa4, 0xa4, 0x5c, 0x00, // g LATIN SMALL LETTER g
0x7F, 0x04, 0x04, 0x78, 0x00, // h LATIN SMALL LETTER h
0x00, 0x08, 0x7a, 0x40, 0x00, // i LATIN SMALL LETTER i
0x80, 0x80, 0x7a, 0x00, 0x00, // j LATIN SMALL LETTER j
0x7F, 0x10, 0x28, 0x44, 0x00, // k LATIN SMALL LETTER k
0x00, 0x3f, 0x40, 0x40, 0x00, // l LATIN SMALL LETTER l
0x7C, 0x18, 0x18, 0x7c, 0x00, // m LATIN SMALL LETTER m
0x7C, 0x04, 0x04, 0x78, 0x00, // n LATIN SMALL LETTER n
0x38, 0x44, 0x44, 0x38, 0x00, // o LATIN SMALL LETTER o
0xFC, 0x24, 0x24, 0x18, 0x00, // p LATIN SMALL LETTER p
0x18, 0x24, 0x24, 0xfc, 0x00, // q LATIN SMALL LETTER q
0x78, 0x04, 0x04, 0x0c, 0x00, // r LATIN SMALL LETTER r
0x48, 0x54, 0x54, 0x24, 0x00, // s LATIN SMALL LETTER s
0x04, 0x3f, 0x44, 0x40, 0x00, // t LATIN SMALL LETTER t
0x3C, 0x40, 0x40, 0x7c, 0x00, // u LATIN SMALL LETTER u
0x1C, 0x60, 0x60, 0x1c, 0x00, // v LATIN SMALL LETTER v
0x7C, 0x30, 0x30, 0x7c, 0x00, // w LATIN SMALL LETTER w
0x64, 0x18, 0x18, 0x64, 0x00, // x LATIN SMALL LETTER x
0x9C, 0xa0, 0xa0, 0x7c, 0x00, // y LATIN SMALL LETTER y
0x44, 0x64, 0x54, 0x4C, 0x00, // z LATIN SMALL LETTER z
0x18, 0x7e, 0x81, 0x81, 0x00, // { LEFT CURLY BRACKET
0x00, 0x00, 0xff, 0x00, 0x00, // | VERTICAL LINE
0x81, 0x81, 0x7e, 0x18, 0x00, // } RIGHT CURLY BRACKER
0x10, 0x08, 0x10, 0x10, 0x08, // ~ TILDE
0x00, 0x00, 0x00, 0x00, 0x00, // 0x7f nelomitelná mezera
0xfe, 0x83, 0x83, 0x83, 0xfe, // 0x80 baterie vybitá
0xfe, 0xc3, 0xc3, 0xc3, 0xfe, // 0x81 baterie 20%
0xfe, 0xe3, 0xe3, 0xe3, 0xfe, // 0x82 baterie 40%
0xfe, 0xf3, 0xf3, 0xf3, 0xfe, // 0x83 baterie 60%
0xfe, 0xfb, 0xfb, 0xfb, 0xfe, // 0x84 baterie 80%
0xfe, 0xff, 0xff, 0xff, 0xfe, // 0x85 baterie 100% nabitá
0x1f, 0x08, 0x44, 0xfe, 0x40, // 0x86 blesk
0x20, 0x60, 0xff, 0x60, 0x20, // 0x87 šipka dolů
0x04, 0x06, 0xff, 0x06, 0x04, // 0x88 šipka nahoru
0x24, 0x66, 0xff, 0x66, 0x24, // 0x89 šipka nahoru i dolů
0x60, 0x60, 0x7f, 0x60, 0x60, // 0x8a zemnění
0x00, 0x00, 0x00, 0x00, 0x00, // 0x8b unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0x8c unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0x8d unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0x8e unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0x8f unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0x90 unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0x91 unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0x92 unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0x93 unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0x94 unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0x95 unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0x96 unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0x97 unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0x98 unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0x99 unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0x9a unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0x9b unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0x9c unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0x9d unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0x9e unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0x9f unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0xa0 nezlomitelná mezera
0x7c, 0x12, 0x12, 0x7c, 0x80, // 0xa1 LATIN CAPITAL LETTER A WITH
0x01, 0x02, 0x02, 0x01, 0x00, // 0xa2 BREVE oblouček
0x10, 0x7e, 0x48, 0x40, 0x40, // 0xa3 LATIN CAPITAL LETTER L WITH STROKE
0x00, 0x00, 0x00, 0x00, 0x00, // 0xa4 valuta
0x7e, 0x42, 0x41, 0x40, 0x00, // 0xa5 měkké L
0x44, 0x4a, 0x4a, 0x33, 0x00, // 0xa6 S s čárkou
0x80, 0xb6, 0x49, 0x31, 0x00, // 0xa7 paragraf
0x00, 0x01, 0x00, 0x01, 0x00, // 0xa8 přehláska
0x44, 0x4b, 0x4a, 0x33, 0x00, // 0xa9 Š ---
0x00, 0x00, 0x00, 0x00, 0x00, // 0xaa unused
0x04, 0x05, 0x7e, 0x05, 0x04, // 0xab Ť
0x00, 0x00, 0x00, 0x00, 0x00, // 0xac unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0xad unused
0x62, 0x73, 0x5a, 0x4f, 0x46, // 0xae Ž
0x00, 0x00, 0x00, 0x00, 0x00, // 0xaf unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0xb0 unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0xb1 unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0xb2 unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0xb3 unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0xb4 unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0xb5 unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0xb6 unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0xb7 unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0xb8 unused
0x48, 0x55, 0x56, 0x25, 0x00, // 0xb9 š
0x00, 0x00, 0x00, 0x00, 0x00, // 0xba unused
0x4, 0x3f, 0x44, 0x40, 0x03, // 0xbb ť
0x00, 0x00, 0x00, 0x00, 0x00, // 0xbc unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0xbd unused
0x45, 0x66, 0x56, 0x4d, 0x00, // 0xbe ž
0x00, 0x00, 0x00, 0x00, 0x00, // 0xbf unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0xc0 unused
0x7c, 0x12, 0x12, 0x7e, 0x01, // 0xc1 Á
0x00, 0x00, 0x00, 0x00, 0x00, // 0xc2 unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0xc3 unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0xc4 unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0xc5 unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0xc6 unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0xc7 unused
0x3c, 0x43, 0x42, 0x43, 0x00, // 0xc8 Č
0x7e, 0x4a, 0x4b, 0x42, 0x00, // 0xc9 É
0x00, 0x00, 0x00, 0x00, 0x00, // 0xca unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0xcb unused
0x7e, 0x4b, 0x4a, 0x43, 0x00, // 0xcc Ě
0x00, 0x44, 0x7c, 0x46, 0x01, // 0xcd Í
0x00, 0x00, 0x00, 0x00, 0x00, // 0xce unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0xcf unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0xd0 unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0xd1 unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0xd2 unused
0x7e, 0x0d, 0x32, 0x7d, 0x00, // 0xd3 Ň
0x3c, 0x42, 0x42, 0x3d, 0x00, // 0xd4 Ó
0x00, 0x00, 0x00, 0x00, 0x00, // 0xd5 krát
0x00, 0x00, 0x00, 0x00, 0x00, // 0xd6 unused
0x44, 0x28, 0x10, 0x28, 0x44, // 0xd7 krát
0x7e, 0x13, 0x12, 0x6d, 0x00, // 0xd8 Ř
0x3e, 0x43, 0x43, 0x7e, 0x00, // 0xd9 Ů
0x3e, 0x40, 0x42, 0x7d, 0x00, // 0xda Ú
0x00, 0x00, 0x00, 0x00, 0x00, // 0xdb unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0xdc unused
0x4e, 0x50, 0x52, 0x3d, 0x00, // 0xdd Ý
0x00, 0x00, 0x00, 0x00, 0x00, // 0xde unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0xdf unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0xe0 unused
0x20, 0x54, 0x56, 0x79, 0x00, // 0xe1 á
0x00, 0x00, 0x00, 0x00, 0x00, // 0xe2 unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0xe3 unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0xe4 unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0xe5 unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0xe6 unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0xe7 unused
0x38, 0x45, 0x46, 0x45, 0x00, // 0xe8 č
0x38, 0x54, 0x56, 0x5d, 0x00, // 0xe9 é
0x00, 0x00, 0x00, 0x00, 0x00, // 0xea unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0xeb unused
0x38, 0x55, 0x56, 0x5d, 0x00, // 0xec ě
0x00, 0x40, 0x78, 0x42, 0x01, // 0xed í
0x00, 0x00, 0x00, 0x00, 0x00, // 0xee unused
0x38, 0x44, 0x44, 0x7f, 0x03, // 0xef ď
0x00, 0x00, 0x00, 0x00, 0x00, // 0xf0 unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0xf1 unused
0x7d, 0x06, 0x05, 0x78, 0x00, // 0xf2 ň
0x38, 0x44, 0x46, 0x39, 0x00, // 0xf3 ó
0x00, 0x00, 0x00, 0x00, 0x00, // 0xf4 unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0xf5 unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0xf6 unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0xf7 unused
0x78, 0x05, 0x06, 0x0d, 0x00, // 0xf8 ř
0x3c, 0x43, 0x43, 0x7c, 0x00, // 0xf9 ů
0x3c, 0x40, 0x42, 0x7d, 0x00, // 0xfa ú
0x00, 0x00, 0x00, 0x00, 0x00, // 0xfb unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0xfc unused
0x4e, 0x50, 0x52, 0x3d, 0x00, // 0xfd ý
0x00, 0x00, 0x00, 0x00, 0x00, // 0xfe unused
0x00, 0x00, 0x00, 0x00, 0x00, // 0xff unused
};
#endif
Větší font 8x16:
font_spleen_16x8a.h
/* Spleen font 16x8a
* (c) Jirka Chráska 2024, <jirka@lixis.cz>
* BSD license
*/
#ifndef _inc_font_spleen_8x16a
#define _inc_font_xpleen_8x16a
/*
* Format
* <height>, <width>, <additional spacing per char>, <first ascii char>, <last ascii char>,
* <data>
*/
/* data format, character encoding ISO-8859-2 with added characters.
In a column first uint8_t is lower 8 row of bit matrix, next uint8_t is higher 8 row of bit matrix.
-------------------------
|h0|h1|h2|h3|h4|h5|h6|h7| bit 0
-------------------------
|h0|h1|h2|h3|h4|h5|h6|h7| bit 1
-------------------------
|h0|h1|h2|h3|h4|h5|h6|h7| bit 2
-------------------------
|h0|h1|h2|h3|h4|h5|h6|h7| bit 3
-------------------------
|h0|h1|h2|h3|h4|h5|h6|h7| bit 4
-------------------------
|h0|h1|h2|h3|h4|h5|h6|h7| bit 5
-------------------------
|h0|h1|h2|h3|h4|h5|h6|h7| bit 6
-------------------------
|h0|h1|h2|h3|h4|h5|h6|h7| bit 7
-------------------------
|d0|d1|d2|d3|d4|d5|d6|d7| bit 0
-------------------------
|d0|d1|d2|d3|d4|d5|d6|d7| bit 1
-------------------------
|d0|d1|d2|d3|d4|d5|d6|d7| bit 2
-------------------------
|d0|d1|d2|d3|d4|d5|d6|d7| bit 3
-------------------------
|d0|d1|d2|d3|d4|d5|d6|d7| bit 4
-------------------------
|d0|d1|d2|d3|d4|d5|d6|d7| bit 5
-------------------------
|d0|d1|d2|d3|d4|d5|d6|d7| bit 6
-------------------------
|d0|d1|d2|d3|d4|d5|d6|d7| bit 7
-------------------------
*/
const uint8_t font_spleen_16x8a[] =
{
16, 8, 1, 1, 0xff,
// d0, h0 d1 h1 d2 h2 d3 h3 d4 h4 d5 h5 d6 h6 d7 h7 char code character
0xf8,0x07, 0x04,0x08, 0x94,0x08, 0x04,0x09, 0x04,0x09, 0x94,0x08, 0x04,0x08, 0xf8,0x07, // 0x01 držtička
0xf8,0x07, 0xfc,0x0f, 0x6c,0x0f, 0xfc,0x0e, 0xfc,0x0e, 0x6c,0x0f, 0xfc,0x0f, 0xf8,0x07, // 0x02 držtička černá
0xe0,0x00, 0xf0,0x01, 0xf0,0x03, 0xe0,0x07, 0xf0,0x03, 0xf0,0x01, 0xe0,0x00, 0x00,0x00, // 0x03 srdce
0x00,0x01, 0x80,0x03, 0xc0,0x07, 0xe0,0x0f, 0xc0,0x07, 0x80,0x03, 0x00,0x01, 0x00,0x00, // 0x04 kára
0xc0,0x01, 0xc0,0x01, 0xf0,0x09, 0x38,0x0e, 0x38,0x0e, 0xf0,0x09, 0xc0,0x01, 0xc0,0x01, // 0x05 žaludy
0xc0,0x00, 0xe0,0x01, 0xf0,0x09, 0xf8,0x0f, 0xf8,0x0f, 0xf0,0x09, 0xe0,0x01, 0xc0,0x00, // 0x06 zelený
0x00,0x00, 0x00,0x00, 0x80,0x01, 0xc0,0x03, 0xc0,0x03, 0x80,0x01, 0x00,0x00, 0x00,0x00, // 0x07 velká tečka
0xff,0xff, 0xff,0xff, 0x7f,0xfe, 0x3f,0xfc, 0x3f,0xfc, 0x7f,0xfe, 0xff,0xff, 0xff,0xff, // 0x08 velká inverzní tečka
0x00,0x00, 0xc0,0x03, 0xe0,0x07, 0x20,0x04, 0x20,0x04, 0xe0,0x07, 0xc0,0x03, 0x00,0x00, // 0x09 kroužek
0xff,0xff, 0x3f,0xfc, 0x1f,0xf8, 0xdf,0xfb, 0xdf,0xfb, 0x1f,0xf8, 0x3f,0xfc, 0xff,0xff, // 0x0a inverzní kroužek
0x00,0x00, 0x80,0x07, 0xc0,0x0f, 0x60,0x08, 0x74,0x08, 0xdc,0x0f, 0x8c,0x07, 0x3c,0x00, // 0x0b maskulinum
0x00,0x00, 0x78,0x00, 0xfc,0x02, 0x84,0x0f, 0x84,0x0f, 0xfc,0x02, 0x78,0x00, 0x00,0x00, // 0x0c feminimum
0x00,0x0c, 0xfc,0x0f, 0xfc,0x03, 0x14,0x00, 0x14,0x00, 0x1c,0x00, 0x1c,0x00, 0x00,0x00, // 0x0d fajfka
0x00,0x0c, 0xfc,0x0f, 0xfc,0x03, 0x14,0x00, 0x14,0x06, 0xfc,0x07, 0xfc,0x01, 0x00,0x00, // 0x0e noty
0xa0,0x02, 0xa0,0x02, 0xc0,0x01, 0x78,0x0f, 0x78,0x0f, 0xc0,0x01, 0xa0,0x02, 0xa0,0x02, // 0x0f pavouk
0xff,0xff, 0xfe,0x7f, 0xfc,0x3f, 0xf8,0x1f, 0xf0,0x0f, 0xe0,0x07, 0xc0,0x03, 0x80,0x01, // 0x10 velká šipka doprava
0x80,0x01, 0xc0,0x03, 0xe0,0x07, 0xf0,0x0f, 0xf8,0x1f, 0xfc,0x3f, 0xfe,0x7f, 0xff,0xff, // 0x11 velká šipka doleva
0x00,0x00, 0x10,0x02, 0x18,0x06, 0xfc,0x0f, 0xfc,0x0f, 0x18,0x06, 0x10,0x02, 0x00,0x00, // 0x12 šipka nahoru a dolu
0x00,0x00, 0xfc,0x0d, 0xfc,0x0d, 0x00,0x00, 0x00,0x00, 0xfc,0x0d, 0xfc,0x0d, 0x00,0x00, // 0x13 dva vykřičníky
0x38,0x00, 0x7c,0x00, 0x44,0x00, 0xfc,0x0f, 0x04,0x00, 0xfc,0x0f, 0xfc,0x0f, 0x00,0x00, // 0x14 konec odstavce
0x00,0x00, 0xcc,0x23, 0xfe,0x67, 0x32,0x44, 0x22,0x4c, 0xe6,0x7f, 0xc4,0x33, 0x00,0x00, // 0x15 paragraf
0x00,0x0f, 0x00,0x0f, 0x00,0x0f, 0x00,0x0f, 0x00,0x0f, 0x00,0x0f, 0x00,0x0f, 0x00,0x00, // 0x16 kvádr
0x00,0x00, 0x10,0x12, 0x18,0x16, 0xfc,0x1f, 0xfc,0x1f, 0x18,0x16, 0x10,0x12, 0x00,0x00, // 0x17 šipka nahoru a dolu s podstavou
0x00,0x00, 0x10,0x00, 0x18,0x00, 0xfc,0x0f, 0xfc,0x0f, 0x18,0x00, 0x10,0x00, 0x00,0x00, // 0x18 šipka nahoru
0x00,0x00, 0x00,0x02, 0x00,0x06, 0xfc,0x0f, 0xfc,0x0f, 0x00,0x06, 0x00,0x02, 0x00,0x00, // 0x19 šipka dolů
0x80,0x00, 0x80,0x00, 0x80,0x00, 0x80,0x00, 0xa0,0x02, 0xc0,0x01, 0x80,0x00, 0x00,0x00, // 0x1a šipka vpravo
0x80,0x00, 0xc0,0x01, 0xa0,0x02, 0x80,0x00, 0x80,0x00, 0x80,0x00, 0x80,0x00, 0x00,0x00, // 0x1b šipka vlevo
0x80,0x07, 0x80,0x07, 0x00,0x04, 0x00,0x04, 0x00,0x04, 0x00,0x04, 0x00,0x04, 0x00,0x00, // 0x1c pravý úhel
0x80,0x00, 0xc0,0x01, 0xe0,0x03, 0x80,0x00, 0xe0,0x03, 0xc0,0x01, 0x80,0x00, 0x00,0x00, // 0x1d šipky vlevo a vpravo
0x00,0x0c, 0x00,0x0f, 0xc0,0x0f, 0xe0,0x0f, 0xc0,0x0f, 0x00,0x0f, 0x00,0x0c, 0x00,0x00, // 0x1e pyramida
0x60,0x00, 0xe0,0x01, 0xe0,0x07, 0xe0,0x0f, 0xe0,0x07, 0xe0,0x01, 0x60,0x00, 0x00,0x00, // 0x1f obrácená pyramida
0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, // 0x20 prázdný znak mezera
0x00,0x00, 0x00,0x00, 0x00,0x00, 0xfc,0x1b, 0xfc,0x1b, 0x00,0x00, 0x00,0x00, 0x00,0x00, // 0x21 ! vykřičník
0x00,0x00, 0x1e,0x00, 0x1e,0x00, 0x00,0x00, 0x00,0x00, 0x1e,0x00, 0x1e,0x00, 0x00,0x00, // 0x22 "
0x10,0x02, 0xfc,0x0f, 0xfc,0x0f, 0x10,0x02, 0xfc,0x0f, 0xfc,0x0f, 0x10,0x02, 0x00,0x00, // 0x23 #
0x38,0x00, 0x7c,0x08, 0x44,0x08, 0xfe,0x1f, 0x44,0x08, 0xc4,0x0f, 0x84,0x07, 0x00,0x00, // 0x24 $
0x00,0x00, 0x18,0x0c, 0x18,0x0f, 0xc0,0x03, 0xf0,0x00, 0x3c,0x06, 0x0c,0x06, 0x00,0x00, // 0x25 %
0x00,0x07, 0xb8,0x0f, 0xfc,0x08, 0xc4,0x09, 0x7c,0x0f, 0x38,0x06, 0x00,0x09, 0x00,0x00, // 0x26 &
0x00,0x00, 0x00,0x00, 0x00,0x00, 0x1e,0x00, 0x1e,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, // 0x27 '
0x00,0x00, 0xe0,0x01, 0xf8,0x07, 0x1c,0x0e, 0x06,0x18, 0x02,0x10, 0x02,0x10, 0x00,0x00, // 0x28 (
0x00,0x00, 0x02,0x10, 0x02,0x10, 0x06,0x18, 0x1c,0x0e, 0xf8,0x07, 0xe0,0x01, 0x00,0x00, // 0x29 )
0x80,0x00, 0x90,0x04, 0xb0,0x06, 0xe0,0x03, 0xe0,0x03, 0xb0,0x06, 0x90,0x04, 0x80,0x00, // 0x2a *
0x00,0x00, 0x80,0x00, 0x80,0x00, 0xe0,0x03, 0xe0,0x03, 0x80,0x00, 0x80,0x00, 0x00,0x00, // 0x2b +
0x00,0x00, 0x00,0x00, 0x00,0x10, 0x00,0x1c, 0x00,0x0c, 0x00,0x00, 0x00,0x00, 0x00,0x00, // 0x2c ,
0x00,0x00, 0x40,0x00, 0x40,0x00, 0x40,0x00, 0x40,0x00, 0x40,0x00, 0x40,0x00, 0x00,0x00, // 0x2d -
0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x0c, 0x00,0x0c, 0x00,0x00, 0x00,0x00, 0x00,0x00, // 0x2e .
0x00,0x18, 0x00,0x1e, 0x80,0x07, 0xe0,0x01, 0x78,0x00, 0x1e,0x00, 0x06,0x00, 0x00,0x00, // 0x2f /
0xf8,0x07, 0xfc,0x0f, 0x84,0x09, 0xc4,0x08, 0x64,0x08, 0xfc,0x0f, 0xf8,0x07, 0x00,0x00, // 0x30 0
0x00,0x00, 0x30,0x08, 0x18,0x08, 0xfc,0x0f, 0xfc,0x0f, 0x00,0x08, 0x00,0x08, 0x00,0x00, // 0x31 1
0x08,0x0c, 0x0c,0x0e, 0x04,0x0b, 0x84,0x09, 0xc4,0x08, 0x7c,0x0c, 0x38,0x0c, 0x00,0x00, // 0x32 2
0x08,0x04, 0x0c,0x0c, 0x44,0x08, 0x44,0x08, 0x44,0x08, 0xfc,0x0f, 0xb8,0x07, 0x00,0x00, // 0x33 3
0xfc,0x01, 0xfc,0x01, 0x00,0x01, 0x00,0x01, 0xf0,0x0f, 0xf0,0x0f, 0x00,0x01, 0x00,0x00, // 0x34 4
0x7c,0x04, 0x7c,0x0c, 0x44,0x08, 0x44,0x08, 0x44,0x08, 0xcc,0x0f, 0x8c,0x07, 0x00,0x00, // 0x35 5
0xf8,0x07, 0xfc,0x0f, 0x44,0x08, 0x44,0x08, 0x44,0x08, 0xcc,0x0f, 0x88,0x07, 0x00,0x00, // 0x36 6
0x0c,0x00, 0x0c,0x00, 0x04,0x0f, 0x84,0x0f, 0xc4,0x00, 0x7c,0x00, 0x3c,0x00, 0x00,0x00, // 0x37 7
0xb8,0x07, 0xfc,0x0f, 0x44,0x08, 0x44,0x08, 0x44,0x08, 0xfc,0x0f, 0xb8,0x07, 0x00,0x00, // 0x38 8
0x78,0x04, 0xfc,0x0c, 0x84,0x08, 0x84,0x08, 0x84,0x08, 0xfc,0x0f, 0xf8,0x07, 0x00,0x00, // 0x39 9
0x00,0x00, 0x00,0x00, 0x00,0x00, 0x60,0x0c, 0x60,0x0c, 0x00,0x00, 0x00,0x00, 0x00,0x00, // 0x3a :
0x00,0x00, 0x00,0x00, 0x00,0x10, 0x60,0x1c, 0x60,0x0c, 0x00,0x00, 0x00,0x00, 0x00,0x00, // 0x3b ;
0x00,0x00, 0xc0,0x00, 0xe0,0x01, 0x30,0x03, 0x18,0x06, 0x0c,0x0c, 0x04,0x08, 0x00,0x00, // 0x3c <
0x00,0x00, 0x20,0x01, 0x20,0x01, 0x20,0x01, 0x20,0x01, 0x20,0x01, 0x20,0x01, 0x00,0x00, // 0x3d =
0x00,0x00, 0x04,0x08, 0x0c,0x0c, 0x18,0x06, 0x30,0x03, 0xe0,0x01, 0xc0,0x00, 0x00,0x00, // 0x3e >
0x08,0x00, 0x0c,0x00, 0x84,0x0d, 0xc4,0x0d, 0x64,0x00, 0x3c,0x00, 0x18,0x00, 0x00,0x00, // 0x3f ?
0xf0,0x07, 0xf8,0x0f, 0x08,0x08, 0xe8,0x0b, 0xe8,0x0b, 0x08,0x0a, 0xf0,0x03, 0x00,0x00, // 0x40 @
0xf8,0x0f, 0xfc,0x0f, 0x44,0x00, 0x44,0x00, 0x44,0x00, 0xfc,0x0f, 0xf8,0x0f, 0x00,0x00, // 0x41 A LATIN CAPITAL LETTER A
0xfc,0x0f, 0xfc,0x0f, 0x44,0x08, 0x44,0x08, 0x44,0x08, 0xfc,0x0f, 0xb8,0x07, 0x00,0x00, // 0x42 B LATIN CAPITAL LETTER B
0xf8,0x07, 0xfc,0x0f, 0x04,0x08, 0x04,0x08, 0x04,0x08, 0x04,0x08, 0x04,0x08, 0x00,0x00, // 0x43 C LATIN CAPITAL LETTER C
0xfc,0x0f, 0xfc,0x0f, 0x04,0x08, 0x04,0x08, 0x04,0x08, 0xfc,0x0f, 0xf8,0x07, 0x00,0x00, // 0x44 D LATIN CAPITAL LETTER D
0xf8,0x07, 0xfc,0x0f, 0x44,0x08, 0x44,0x08, 0x44,0x08, 0x04,0x08, 0x04,0x08, 0x00,0x00, // 0x45 E LATIN CAPITAL LETTER E
0xf8,0x0f, 0xfc,0x0f, 0x44,0x00, 0x44,0x00, 0x44,0x00, 0x04,0x00, 0x04,0x00, 0x00,0x00, // 0x46 F LATIN CAPITAL LETTER F
0xf8,0x07, 0xfc,0x0f, 0x04,0x08, 0x44,0x08, 0x44,0x08, 0xc4,0x0f, 0xc4,0x0f, 0x00,0x00, // 0x47 G LATIN CAPITAL LETTER G
0xfc,0x0f, 0xfc,0x0f, 0x40,0x00, 0x40,0x00, 0x40,0x00, 0xfc,0x00f, 0xfc,0x0f, 0x00,0x00, // 0x48 H LATIN CAPITAL LETTER H
0x00,0x00, 0x04,0x08, 0x04,0x08, 0xfc,0x0f, 0xfc,0x0f, 0x04,0x08, 0x04,0x08, 0x00,0x00, // 0x49 I LATIN CAPITAL LETTER I
0x00,0x04, 0x04,0x0c, 0x04,0x08, 0xfc,0x0f, 0xfc,0x07, 0x04,0x00, 0x04,0x00, 0x00,0x00, // 0x4a J LATIN CAPITAL LETTER J
0xfc,0x0f, 0xfc,0x0f, 0x40,0x00, 0xe0,0x00, 0xb0,0x01, 0x1c,0x0f, 0x0c,0x0e, 0x00,0x00, // 0x4b K LATIN CAPITAL LETTER K
0xfc,0x0f, 0xfc,0x0f, 0x00,0x08, 0x00,0x08, 0x00,0x08, 0x00,0x08, 0x00,0x08, 0x00,0x00, // 0x4c L LATIN CAPITAL LETTER L
0xfc,0x0f, 0xfc,0x0f, 0x18,0x00, 0x30,0x00, 0x18,0x00, 0xfc,0x0f, 0xfc,0x0f, 0x00,0x00, // 0x4d M LATIN CAPITAL LETTER M
0xfc,0x0f, 0xfc,0x0f, 0x30,0x00, 0xc0,0x00, 0x00,0x03, 0xfc,0x0f, 0xfc,0x0f, 0x00,0x00, // 0x4e N LATIN CAPITAL LETTER N
0xf8,0x07, 0xfc,0x0f, 0x04,0x08, 0x04,0x08, 0x04,0x08, 0xfc,0x0f, 0xf8,0x07, 0x00,0x00, // 0x4f O LATIN CAPITAL LETTER O
0xfc,0x0f, 0xfc,0x0f, 0x44,0x00, 0x44,0x00, 0x44,0x00, 0x7c,0x00, 0x38,0x00, 0x00,0x00, // 0x50 P LATIN CAPITAL LETTER P
0xf8,0x07, 0xfc,0x0f, 0x04,0x08, 0x04,0x1e, 0x04,0x38, 0xfc,0x2f, 0xf8,0x07, 0x00,0x00, // 0x51 Q LATIN CAPITAL LETTER Q
0xfc,0x0f, 0xfc,0x0f, 0x44,0x00, 0x44,0x00, 0x44,0x00, 0xfc,0x0f, 0xb8,0x0f, 0x00,0x00, // 0x52 R LATIN CAPITAL LETTER R
0x38,0x08, 0x7c,0x08, 0x44,0x08, 0x44,0x08, 0x44,0x08, 0xc4,0x0f, 0x84,0x07, 0x00,0x00, // 0x53 S LATIN CAPITAL LETTER S
0x04,0x00, 0x04,0x00, 0x04,0x00, 0xfc,0x0f, 0xfc,0x0f, 0x04,0x00, 0x04,0x00, 0x04,0x00, // 0x54 T LATIN CAPITAL LETTER T
0xfc,0x07, 0xfc,0x0f, 0x00,0x08, 0x00,0x08, 0x00,0x08, 0xfc,0x0f, 0xfc,0x07, 0x00,0x00, // 0x55 U LATIN CAPITAL LETTER U
0xfc,0x01, 0xfc,0x03, 0x00,0x06, 0x00,0x0c, 0x00,0x06, 0xfc,0x03, 0xfc,0x01, 0x00,0x00, // 0x56 V LATIN CAPITAL LETTER V
0xfc,0x0f, 0xfc,0x0f, 0x00,0x06, 0x00,0x03, 0x00,0x06, 0xfc,0x0f, 0xfc,0x0f, 0x00,0x00, // 0x57 W LATIN CAPITAL LETTER W
0x1c,0x0f, 0xbc,0x0f, 0xe0,0x00, 0x40,0x00, 0xe0,0x00, 0xbc,0x0f, 0x1c,0x0f, 0x00,0x00, // 0x58 X LATIN CAPITAL LETTER X
0x3c,0x08, 0x7c,0x08, 0x40,0x08, 0x40,0x08, 0x40,0x08, 0xfc,0x0f, 0xfc,0x07, 0x00,0x00, // 0x59 Y LATIN CAPITAL LETTER Y
0x04,0x0e, 0x04,0x0f, 0x84,0x09, 0xc4,0x08, 0x64,0x08, 0x3c,0x08, 0x1c,0x08, 0x00,0x00, // 0x5a Z LATIN CAPITAL LETTER Z
0x00,0x00, 0x00,0x00, 0xfe,0x1f, 0xfe,0x1f, 0x02,0x10, 0x02,0x10, 0x02,0x10, 0x00,0x00, // 0x5b [
0x06,0x00, 0x1e,0x00, 0x78,0x00, 0xe0,0x01, 0x80,0x07, 0x00,0x1e, 0x00,0x18, 0x00,0x00, // 0x5c "\"
0x00,0x00, 0x02,0x10, 0x02,0x10, 0x02,0x10, 0xfe,0x1f, 0xfe,0x1f, 0x00,0x00, 0x00,0x00, // 0x5d ]
0x10,0x00, 0x18,0x00, 0x0c,0x00, 0x06,0x00, 0x0c,0x00, 0x18,0x00, 0x10,0x00, 0x00,0x00, // 0x5e ^
0x00,0x40, 0x00,0x40, 0x00,0x40, 0x00,0x40, 0x00,0x40, 0x00,0x40, 0x00,0x40, 0x00,0x00, // 0x5f _ podtržítko
0x00,0x00, 0x00,0x00, 0x02,0x00, 0x06,0x00, 0x0c,0x00, 0x08,0x00, 0x00,0x00, 0x00,0x00, // 0x60 `
0x00,0x07, 0xa0,0x0f, 0xa0,0x08, 0xa0,0x08, 0xa0,0x08, 0xe0,0x0f, 0xc0,0x0f, 0x00,0x00, // 0x61 a LATIN SMALL LETTER a
0xfc,0x0f, 0xfc,0x0f, 0x20,0x08, 0x20,0x08, 0x20,0x08, 0xe0,0x0f, 0xc0,0x07, 0x00,0x00, // 0x62 b LATIN SMALL LETTER b
0xc0,0x07, 0xe0,0x0f, 0x20,0x08, 0x20,0x08, 0x20,0x08, 0x20,0x08, 0x20,0x08, 0x00,0x00, // 0x63 c LATIN SMALL LETTER c
0xc0,0x07, 0xe0,0x0f, 0x20,0x08, 0x20,0x08, 0x20,0x08, 0xfc,0x0f, 0xfc,0x0f, 0x00,0x00, // 0x64 d LATIN SMALL LETTER d
0xc0,0x07, 0xe0,0x0f, 0x20,0x09, 0x20,0x09, 0x20,0x09, 0xe0,0x09, 0xe0,0x09, 0x00,0x00, // 0x65 e LATIN SMALL LETTER e
0x00,0x00, 0x40,0x00, 0xf8,0x0f, 0xfc,0x0f, 0x44,0x00, 0x44,0x00, 0x04,0x00, 0x00,0x00, // 0x66 f LATIN SMALL LETTER f
0xc0,0x47, 0xe0,0x4f, 0x20,0x48, 0x20,0x48, 0x20,0x48, 0xe0,0x7f, 0xc0,0x37, 0x00,0x00, // 0x67 g LATIN SMALL LETTER g
0xfc,0x0f, 0xfc,0x0f, 0x20,0x00, 0x20,0x00, 0x20,0x00, 0xe0,0x0f, 0xc0,0x0f, 0x00,0x00, // 0x68 h LATIN SMALL LETTER h
0x00,0x00, 0x00,0x00, 0x20,0x00, 0xec,0x0f, 0xec,0x0f, 0x00,0x08, 0x00,0x00, 0x00,0x00, // 0x69 i LATIN SMALL LETTER i
0x00,0x00, 0x00,0x40, 0x00,0x40, 0xec,0x7f, 0xec,0x3f, 0x00,0x00, 0x00,0x00, 0x00,0x00, // 0x6a j LATIN SMALL LETTER j
0xfc,0x0f, 0xfc,0x0f, 0x80,0x01, 0xc0,0x03, 0x60,0x06, 0x20,0x0c, 0x00,0x08, 0x00,0x00, // 0x6b k LATIN SMALL LETTER k
0x00,0x00, 0x00,0x00, 0xfc,0x07, 0xfc,0x0f, 0x00,0x08, 0x00,0x08, 0x00,0x00, 0x00,0x00, // 0x6c l LATIN SMALL LETTER l
0xe0,0x0f, 0xe0,0x0f, 0x20,0x00, 0xc0,0x03, 0x20,0x00, 0xe0,0x0f, 0xc0,0x0f, 0x00,0x00, // 0x6d m LATIN SMALL LETTER m
0xe0,0x0f, 0xe0,0x0f, 0x20,0x00, 0x20,0x00, 0x20,0x00, 0xe0,0x0f, 0xc0,0x0f, 0x00,0x00, // 0x6e n LATIN SMALL LETTER n
0xc0,0x07, 0xe0,0x0f, 0x20,0x08, 0x20,0x08, 0x20,0x08, 0xe0,0x0f, 0xc0,0x07, 0x00,0x00, // 0x6f o LATIN SMALL LETTER o
0xe0,0x7f, 0xe0,0x7f, 0x20,0x08, 0x20,0x08, 0x20,0x08, 0xe0,0x0f, 0xc0,0x07, 0x00,0x00, // 0x70 p LATIN SMALL LETTER p
0xc0,0x07, 0xe0,0x0f, 0x20,0x08, 0x20,0x08, 0x20,0x08, 0xe0,0x7f, 0xe0,0x7f, 0x00,0x00, // 0x71 q LATIN SMALL LETTER q
0xc0,0x0f, 0xe0,0x0f, 0x20,0x00, 0x20,0x00, 0x20,0x00, 0x60,0x00, 0x60,0x00, 0x00,0x00, // 0x72 r LATIN SMALL LETTER r
0xc0,0x08, 0xe0,0x09, 0x20,0x09, 0x20,0x09, 0x20,0x09, 0x20,0x0f, 0x20,0x06, 0x00,0x00, // 0x73 s LATIN SMALL LETTER s
0x00,0x00, 0x20,0x00, 0xfc,0x07, 0xfc,0x0f, 0x20,0x08, 0x20,0x08, 0x00,0x08, 0x00,0x00, // 0x74 t LATIN SMALL LETTER t
0xe0,0x07, 0xe0,0x0f, 0x00,0x08, 0x00,0x08, 0x00,0x08, 0xe0,0x0f, 0xe0,0x0f, 0x00,0x00, // 0x75 u LATIN SMALL LETTER u
0xe0,0x01, 0xe0,0x03, 0x00,0x06, 0x00,0x0c, 0x00,0x06, 0xe0,0x03, 0xe0,0x01, 0x00,0x00, // 0x76 v LATIN SMALL LETTER v
0xe0,0x07, 0xe0,0x0f, 0x00,0x08, 0x80,0x07, 0x00,0x08, 0xe0,0x0f, 0xe0,0x0f, 0x00,0x00, // 0x77 w LATIN SMALL LETTER w
0x20,0x0c, 0x60,0x0e, 0xc0,0x03, 0x80,0x01, 0xc0,0x03, 0x60,0x0e, 0x20,0x0c, 0x00,0x00, // 0x78 x LATIN SMALL LETTER x
0xe0,0x47, 0xe0,0x4f, 0x00,0x48, 0x00,0x48, 0x00,0x48, 0xe0,0x7f, 0xe0,0x3f, 0x00,0x00, // 0x79 y LATIN SMALL LETTER y
0x20,0x08, 0x20,0x0c, 0x20,0x0e, 0x20,0x0b, 0xa0,0x09, 0xe0,0x08, 0x60,0x08, 0x00,0x00, // 0x7a z LATIN SMALL LETTER z
0x00,0x00, 0xc0,0x00, 0xc0,0x00, 0xfc,0x0f, 0x3e,0x1f, 0x02,0x10, 0x02,0x10, 0x00,0x00, // 0x7b { LEFT CURLY BRACKET
0x00,0x00, 0x00,0x00, 0x00,0x00, 0xfe,0x1f, 0xfe,0x1f, 0x00,0x00, 0x00,0x00, 0x00,0x00, // 0x7c | VERTICAL LINE
0x00,0x00, 0x02,0x10, 0x02,0x10, 0x3e,0x1f, 0xfc,0x0f, 0xc0,0x00, 0xc0,0x00, 0x00,0x00, // 0x7d } RIGHT CURLY BRACKER
0x00,0x00, 0x80,0x01, 0xc0,0x00, 0xc0,0x00, 0x80,0x01, 0x80,0x01, 0xc0,0x00, 0x00,0x00, // 0x7e ~ TILDE
0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, // 0x7f nezlomitelná mezera
0xfe,0xff, 0x02,0x80, 0x02,0x80, 0x03,0x80, 0x03,0x80, 0x02,0x80, 0x02,0x80, 0xfe,0xff, // 0x80 baterie vybitá
0xfe,0xff, 0x02,0xe0, 0x02,0xe0, 0x03,0xe0, 0x03,0xe0, 0x02,0xe0, 0x02,0xe0, 0xfe,0xff, // 0x81 baterie 20%
0xfe,0xff, 0x02,0xfc, 0x02,0xfc, 0x03,0xfc, 0x03,0xfc, 0x02,0xfc, 0x02,0xfc, 0xfe,0xff, // 0x82 baterie 40%
0xfe,0xff, 0x82,0xff, 0x82,0xff, 0x83,0xff, 0x83,0xff, 0x82,0xff, 0x82,0xff, 0xfe,0xff, // 0x83 baterie 60%
0xfe,0xff, 0xf2,0xff, 0xf2,0xff, 0xf3,0xff, 0xf3,0xff, 0xf2,0xff, 0xf2,0xff, 0xfe,0xff, // 0x84 baterie 80%
0xfe,0xff, 0xfe,0xff, 0xfe,0xff, 0xff,0xff, 0xff,0xff, 0xfe,0xff, 0xfe,0xff, 0xfe,0xff, // 0x85 baterie 100% nabitá
0xff,0x00, 0xff,0x00, 0x60,0x00, 0x30,0x02, 0x18,0x06, 0xfc,0x0f, 0x00,0x06, 0x00,0x02, // 0x86 blesk
0x20,0x00, 0x60,0x00, 0xff,0x00, 0x60,0x00, 0x20,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, // 0x87 šipka dolů
0x04,0x00, 0x06,0x00, 0xff,0x00, 0x06,0x00, 0x04,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, // 0x88 šipka nahoru
0x24,0x00, 0x66,0x00, 0xff,0x00, 0x66,0x00, 0x24,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, // 0x89 šipka nahoru i dolů
0x60,0x00, 0x60,0x00, 0x7f,0x00, 0x60,0x00, 0x60,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, // 0x8a zemnění
0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, // 0x8b unused
0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, // 0x8c unused
0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, // 0x8d unused
0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, // 0x8e unused
0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, // 0x8f unused
0xc0,0x07, 0xe0,0x0f, 0x20,0x08, 0xe0,0x0f, 0xc0,0x07, 0x60,0x0c, 0x20,0x08, 0x00,0x00, // 0x90 malé alfa
0xf8,0x0f, 0xfc,0x0f, 0x04,0x00, 0x44,0x0c, 0xfc,0x08, 0xb8,0x07, 0x00,0x07, 0x00,0x00, // 0x91 malé beta
0xfc,0x0f, 0xfc,0x0f, 0x04,0x00, 0x04,0x00, 0x04,0x00, 0x0c,0x00, 0x0c,0x00, 0x00,0x00, // 0x92 velké gamma
0x20,0x00, 0xe0,0x0f, 0xe0,0x0f, 0x20,0x00, 0xe0,0x0f, 0xe0,0x0f, 0x20,0x00, 0x00,0x00, // 0x93 malé pí
0x0c,0x0c, 0x1c,0x0e, 0x34,0x0b, 0xe4,0x09, 0xc4,0x08, 0x0c,0x0c, 0x0c,0x0c, 0x00,0x00, // 0x94 velké sigma
0xc0,0x07, 0xe0,0x0f, 0x20,0x08, 0xe0,0x0f, 0xe0,0x07, 0x20,0x00, 0x20,0x00, 0x00,0x00, // 0x95 malé sigma
0xe0,0x7f, 0xe0,0x7f, 0x00,0x08, 0x00,0x08, 0xe0,0x07, 0xe0,0x0f, 0x00,0x08, 0x00,0x00, // 0x96 malé mí
0x00,0x00, 0x20,0x00, 0x20,0x00, 0xe0,0x07, 0xe0,0x0f, 0x20,0x08, 0x20,0x00, 0x00,0x00, // 0x97 malé tau
0xf0,0x03, 0xf8,0x07, 0x08,0x04, 0xfc,0x0f, 0x08,0x04, 0xf8,0x07, 0xf0,0x03, 0x00,0x00, // 0x98 velké fí
0xf0,0x03, 0xf8,0x07, 0x4c,0x0c, 0x44,0x08, 0x4c,0x0c, 0xf8,0x07, 0xf0,0x03, 0x00,0x00, // 0x99 velké theta
0xf0,0x09, 0xf8,0x0f, 0x0c,0x0e, 0x04,0x00, 0x0c,0x0e, 0xf8,0x0f, 0xf0,0x09, 0x00,0x00, // 0x9a velké omega
0x00,0x00, 0x80,0x07, 0xc8,0x0f, 0x5c,0x08, 0x74,0x08, 0xe4,0x0f, 0x84,0x07, 0x00,0x00, // 0x9b malé delta
0xc0,0x01, 0xe0,0x03, 0x20,0x02, 0xe0,0x03, 0xe0,0x03, 0x20,0x02, 0xe0,0x03, 0xc0,0x01, // 0x9c nekonečno
0x80,0x07, 0xc0,0x0f, 0x00,0x08, 0x80,0x3f, 0x40,0x08, 0xc0,0x0f, 0x80,0x07, 0x00,0x00, // 0x9d malé fí
0xc0,0x06, 0xe0,0x0f, 0x20,0x09, 0x20,0x09, 0x20,0x08, 0x60,0x0c, 0x40,0x04, 0x00,0x00, // 0x9e malé epsilon
0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, // 0x9f unused
0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, // 0xa0 nezlomitelná mezera
0xf8,0x0f, 0xfc,0x0f, 0x44,0x00, 0x44,0x00, 0x44,0x20, 0xfc,0x5f, 0xf8,0x0f, 0x00,0x00, // 0xa1 LATIN CAPITAL LETTER A WITH CEDILA Ą
0x01,0x00, 0x02,0x00, 0x02,0x00, 0x01,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, // 0xa2 BREVE oblouček
0x80,0x00, 0xfc,0x0f, 0xfc,0x0f, 0x20,0x08, 0x00,0x08, 0x00,0x08, 0x00,0x08, 0x00,0x08, // 0xa3 LATIN CAPITAL LETTER L WITH STROKE
0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, // 0xa4 valuta
0xfc,0x0f, 0xfc,0x0f, 0x00,0x08, 0x0c,0x08, 0x06,0x08, 0x00,0x08, 0x00,0x08, 0x00,0x00, // 0xa5 měkké L
0x38,0x08, 0x7c,0x08, 0x44,0x08, 0x46,0x08, 0x45,0x08, 0xc4,0x0f, 0x84,0x07, 0x00,0x00, // 0xa6 S s čárkou
0x00,0x00, 0xcc,0x23, 0xfe,0x67, 0x32,0x44, 0x22,0x4c, 0xe6,0x7f, 0xc4,0x33, 0x00,0x00, // 0xa7 paragraf
0x00,0x00, 0x00,0x00, 0x02,0x00, 0x01,0x00, 0x00,0x00, 0x02,0x00, 0x01,0x00, 0x00,0x00, // 0xa8 přehláska
0x38,0x08, 0x7c,0x08, 0x45,0x08, 0x46,0x08, 0x45,0x08, 0xc4,0x0f, 0x84,0x07, 0x00,0x00, // 0xa9 Š ---
0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, // 0xaa unused
0x04,0x00, 0x04,0x00, 0x04,0x00, 0xfc,0x0f, 0xfc,0x0f, 0x04,0x00, 0x04,0x00, 0x04,0x00, // 0xab Ť
0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, // 0xac unused
0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, // 0xad unused
0x04,0x0e, 0x04,0x0f, 0x85,0x09, 0xc6,0x08, 0x65,0x08, 0x3c,0x08, 0x1c,0x08, 0x00,0x00, // 0xae Ž
0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, // 0xaf unused
0x00,0x00, 0x0c,0x00, 0x1e,0x00, 0x12,0x00, 0x1e,0x00, 0x0c,0x00, 0x00,0x00, 0x00,0x00, // 0xb0 stupeň
0x00,0x07, 0xa0,0x0f, 0xa0,0x08, 0xa0,0x08, 0xa0,0x28, 0xe0,0x5f, 0xc0,0x4f, 0x00,0x00, // 0xb1 ą
0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, // 0xb2 unused
0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, // 0xb3 unused
0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, // 0xb4 unused
0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, // 0xb5 unused
0xc0,0x08, 0xe0,0x09, 0x20,0x09, 0x28,0x09, 0x2c,0x09, 0x26,0x0f, 0x22,0x06, 0x00,0x00, // 0xb6 s s čárkou
0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, // 0xb7 unused
0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, // 0xb8 unused
0xc2,0x08, 0xe6,0x09, 0x2c,0x09, 0x28,0x09, 0x2c,0x09, 0x26,0x0f, 0x22,0x06, 0x00,0x00, // 0xb9 š
0xc0,0x08, 0xe0,0x09, 0x20,0x29, 0x20,0x39, 0x20,0x09, 0x20,0x0f, 0x20,0x06, 0x00,0x00, // 0xba s s cedilou
0x00,0x00, 0x20,0x00, 0xfc,0x07, 0xfc,0x0f, 0x20,0x08, 0x26,0x08, 0x03,0x00, 0x00,0x00, // 0xbb ť
0x20,0x08, 0x20,0x0c, 0x20,0x0e, 0x28,0x0b, 0xac,0x09, 0xe6,0x08, 0x62,0x08, 0x00,0x00, // 0xbc z s čárkou
0x08,0x00, 0x0c,0x00, 0x06,0x00, 0x02,0x00, 0x08,0x00, 0x0c,0x00, 0x06,0x00, 0x02,0x00, // 0xbd uvozovky
0x20,0x08, 0x22,0x0c, 0x26,0x0e, 0x2c,0x0b, 0xac,0x09, 0xe6,0x08, 0x62,0x08, 0x00,0x00, // 0xbe ž
0x20,0x08, 0x20,0x0c, 0x20,0x0e, 0x2c,0x0b, 0xac,0x09, 0xe0,0x08, 0x60,0x08, 0x00,0x00, // 0xbf z s tečkou
0xfc,0x0f, 0xfc,0x0f, 0x44,0x00, 0x46,0x00, 0x47,0x00, 0xfd,0x0f, 0xb8,0x0f, 0x00,0x00, // 0xc0 R s čárkou
0xf0,0x0f, 0xf8,0x0f, 0x88,0x00, 0x8a,0x00, 0x8b,0x00, 0x89,0x00, 0xf8,0x0f, 0xf0,0x0f, // 0xc1 Á
0xf0,0x0f, 0xfa,0x0f, 0x8b,0x00, 0x89,0x00, 0x89,0x00, 0x8b,0x00, 0xfa,0x0f, 0xf0,0x0f, // 0xc2 Â
0xf0,0x0f, 0xf9,0x0f, 0x8b,0x00, 0x8a,0x00, 0x8a,0x00, 0x8b,0x00, 0xf9,0x0f, 0xf0,0x0f, // 0xc3 Ă
0xf0,0x0f, 0xfb,0x0f, 0x8b,0x00, 0x88,0x00, 0x88,0x00, 0x8b,0x00, 0xfb,0x0f, 0xf0,0x0f, // 0xc4 Ä
0xfa,0x0f, 0xfb,0x0f, 0x01,0x08, 0x00,0x08, 0x00,0x08, 0x00,0x08, 0x00,0x08, 0x00,0x00, // 0xc5 L s čárkou
0xf0,0x07, 0xf8,0x0f, 0x08,0x08, 0x0a,0x08, 0x0b,0x08, 0x09,0x08, 0x08,0x08, 0x00,0x00, // 0xc6 C s čárkou
0xf8,0x07, 0xfc,0x0f, 0x04,0x08, 0x04,0x28, 0x04,0x38, 0x04,0x08, 0x04,0x08, 0x00,0x00, // 0xc7 C s cedilou
0xf0,0x07, 0xf8,0x0f, 0x09,0x08, 0x0b,0x08, 0x0a,0x08, 0x0b,0x08, 0x09,0x08, 0x00,0x00, // 0xc8 Č
0xf0,0x07, 0xf8,0x0f, 0x88,0x08, 0x8a,0x08, 0x8b,0x08, 0x09,0x08, 0x08,0x08, 0x00,0x00, // 0xc9 É
0xf8,0x07, 0xfc,0x0f, 0x44,0x08, 0x44,0x38, 0x44,0x28, 0x04,0x08, 0x04,0x08, 0x00,0x00, // 0xca E s cedilou
0xf0,0x07, 0xf8,0x0f, 0x8b,0x08, 0x8b,0x08, 0x88,0x08, 0x0b,0x08, 0x0b,0x08, 0x00,0x00, // 0xcb Ë
0xf0,0x07, 0xf8,0x0f, 0x89,0x08, 0x8b,0x08, 0x8a,0x08, 0x0b,0x08, 0x09,0x08, 0x00,0x00, // 0xcc Ě
0x00,0x00, 0x00,0x00, 0x08,0x08, 0xfa,0x0f, 0xfb,0x0f, 0x09,0x08, 0x00,0x00, 0x00,0x00, // 0xcd Í
0x00,0x00, 0x02,0x00, 0x0b,0x08, 0xf9,0x0f, 0xf9,0x0f, 0x0b,0x08, 0x02,0x00, 0x00,0x00, // 0xce I s obráceným háčkem
0xf8,0x0f, 0xf9,0x0f, 0x0b,0x08, 0x0a,0x08, 0x0b,0x08, 0xf9,0x0f, 0xf0,0x07, 0x00,0x00, // 0xcf Ď
0x80,0x00, 0xf8,0x0f, 0xf8,0x0f, 0x88,0x08, 0x08,0x08, 0x08,0x08, 0xf8,0x0f, 0xf0,0x07, // 0xd0 Ð
0xf8,0x0f, 0xf8,0x0f, 0x60,0x00, 0x82,0x01, 0x03,0x06, 0xf9,0x0f, 0xf8,0x0f, 0x00,0x00, // 0xd1 N s čárkou
0xf8,0x0f, 0xf9,0x0f, 0x63,0x00, 0x82,0x01, 0x03,0x06, 0xf9,0x0f, 0xf8,0x0f, 0x00,0x00, // 0xd2 Ň
0xf0,0x07, 0xf8,0x0f, 0x08,0x08, 0x0a,0x08, 0x0b,0x08, 0xf9,0x0f, 0xf0,0x07, 0x00,0x00, // 0xd3 Ó
0xf0,0x07, 0xf8,0x0f, 0x08,0x08, 0x0a,0x08, 0x0b,0x08, 0xf9,0x0f, 0xf0,0x07, 0x00,0x00, // 0xd4 O s obráceným háčkem
0xf0,0x07, 0xfa,0x0f, 0x0b,0x08, 0x09,0x08, 0x0a,0x08, 0xfb,0x0f, 0xf1,0x07, 0x00,0x00, // 0xd5 O s dvěma čárkami
0xf0,0x07, 0xfb,0x0f, 0x0b,0x08, 0x08,0x08, 0x0b,0x08, 0xfb,0x0f, 0xf0,0x07, 0x00,0x00, // 0xd6 O s přehláskou
0x20,0x04, 0x60,0x06, 0xc0,0x03, 0x80,0x01, 0xc0,0x03, 0x60,0x06, 0x20,0x04, 0x00,0x00, // 0xd7 krát
0xfc,0x0f, 0xfd,0x0f, 0x47,0x00, 0x46,0x00, 0x47,0x00, 0xfd,0x0f, 0xb8,0x0f, 0x00,0x00, // 0xd8 Ř
0xf8,0x07, 0xf8,0x0f, 0x07,0x08, 0x05,0x08, 0x07,0x08, 0xf8,0x0f, 0xf8,0x07, 0x00,0x00, // 0xd9 Ů
0xf8,0x07, 0xf8,0x0f, 0x00,0x08, 0x02,0x08, 0x03,0x08, 0xf9,0x0f, 0xf8,0x07, 0x00,0x00, // 0xda Ú
0xf8,0x07, 0xfa,0x0f, 0x03,0x08, 0x01,0x08, 0x02,0x08, 0xfb,0x0f, 0xf9,0x07, 0x00,0x00, // 0xdb U s dvěma čárkami
0xf8,0x07, 0xfb,0x0f, 0x03,0x08, 0x00,0x08, 0x03,0x08, 0xfb,0x0f, 0xf8,0x07, 0x00,0x00, // 0xdc U s přehláskou
0x78,0x08, 0xf8,0x08, 0x80,0x08, 0x82,0x08, 0x83,0x08, 0xf9,0x0f, 0xf8,0x07, 0x00,0x00, // 0xdd Ý
0x04,0x00, 0x04,0x00, 0x04,0x00, 0xfc,0x5f, 0xfc,0x2f, 0x04,0x00, 0x04,0x00, 0x04,0x00, // 0xde T s cedilou
0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, // 0xdf unused
0xc0,0x0f, 0xe0,0x0f, 0x20,0x00, 0x28,0x00, 0x2c,0x00, 0x64,0x00, 0x60,0x00, 0x00,0x00, // 0xe0 ŕ
0x00,0x07, 0xa0,0x0f, 0xa8,0x08, 0xac,0x08, 0xa6,0x08, 0xe2,0x0f, 0xc0,0x0f, 0x00,0x00, // 0xe1 á
0x00,0x07, 0xa8,0x0f, 0xac,0x08, 0xa6,0x08, 0xac,0x08, 0xe8,0x0f, 0xc0,0x0f, 0x00,0x00, // 0xe2 â
0x00,0x07, 0xa6,0x0f, 0xae,0x08, 0xa8,0x08, 0xae,0x08, 0xe6,0x0f, 0xc0,0x0f, 0x00,0x00, // 0xe3 ă
0x00,0x07, 0xac,0x0f, 0xac,0x08, 0xa0,0x08, 0xac,0x08, 0xec,0x0f, 0xc0,0x0f, 0x00,0x00, // 0xe4 ä
0x00,0x00, 0x00,0x00, 0xfa,0x0f, 0xfb,0x1f, 0x01,0x10, 0x00,0x10, 0x00,0x00, 0x00,0x00, // 0xe5 ľ
0xc0,0x07, 0xe0,0x0f, 0x20,0x08, 0x28,0x08, 0x2c,0x08, 0x24,0x08, 0x20,0x08, 0x00,0x00, // 0xe6 ć
0xc0,0x07, 0xe0,0x0f, 0x20,0x08, 0x20,0x28, 0x20,0x38, 0x20,0x08, 0x20,0x08, 0x00,0x00, // 0xe7 ç
0xc0,0x07, 0xe4,0x0f, 0x2c,0x08, 0x28,0x08, 0x2c,0x08, 0x24,0x08, 0x20,0x08, 0x00,0x00, // 0xe8 č
0xc0,0x07, 0xe0,0x0f, 0x20,0x09, 0x28,0x09, 0x2c,0x09, 0xe4,0x09, 0xe0,0x09, 0x00,0x00, // 0xe9 é
0xc0,0x07, 0xe0,0x0f, 0x20,0x09, 0x20,0x39, 0x20,0x29, 0xe0,0x09, 0xe0,0x09, 0x00,0x00, // 0xea ę
0xc0,0x07, 0xec,0x0f, 0x2c,0x09, 0x20,0x09, 0x2c,0x09, 0xec,0x09, 0xe0,0x09, 0x00,0x00, // 0xeb ë
0xc0,0x07, 0xe4,0x0f, 0x2c,0x09, 0x28,0x09, 0x2c,0x09, 0xe4,0x09, 0xe0,0x09, 0x00,0x00, // 0xec ě
0x00,0x00, 0x00,0x00, 0x20,0x00, 0xe8,0x0f, 0xec,0x0f, 0x04,0x08, 0x00,0x00, 0x00,0x00, // 0xed í
0x00,0x00, 0x08,0x00, 0x2c,0x00, 0xe6,0x0f, 0xec,0x0f, 0x08,0x08, 0x00,0x00, 0x00,0x00, // 0xee î
0xc1,0x07, 0xe3,0x0f, 0x26,0x08, 0x23,0x08, 0x21,0x08, 0xfc,0x0f, 0xfc,0x0f, 0x00,0x00, // 0xef ď
0xc0,0x07, 0xe0,0x0f, 0x20,0x08, 0x20,0x08, 0x28,0x08, 0xfc,0x0f, 0xfc,0x0f, 0x08,0x00, // 0xf0 d přeškrtnuté
0xe0,0x0f, 0xe0,0x0f, 0x20,0x00, 0x28,0x00, 0x2c,0x00, 0xe4,0x0f, 0xc0,0x0f, 0x00,0x00, // 0xf1 n s čárkou
0xe0,0x0f, 0xe4,0x0f, 0x2c,0x00, 0x28,0x00, 0x2c,0x00, 0xe4,0x0f, 0xc0,0x0f, 0x00,0x00, // 0xf2 ň
0xc0,0x07, 0xe0,0x0f, 0x20,0x08, 0x28,0x08, 0x2c,0x08, 0xe4,0x0f, 0xc0,0x07, 0x00,0x00, // 0xf3 ó
0xc0,0x07, 0xe8,0x0f, 0x2c,0x08, 0x26,0x08, 0x2c,0x08, 0xe8,0x0f, 0xc0,0x07, 0x00,0x00, // 0xf4 o s obráceným háčkem
0xc0,0x07, 0xe8,0x0f, 0x2c,0x08, 0x24,0x08, 0x28,0x08, 0xec,0x0f, 0xc4,0x07, 0x00,0x00, // 0xf5 o s dvěma čárkami
0xc0,0x07, 0xec,0x0f, 0x2c,0x08, 0x20,0x08, 0x2c,0x08, 0xec,0x0f, 0xc0,0x07, 0x00,0x00, // 0xf6 o s přehláskou
0x40,0x00, 0x40,0x00, 0x40,0x00, 0x58,0x03, 0x58,0x03, 0x40,0x00, 0x40,0x00, 0x40,0x00, // 0xf7 ÷ děleno
0xc0,0x0f, 0xe4,0x0f, 0x2c,0x00, 0x28,0x00, 0x2c,0x00, 0x64,0x00, 0x60,0x00, 0x00,0x00, // 0xf8 ř
0xe0,0x07, 0xe0,0x0f, 0x0e,0x08, 0x0a,0x08, 0x0e,0x08, 0xe0,0x0f, 0xe0,0x0f, 0x00,0x00, // 0xf9 ů
0xe0,0x07, 0xe0,0x0f, 0x00,0x08, 0x08,0x08, 0x0c,0x08, 0xe4,0x0f, 0xe0,0x0f, 0x00,0x00, // 0xfa ú
0xe0,0x07, 0xe8,0x0f, 0x0c,0x08, 0x04,0x08, 0x08,0x08, 0xec,0x0f, 0xe4,0x0f, 0x00,0x00, // 0xfb ű
0xe0,0x07, 0xec,0x0f, 0x0c,0x08, 0x00,0x08, 0x0c,0x08, 0xec,0x0f, 0xe0,0x0f, 0x00,0x00, // 0xfc ü
0xe0,0x47, 0xe0,0x4f, 0x00,0x48, 0x08,0x48, 0x0c,0x48, 0xe4,0x7f, 0xe0,0x3f, 0x00,0x00, // 0xfd ý
0x00,0x00, 0x20,0x00, 0xfc,0x27, 0xfc,0x2f, 0x20,0x38, 0x20,0x08, 0x00,0x00, 0x00,0x00, // 0xfe t s cedilou
0x00,0x00, 0x00,0x00, 0x06,0x00, 0x0f,0x00, 0x0f,0x00, 0x06,0x00, 0x00,0x00, 0x00,0x00, // 0xff tečka nahoře
};
#endif
Konstrukce na nepájivém poli

Jak zařadit OLED displej SSD1306 do svého projektu.
Potřebujeme zdrojové kódy: ssd1306.c ssd1306.h a minimálně jeden font. Buď font_spleen_8x5.h nebo font_spleen_16x8a.h anebo oba.
Do CMakeLists.txt musíme zařadit ssd1306.c
add_executable(${EXE}
....
ssd1306.c
)
Nastavení a inicializaci displeje provedeme takto:
#include "ssd1306.h"
#include "font_spleen_16x8a.h"
#define I2C_CISLO i2c0 (1)
#define I2C_DATA_PIN 4 (2)
#define I2C_HODINY_PIN 5 (3)
#define I2C_FREQ 400000 (4)
#define DISPLAY_WIDTH 128 (5)
#define DISPLAY_HEIGHT 32 (6)
#define I2C_ADDRESS 0x3C (7)
// struktura pro displej
ssd1306_t disp; (8)
// nastavení i2c sběrnice
i2c_init(I2C_CISLO, I2C_FREQ);
gpio_set_function(I2C_DATA_PIN, GPIO_FUNC_I2C);
gpio_set_function(I2C_HODINY_PIN, GPIO_FUNC_I2C);
gpio_pull_up(I2C_DATA_PIN); // nastavení pull up rezistoru na datovém pinu
gpio_pull_up(I2C_HODINY_PIN); // nastavení pull up rezistoru na hodinovém pinu
// nastavení dipleje OLED
disp.external_vcc = false;
// nastavení velikosti displejem, i2c adresa a i2c sběrnice
ssd1306_init(&disp, DISPLAY_WIDTH, DISPLAY_HEIGHT, I2C_ADDRESS, I2C_CISLO);
// vamazání displeje
ssd1306_clear(&disp);
| 1 | I2C_CISLO může být buď i2c0 pro první I2C sběrnici nebo i2c1 pro druhou I2C sběrnici. |
| 2 | Číslo GPIO pinu, kam připojujeme datový pin displeje, obvykle se značí SDA. |
| 3 | Číslo GPIO pinu, kam připojujeme hodinový pin displeje, obvykle se značí SCK nebo SCL. |
| 4 | Frekvenci komunikace po I2C nastavíme na 400 kHz. |
| 5 | Toto je počet bodů na šířku na displeji. |
| 6 | Toto je počet bodů na výšku na displeji. |
| 7 | I2C adrsa je pevná a musíme ji nastavit na hexadecimální hodnotu 0x3C. To je dané výrobcem displeje. |
| 8 | Při komunikaci s displejem se na něj obracíme pomocí atruktury ssd1306_t disp. Všechny funkce pro displej (výmaz, psaní, zobrazení) mají adresu na tuto strukturu jako první parametr. |
Psaní na displej se udělá takto:
char buf[40];
ssd1306_clear(&disp); // vymazání displeje
// do buferu buf si uložím, co chci na displej napsat
snprintf(buf,40,"Freq: %6d Hz", freq);
// napsání bufferu na displej
// parametry jsou:
// první 0 -- pozice x na displeji (vodorovně)
// druhá 0 -- pozice y na displeji (svisle)
// 1 je velikost písmen (můžeme použít i 2 a písmena budou dvojnásobně velká)
// font_spleen_16x8a je typ písma
// buf je buffer s textem
ssd1306_draw_string_with_font(&disp, 0, 0, 1, font_spleen_16x8a, buf);
// zobrazení na displeji -- teď se obnoví zobrazení na displeji
ssd1306_show(&disp);
| Do bufferu musíme ukládat text v kódování iso-8859-2. Fonty spleen neumí kódování UTF-8. |
Popis dalších funkcí displeje najdete v hlavičkovém souboru ssd1306.h.