diff --git a/controllers/SSD1309.c b/controllers/SSD1309.c new file mode 100644 index 0000000..c9584b7 --- /dev/null +++ b/controllers/SSD1309.c @@ -0,0 +1,226 @@ +/** + * \file SSD1309_H_.c + * \brief Functions relating to SSD1309 works with SPI or I2C. + * \author David Gautier (modified from ST7565R.c by Andy Gock) + * \see glcd.h + */ + +#if defined(GLCD_CONTROLLER_SSD1309) + +#include "../glcd.h" +#include + +uint8_t buf[4]; +uint8_t buftest[10]; +uint8_t bufpage[GLCD_LCD_WIDTH+1]; + + +void glcd_command(uint8_t c) +{ +#if defined(GLCD_CONTROLLER_SSD1309_SPI) + GLCD_A0_LOW(); + glcd_spi_write(c); + +#else + buf[0]=COMMAND_BYTE; + buf[1] = c; + i2c_writeNBytes(SLAVE_ADDR,buf,2); +#endif + +} + +void glcd_data(uint8_t c) +{ +#if defined(GLCD_CONTROLLER_SSD1309_SPI) + GLCD_A0_HIGH(); + glcd_spi_write(c); +#else // I2C + buf[0]= DATA_BYTE; + buf[1] = c; + i2c_writeNBytes(SLAVE_ADDR,buf,2); + i2c_writeNBytes(SLAVE_ADDR,0x00,1); + #endif +} + +#if ! defined(GLCD_CONTROLLER_SSD1309_SPI) +void glcd_test_data() +{ + glcd_command(SSD1309_SET_ADDRESS_MODE); + glcd_set_y_address(0); + glcd_set_x_address(0); + buftest[0]=DATA_BYTE; + buftest[1] = 0xFF; + buftest[2] = 0xFF; + buftest[3] = 0x00; + buftest[4] = 0x01; + buftest[5] = 0x02; + buftest[6] = 0x04; + buftest[7] = 0x08; + buftest[8] = 0x10; + buftest[9] = 0x20; + i2c_writeNBytes(SLAVE_ADDR,buftest,10); +} + +void glcd_datastream(uint8_t * buf, size_t length) +{ + bufpage[0]= DATA_BYTE; + memcpy(bufpage+1,buf,length); + i2c_writeNBytes(SLAVE_ADDR,bufpage,length+1); +} +#endif + +void glcd_set_contrast(uint8_t val) { + + #if defined(GLCD_CONTROLLER_SSD1309_SPI) + /* Can set a 6-bit value (0 to 63) */ + + /* Must send this command byte before setting the contrast */ + glcd_command(0x81); + glcd_command(val); + return; + #else/* Can set a 6-bit value (0 to 63) */ + buf[0] = COMMAND_BYTE; + buf[1] = 0x81; + buf[2] = COMMAND_BYTE; + buf[3] = val; + i2c_writeNBytes(SLAVE_ADDR,buf,4); + #endif +} + +void glcd_power_down(void) +{ + // Command sequence as in SSD1309 datasheet + glcd_command(0xac); // Static indicator off + glcd_command(0x00); // Static indicator register, not blinking + glcd_command(0xae); // Display OFF + glcd_command(0xa5); // Display all points ON + + // Display is now in sleep mode +} + +void glcd_power_up(void) +{ + + glcd_command(0xa4); // Display all points OFF + glcd_command(0xad); // Static indicator ON + glcd_command(0x00); // Static indicator register, not Blinking + glcd_command(0xaf); + + return; +} + +void glcd_set_y_address(uint8_t y) +{ + glcd_command(SSD1309_PAGE_ADDRESS_SET | (0x0F & y)); /* 0x0F = 0b00001111 */ +} + +void glcd_set_x_address(uint8_t x) +{ + glcd_set_column_upper(x); + glcd_set_column_lower(x); +} + +void glcd_all_on(void) +{ + glcd_command(SSD1309_DISPLAY_ALL_ON); +} + +void glcd_normal(void) +{ + glcd_command(SSD1309_DISPLAY_NORMAL); +} + +void glcd_set_column_upper(uint8_t addr) +{ + glcd_command(SSD1309_COLUMN_ADDRESS_SET_UPPER | (addr >> 4)); +} + +void glcd_set_column_lower(uint8_t addr) +{ + glcd_command(SSD1309_COLUMN_ADDRESS_SET_LOWER | (0x0f & addr)); +} + +void glcd_set_start_line(uint8_t addr) +{ + glcd_command( SSD1309_SET_START_LINE | (0x3F & addr)); /* 0x3F == 0b00111111 */ +} +void glcd_set_page_mode() +{ + glcd_command( 0x20 ); + glcd_command( 0x02 ); + +} +/** Clear the display immediately, does not buffer */ +void glcd_clear_now(void) +{ + uint8_t page; + + for (page = 0; page < GLCD_NUMBER_OF_BANKS; page++) { + uint8_t col; + glcd_set_page_mode() ; + glcd_set_y_address(page); + glcd_set_x_address(0); + #if defined(GLCD_CONTROLLER_SSD1309_SPI) + for (col = 0; col < GLCD_NUMBER_OF_COLS; col++) { + glcd_data(0); + } + #else + glcd_datastream(zero,GLCD_LCD_WIDTH); + #endif + + } +} + + +void glcd_pattern(void) +{ + uint8_t page; + for (page = 0; page < GLCD_NUMBER_OF_BANKS; page++) { + uint8_t col; + glcd_set_page_mode(); + glcd_set_y_address(page); + glcd_set_x_address(0); + for (col = 0; col < GLCD_NUMBER_OF_COLS; col++) { + glcd_data( (col / 8 + 2) % 2 == 1 ? 0xff : 0x00 ); + } + } +} + +void glcd_write() +{ + uint8_t bank; + + for (bank = 0; bank < GLCD_NUMBER_OF_BANKS; bank++) { + /* Each bank is a single row 8 bits tall */ + uint8_t column; + + if (glcd_bbox_selected->y_min >= (bank+1)*8) { + continue; /* Skip the entire bank */ + } + + if (glcd_bbox_selected->y_max < bank*8) { + break; /* No more banks need updating */ + } + glcd_set_page_mode(); + glcd_set_y_address(bank); + glcd_set_x_address(glcd_bbox_selected->x_min); + #if defined(GLCD_CONTROLLER_SSD1309_SPI) + for (column = glcd_bbox_selected->x_min; column <= glcd_bbox_selected->x_max; column++) + { + glcd_data( glcd_buffer_selected[GLCD_NUMBER_OF_COLS * bank + column] ); + } + #else // I2C + glcd_datastream(&(*glcd_buffer_selected) + (GLCD_NUMBER_OF_COLS * bank + glcd_bbox_selected->x_min) , glcd_bbox_selected->x_max-glcd_bbox_selected->x_min +1); + #endif + } + glcd_reset_bbox(); +} + +void glcd_SSD1309_init(void) { + + /* Default init sequence */ + glcd_command(SSD1309_NORMAL); //0xA6 // normal display + glcd_command(SSD1309_DISPLAY_ON); + glcd_set_contrast(255); +} +#endif /* defined(GLCD_CONTROLLER_SSD1309) */ diff --git a/controllers/SSD1309.h b/controllers/SSD1309.h new file mode 100644 index 0000000..b5be1cc --- /dev/null +++ b/controllers/SSD1309.h @@ -0,0 +1,93 @@ +/** + * \file SSD1309.h + * \brief Constants relating to SSD1309 LCD controller. + * \author David Gautier (based on ST7565R.h by Andy Gock ) + * + * Constants and functions specific to SSD1309. + * Tested with EA OLEDL128-6GGA + * + * + * + */ + +/* + Copyright (c) 2012, Andy Gock + + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of Andy Gock nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL ANDY GOCK BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + + + +#ifndef SSD1309_H_ +#define SSD1309_H_ + +/* Commands */ +#define COMMAND_BYTE 0b10000000 +#define DATA_BYTE 0b01000000 + +#define GLCD_LCD_WIDTH 128 +#define GLCD_LCD_HEIGHT 64 +#define SLAVE_ADDR 0x78>>1 + +#define SSD1309_DISPLAY_ON 0xAF /* 0b10101111 */ +#define SSD1309_DISPLAY_OFF 0xAE /* 0b10101110 */ +#define SSD1309_SET_ADDRESS_MODE 0x20 +#define SSD1309_PAGE_ADDRESS_SET 0xB0 +#define SSD1309_COLUMN_ADDRESS_SET_LOWER 0x00 +#define SSD1309_COLUMN_ADDRESS_SET_UPPER 0x10 +#define SSD1309_SET_START_LINE 0x40 + +#define SSD1309_NORMAL 0xA6 /* 0b10100001 */ +#define SSD1309_REVERSE 0xA7 /* 0b10100001 */ + +#define SSD1309_DISPLAY_ALL_ON 0xA5 +#define SSD1309_DISPLAY_NORMAL 0xA4 + +/* These functions on available on ST7565 implementation (for now) */ + +/* Private functions */ +void glcd_set_column_upper(uint8_t addr); +void glcd_set_column_lower(uint8_t addr); +void glcd_test_data(); + +/** All display points on (native) */ +void glcd_all_on(void); + +/** Set to normal mode */ +void glcd_normal(void); + +/** Set start line/page */ +void glcd_set_start_line(uint8_t addr); + +/** Clear the display immediately, does not buffer */ +void glcd_clear_now(void); + +/** Show a black and white line pattern on the display */ +void glcd_pattern(void); + +/** Init SSD1309 controller / display */ +void glcd_SSD1309_init(void); + +#endif /* SSD1309_H_ */ diff --git a/devices/PIC18H.c b/devices/PIC18H.c new file mode 100644 index 0000000..a661d25 --- /dev/null +++ b/devices/PIC18H.c @@ -0,0 +1,152 @@ +/** + \file PIC18H.c + \brief Functions relating to Microchip PIC18H (8-bit). + For use with xc8 compiler. + work + \author Andy Gock (adapted by David Gautier from PIC24.c) + */ + +/* + Copyright (c) 2013, Andy Gock + + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of Andy Gock nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL ANDY GOCK BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +#include "../glcd.h" + + +#if defined(GLCD_DEVICE_USER) + #include "glcd_user_config.h" + #include "glcd_user_config.c" +#else + +#include "PIC18H.h" + +#if defined(GLCD_DEVICE_PIC18H) + +void glcd_init(void) +{ + +#if defined(GLCD_CONTROLLER_ST7565R) + + /* Set SS, DC and A0 pins as output */ + CONTROLLER_SS_TRIS = 0; + CONTROLLER_A0_TRIS = 0; + CONTROLLER_RST_TRIS = 0; + + /* Deselect LCD */ + GLCD_DESELECT(); + spi_master_open(CUSTOM0); + + /* Send reset pulse to LCD */ + glcd_reset(); + + delay_ms(1); + /* Begin sending data for initialisation sequence */ + glcd_ST7565R_init(); + /* Set all dots black and hold for 0.5s, then clear it, we do this so we can visually check init sequence is working */ + + glcd_all_on(); + delay_ms(1000); + glcd_normal(); + + glcd_set_start_line(0); + glcd_clear_now(); + + glcd_select_screen(glcd_buffer,&glcd_bbox); + glcd_clear(); +#elif defined(GLCD_CONTROLLER_SSD1309) + /* Set SS, DC and A0 pins as output */ +#if defined(GLCD_CONTROLLER_SSD1309_SPI) + + CONTROLLER_SS_TRIS = 0; + CONTROLLER_A0_TRIS = 0; + CONTROLLER_RST_TRIS = 0; + + /* Deselect LCD */ + + GLCD_DESELECT(); + spi_master_open(MASTER0); + /* Send reset pulse to LCD */ + glcd_reset(); + delay_ms(1); + /* Begin sending data for initialisation sequence */ + glcd_SSD1309_init(); + /* Set all dots black and hold for 0.5s, then clear it, we do this so we can visually check init sequence is working */ + glcd_set_start_line(0); + + glcd_all_on(); + delay_ms(250); + glcd_normal(); + + glcd_select_screen(glcd_buffer,&glcd_bbox); + glcd_clear_now(); + glcd_clear(); + glcd_reset_bbox(); + + +#else + glcd_reset(); + delay_ms(1); + glcd_SSD1309_init(); + glcd_normal(); + glcd_select_screen(glcd_buffer,&glcd_bbox); + glcd_clear_now(); + glcd_reset_bbox(); +#endif + +#else + #error "Controller not supported" +#endif /* GLCD_CONTROLLER_* */ + +} + +void glcd_spi_write(uint8_t c) +{ + GLCD_SELECT(); + SPI_ExchangeByte(c); + GLCD_DESELECT(); +} + +void glcd_reset(void) +{ + #if defined(GLCD_CONTROLLER_ST7565R) + /* Toggle RST low to reset. Minimum pulse 100ns on datasheet. */ + GLCD_SELECT(); + GLCD_RESET_LOW(); + __delay_ms(GLCD_RESET_TIME); + GLCD_RESET_HIGH(); + GLCD_DESELECT(); + + #elif defined(GLCD_CONTROLLER_SSD1309) + GLCD_RESET_LOW(); + __delay_ms(GLCD_RESET_TIME); + GLCD_RESET_HIGH(); + #endif + +} + +#endif /* defined(GLCD_DEVICE_PIC18H) */ + +#endif /* GLCD_DEVICE_USER */ diff --git a/devices/PIC18H.h b/devices/PIC18H.h new file mode 100644 index 0000000..d61e7a1 --- /dev/null +++ b/devices/PIC18H.h @@ -0,0 +1,102 @@ +/** + \file PIC18H.h + \brief Functions relating to Microchip PIC18H (8-bit). + For use with xc8 compiler. + \author Andy Gock (adapted by David Gautier for PIC18) + */ +/* + Copyright (c) 2013, Andy Gock + + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of Andy Gock nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL ANDY GOCK BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifndef GLCD_PINOUTS_PIC18H_H_ +#define GLCD_PINOUTS_PIC18H_H_ + +#if defined(GLCD_DEVICE_USER) + #include "glcd_user_config.h" + #include "glcd_user_config.c" +#else + +#if defined(GLCD_DEVICE_PIC18H) + +#include +#include + + +#if defined(GLCD_CONTROLLER_ST7565R) + +/** + * \name Other pins needed for serial LCD controller + * @{ + */ +#define CONTROLLER_SS_TRIS TRISB0 +#define CONTROLLER_SS_PIN LATB0 +#define CONTROLLER_A0_TRIS TRISA2 +#define CONTROLLER_A0_PIN LATA2 +#define CONTROLLER_RST_TRIS TRISC1 +#define CONTROLLER_RST_PIN LATC1 + /**@}*/ +#elif defined(GLCD_CONTROLLER_SSD1309) + +#if defined(GLCD_CONTROLLER_SSD1309_SPI) +#define CONTROLLER_RST_TRIS TRISC2 +#define CONTROLLER_RST_PIN LATC2 +#define CONTROLLER_SS_TRIS TRISC7 +#define CONTROLLER_SS_PIN LATC7 +#define CONTROLLER_A0_TRIS TRISC6 +#define CONTROLLER_A0_PIN LATC6 + +#else //I2C +#define CONTROLLER_RST_TRIS TRISC1 +#define CONTROLLER_RST_PIN LATC1 +#endif + +#else +#error "Controller not supported or defined in PIC18H module" +#endif + + + +/** + * \name Macros for control lines + * @{ + */ +#define GLCD_SELECT() CONTROLLER_SS_PIN = 0 +#define GLCD_DESELECT() CONTROLLER_SS_PIN = 1 +#define GLCD_DC_LOW() CONTROLLER_DC_PIN = 0 +#define GLCD_DC_HIGH() CONTROLLER_DC_PIN = 1 +#define GLCD_RESET_LOW() CONTROLLER_RST_PIN = 0 +#define GLCD_RESET_HIGH() CONTROLLER_RST_PIN = 1 +#define GLCD_A0_LOW() CONTROLLER_A0_PIN = 0 /* Command write */ +#define GLCD_A0_HIGH() CONTROLLER_A0_PIN = 1 /* Write to display RAM */ + +/**@}*/ + +#endif /* GLCD_DEVICE_PIC18H */ + +#endif /* GLCD_DEVICE_USER */ + +#endif /* GLCD_PINOUTS_PIC18_H_ */ diff --git a/fonts/Liberation_Sans16x21.h b/fonts/Liberation_Sans16x21.h new file mode 100644 index 0000000..ad100d9 --- /dev/null +++ b/fonts/Liberation_Sans16x21.h @@ -0,0 +1,26 @@ + +//WARNING: This Font Require X-GLCD Lib. +// You can not use it with MikroE GLCD Lib. + +//Font Generated by MikroElektronika GLCD Font Creator 1.2.0.0 +//MikroElektronika 2011 +//http://www.mikroe.com + +//GLCD FontName : Liberation_Sans16x21 +//GLCD FontSize : 16 x 21 + +static const char Liberation_Sans16x21[] PROGMEM = { + 0x08, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x30, 0x00, 0x00, 0x30, 0x00, 0x00, 0x30, 0x00, 0x00, 0x30, 0x00, 0x00, 0x30, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char - + 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char . + 0x08, 0x00, 0x00, 0x1C, 0x00, 0x80, 0x1F, 0x00, 0xF8, 0x0F, 0x00, 0xFF, 0x00, 0xF0, 0x0F, 0x00, 0xFE, 0x01, 0x00, 0x1F, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char / + 0x0F, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0x00, 0xF0, 0xFF, 0x03, 0xF8, 0xFF, 0x07, 0x3C, 0x00, 0x0F, 0x0E, 0x00, 0x1C, 0x06, 0x00, 0x18, 0x06, 0x00, 0x18, 0x06, 0x00, 0x18, 0x06, 0x00, 0x18, 0x0E, 0x00, 0x1C, 0x3C, 0x00, 0x0F, 0xF8, 0xFF, 0x07, 0xF0, 0xFF, 0x03, 0xC0, 0xFF, 0x00, 0x00, 0x00, 0x00, // Code for char 0 + 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x70, 0x00, 0x18, 0x38, 0x00, 0x18, 0x1C, 0x00, 0x18, 0x0C, 0x00, 0x18, 0xFE, 0xFF, 0x1F, 0xFE, 0xFF, 0x1F, 0xFE, 0xFF, 0x1F, 0x00, 0x00, 0x18, 0x00, 0x00, 0x18, 0x00, 0x00, 0x18, 0x00, 0x00, 0x18, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, // Code for char 1 + 0x0E, 0x00, 0x00, 0x00, 0x30, 0x00, 0x1C, 0x38, 0x00, 0x1E, 0x3C, 0x00, 0x1F, 0x1C, 0xC0, 0x1B, 0x0E, 0xC0, 0x19, 0x06, 0xE0, 0x18, 0x06, 0x70, 0x18, 0x06, 0x38, 0x18, 0x06, 0x1C, 0x18, 0x0E, 0x0E, 0x18, 0xFC, 0x07, 0x18, 0xF8, 0x03, 0x18, 0xF0, 0x01, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 2 + 0x0F, 0x00, 0x00, 0x00, 0x20, 0x00, 0x01, 0x38, 0x80, 0x07, 0x3C, 0x80, 0x0F, 0x1C, 0x00, 0x0E, 0x0E, 0x00, 0x1C, 0x06, 0x0C, 0x18, 0x06, 0x0C, 0x18, 0x06, 0x0C, 0x18, 0x06, 0x0E, 0x18, 0x0E, 0x1F, 0x1C, 0xFC, 0x3B, 0x0E, 0xF8, 0xF3, 0x0F, 0xF0, 0xF1, 0x07, 0x00, 0xE0, 0x03, 0x00, 0x00, 0x00, // Code for char 3 + 0x10, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0xF0, 0x00, 0x00, 0xFC, 0x00, 0x00, 0xCE, 0x00, 0x80, 0xC7, 0x00, 0xC0, 0xC1, 0x00, 0xF0, 0xC0, 0x00, 0x38, 0xC0, 0x00, 0x1E, 0xC0, 0x00, 0xFE, 0xFF, 0x1F, 0xFE, 0xFF, 0x1F, 0xFE, 0xFF, 0x1F, 0x00, 0xC0, 0x00, 0x00, 0xC0, 0x00, 0x00, 0xC0, 0x00, // Code for char 4 + 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xF8, 0x07, 0x07, 0xFE, 0x07, 0x0F, 0xFE, 0x07, 0x0E, 0x06, 0x06, 0x1C, 0x06, 0x03, 0x18, 0x06, 0x03, 0x18, 0x06, 0x03, 0x18, 0x06, 0x03, 0x18, 0x06, 0x07, 0x1C, 0x06, 0x0F, 0x0E, 0x06, 0xFE, 0x0F, 0x06, 0xFC, 0x07, 0x00, 0xF0, 0x01, 0x00, 0x00, 0x00, // Code for char 5 + 0x0F, 0x00, 0x00, 0x00, 0x80, 0xFF, 0x00, 0xF0, 0xFF, 0x03, 0xF8, 0xFF, 0x07, 0x3C, 0x0C, 0x0F, 0x0C, 0x06, 0x1C, 0x06, 0x03, 0x18, 0x06, 0x03, 0x18, 0x06, 0x03, 0x18, 0x06, 0x03, 0x18, 0x0E, 0x07, 0x1C, 0x1C, 0x0F, 0x0E, 0x1C, 0xFE, 0x0F, 0x10, 0xFC, 0x07, 0x00, 0xF8, 0x01, 0x00, 0x00, 0x00, // Code for char 6 + 0x0F, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x1E, 0x06, 0xE0, 0x1F, 0x06, 0xF8, 0x1F, 0x06, 0xFE, 0x00, 0x86, 0x1F, 0x00, 0xC6, 0x03, 0x00, 0xF6, 0x01, 0x00, 0x7E, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 7 + 0x0F, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x03, 0xF0, 0xF8, 0x07, 0xFC, 0xF9, 0x0F, 0xFC, 0x1F, 0x0E, 0x0E, 0x0F, 0x1C, 0x06, 0x06, 0x18, 0x06, 0x06, 0x18, 0x06, 0x06, 0x18, 0x06, 0x06, 0x18, 0x0E, 0x0F, 0x1C, 0xFC, 0x1F, 0x0E, 0xFC, 0xF9, 0x0F, 0xF0, 0xF8, 0x07, 0x00, 0xE0, 0x03, 0x00, 0x00, 0x00, // Code for char 8 + 0x0F, 0x00, 0x00, 0x00, 0xE0, 0x03, 0x02, 0xF8, 0x0F, 0x06, 0xFC, 0x1F, 0x0E, 0x1C, 0x3C, 0x1C, 0x0E, 0x38, 0x18, 0x06, 0x30, 0x18, 0x06, 0x30, 0x18, 0x06, 0x30, 0x18, 0x06, 0x30, 0x1C, 0x0E, 0x18, 0x0E, 0x3C, 0x8C, 0x0F, 0xF8, 0xFF, 0x07, 0xF0, 0xFF, 0x03, 0xC0, 0x7F, 0x00, 0x00, 0x00, 0x00 // Code for char 9 + }; diff --git a/fonts/Tahoma10x11.h b/fonts/Tahoma10x11.h new file mode 100644 index 0000000..0242fa4 --- /dev/null +++ b/fonts/Tahoma10x11.h @@ -0,0 +1,111 @@ +#ifndef TAHOMA10X11_H_ +#define TAHOMA10X11_H_ +//WARNING: This Font Require X-GLCD Lib. +// You can not use it with MikroE GLCD Lib. + +//Font Generated by MikroElektronika GLCD Font Creator 1.2.0.0 +//MikroElektronika 2011 +//http://www.mikroe.com + +//GLCD FontName : Tahoma10x11 +//GLCD FontSize : 10 x 11 + +static const char Tahoma10x11[] = PROGMEM{ + 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char + 0x02, 0x00, 0x00, 0x7E, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ! + 0x03, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char " + 0x07, 0x40, 0x00, 0xC8, 0x01, 0x78, 0x00, 0xCE, 0x01, 0x78, 0x00, 0x4E, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char # + 0x05, 0x18, 0x01, 0x24, 0x01, 0xFF, 0x07, 0x24, 0x01, 0xC4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char $ + 0x0A, 0x0C, 0x00, 0x12, 0x00, 0x12, 0x00, 0x8C, 0x01, 0x60, 0x00, 0x18, 0x00, 0xC6, 0x00, 0x20, 0x01, 0x20, 0x01, 0xC0, 0x00, // Code for char % + 0x07, 0xEC, 0x00, 0x12, 0x01, 0x12, 0x01, 0x2C, 0x01, 0xC0, 0x00, 0xB0, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char & + 0x01, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ' + 0x03, 0xF8, 0x00, 0x06, 0x03, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ( + 0x03, 0x01, 0x04, 0x06, 0x03, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ) + 0x05, 0x0A, 0x00, 0x04, 0x00, 0x1F, 0x00, 0x04, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char * + 0x07, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0xFC, 0x01, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char + + 0x02, 0x00, 0x04, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char , + 0x03, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char - + 0x02, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char . + 0x03, 0x00, 0x07, 0xF8, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char / + 0x05, 0xFC, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 0 + 0x04, 0x00, 0x00, 0x04, 0x01, 0xFE, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 1 + 0x05, 0x84, 0x01, 0x42, 0x01, 0x22, 0x01, 0x12, 0x01, 0x0C, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 2 + 0x05, 0x84, 0x00, 0x02, 0x01, 0x12, 0x01, 0x12, 0x01, 0xEC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 3 + 0x05, 0x30, 0x00, 0x28, 0x00, 0x24, 0x00, 0xFE, 0x01, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 4 + 0x05, 0x9E, 0x00, 0x12, 0x01, 0x12, 0x01, 0x12, 0x01, 0xE2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 5 + 0x05, 0xF8, 0x00, 0x14, 0x01, 0x12, 0x01, 0x12, 0x01, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 6 + 0x05, 0x02, 0x00, 0x82, 0x01, 0x62, 0x00, 0x1A, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 7 + 0x05, 0xEC, 0x00, 0x12, 0x01, 0x12, 0x01, 0x12, 0x01, 0xEC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 8 + 0x05, 0x1C, 0x00, 0x22, 0x01, 0x22, 0x01, 0xA2, 0x00, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 9 + 0x02, 0x00, 0x00, 0x98, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char : + 0x02, 0x00, 0x04, 0x98, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ; + 0x07, 0x00, 0x00, 0x20, 0x00, 0x50, 0x00, 0x50, 0x00, 0x88, 0x00, 0x88, 0x00, 0x04, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char < + 0x07, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char = + 0x07, 0x00, 0x00, 0x04, 0x01, 0x88, 0x00, 0x88, 0x00, 0x50, 0x00, 0x50, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char > + 0x04, 0x02, 0x00, 0x62, 0x01, 0x12, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ? + 0x09, 0xF8, 0x00, 0x04, 0x01, 0x72, 0x02, 0x8A, 0x02, 0x8A, 0x02, 0xFA, 0x02, 0x82, 0x00, 0x84, 0x00, 0x78, 0x00, 0x00, 0x00, // Code for char @ + 0x06, 0xC0, 0x01, 0x78, 0x00, 0x46, 0x00, 0x46, 0x00, 0x78, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char A + 0x05, 0xFE, 0x01, 0x12, 0x01, 0x12, 0x01, 0x12, 0x01, 0xEC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char B + 0x06, 0x78, 0x00, 0x84, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char C + 0x06, 0xFE, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x84, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char D + 0x05, 0xFE, 0x01, 0x12, 0x01, 0x12, 0x01, 0x12, 0x01, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char E + 0x05, 0xFE, 0x01, 0x12, 0x00, 0x12, 0x00, 0x12, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char F + 0x06, 0x78, 0x00, 0x84, 0x00, 0x02, 0x01, 0x22, 0x01, 0x22, 0x01, 0xE2, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char G + 0x06, 0xFE, 0x01, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0xFE, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char H + 0x03, 0x02, 0x01, 0xFE, 0x01, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char I + 0x04, 0x00, 0x01, 0x02, 0x01, 0x02, 0x01, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char J + 0x05, 0xFE, 0x01, 0x30, 0x00, 0x48, 0x00, 0x84, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char K + 0x04, 0xFE, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char L + 0x07, 0xFE, 0x01, 0x06, 0x00, 0x18, 0x00, 0x60, 0x00, 0x18, 0x00, 0x06, 0x00, 0xFE, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char M + 0x06, 0xFE, 0x01, 0x06, 0x00, 0x18, 0x00, 0x60, 0x00, 0x80, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char N + 0x07, 0x78, 0x00, 0x84, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x84, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char O + 0x05, 0xFE, 0x01, 0x22, 0x00, 0x22, 0x00, 0x22, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char P + 0x07, 0x78, 0x00, 0x84, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x84, 0x04, 0x78, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char Q + 0x06, 0xFE, 0x01, 0x22, 0x00, 0x22, 0x00, 0x62, 0x00, 0x9C, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char R + 0x05, 0x0C, 0x01, 0x12, 0x01, 0x12, 0x01, 0x12, 0x01, 0xE2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char S + 0x05, 0x02, 0x00, 0x02, 0x00, 0xFE, 0x01, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char T + 0x06, 0xFE, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char U + 0x05, 0x0E, 0x00, 0x70, 0x00, 0x80, 0x01, 0x70, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char V + 0x09, 0x0E, 0x00, 0x70, 0x00, 0x80, 0x01, 0x70, 0x00, 0x0E, 0x00, 0x70, 0x00, 0x80, 0x01, 0x70, 0x00, 0x0E, 0x00, 0x00, 0x00, // Code for char W + 0x05, 0x86, 0x01, 0x48, 0x00, 0x30, 0x00, 0x48, 0x00, 0x86, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char X + 0x05, 0x06, 0x00, 0x18, 0x00, 0xE0, 0x01, 0x18, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char Y + 0x05, 0x82, 0x01, 0x42, 0x01, 0x32, 0x01, 0x0A, 0x01, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char Z + 0x03, 0xFF, 0x07, 0x01, 0x04, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char [ + 0x03, 0x07, 0x00, 0xF8, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char BackSlash + 0x03, 0x01, 0x04, 0x01, 0x04, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ] + 0x07, 0x10, 0x00, 0x08, 0x00, 0x04, 0x00, 0x02, 0x00, 0x04, 0x00, 0x08, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ^ + 0x06, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char _ + 0x03, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ` + 0x05, 0xC0, 0x00, 0x28, 0x01, 0x28, 0x01, 0x28, 0x01, 0xF0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char a + 0x05, 0xFF, 0x01, 0x08, 0x01, 0x08, 0x01, 0x08, 0x01, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char b + 0x04, 0xF0, 0x00, 0x08, 0x01, 0x08, 0x01, 0x08, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char c + 0x05, 0xF0, 0x00, 0x08, 0x01, 0x08, 0x01, 0x08, 0x01, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char d + 0x05, 0xF0, 0x00, 0x28, 0x01, 0x28, 0x01, 0x28, 0x01, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char e + 0x03, 0xFE, 0x01, 0x09, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char f + 0x05, 0xF0, 0x00, 0x08, 0x05, 0x08, 0x05, 0x08, 0x05, 0xF8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char g + 0x05, 0xFF, 0x01, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0xF0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char h + 0x01, 0xFA, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char i + 0x02, 0x08, 0x04, 0xFA, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char j + 0x05, 0xFF, 0x01, 0x20, 0x00, 0x50, 0x00, 0x88, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char k + 0x01, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char l + 0x07, 0xF8, 0x01, 0x08, 0x00, 0x08, 0x00, 0xF0, 0x01, 0x08, 0x00, 0x08, 0x00, 0xF0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char m + 0x05, 0xF8, 0x01, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0xF0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char n + 0x05, 0xF0, 0x00, 0x08, 0x01, 0x08, 0x01, 0x08, 0x01, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char o + 0x05, 0xF8, 0x07, 0x08, 0x01, 0x08, 0x01, 0x08, 0x01, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char p + 0x05, 0xF0, 0x00, 0x08, 0x01, 0x08, 0x01, 0x08, 0x01, 0xF8, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char q + 0x03, 0xF8, 0x01, 0x10, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char r + 0x04, 0x30, 0x01, 0x28, 0x01, 0x48, 0x01, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char s + 0x03, 0xFE, 0x00, 0x08, 0x01, 0x08, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char t + 0x05, 0xF8, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0xF8, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char u + 0x05, 0x18, 0x00, 0x60, 0x00, 0x80, 0x01, 0x60, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char v + 0x07, 0x78, 0x00, 0x80, 0x01, 0x60, 0x00, 0x18, 0x00, 0x60, 0x00, 0x80, 0x01, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char w + 0x05, 0x08, 0x01, 0x90, 0x00, 0x60, 0x00, 0x90, 0x00, 0x08, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char x + 0x05, 0x18, 0x00, 0x60, 0x06, 0x80, 0x01, 0x60, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char y + 0x04, 0x88, 0x01, 0x48, 0x01, 0x28, 0x01, 0x18, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char z + 0x04, 0x20, 0x00, 0x20, 0x00, 0xDE, 0x03, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char { + 0x02, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char | + 0x04, 0x01, 0x04, 0xDE, 0x03, 0x20, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char } + 0x07, 0x60, 0x00, 0x10, 0x00, 0x10, 0x00, 0x20, 0x00, 0x40, 0x00, 0x40, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ~ + 0x03, 0xFE, 0x01, 0x02, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 // Code for char  + }; +#endif \ No newline at end of file diff --git a/glcd.h b/glcd.h index 5d32269..294f348 100644 --- a/glcd.h +++ b/glcd.h @@ -81,6 +81,13 @@ extern void delay_ms(uint32_t ms); #define PROGMEM +#elif defined(GLCD_DEVICE_PIC18H) + #include + #include "./devices/PIC18H.h" + #include "../mcc_generated_files/mcc.h" + #define PROGMEM + #define delay_ms(t) __delay_ms(t) + #elif defined(GLCD_DEVICE_PIC24H) #define FCY (FOSC/2) #include @@ -106,7 +113,10 @@ #elif defined(GLCD_CONTROLLER_NT75451) #include "controllers/NT75451.h" - + +#elif defined(GLCD_CONTROLLER_SSD1309) + #include "controllers/SSD1309.h" + #else #error "Controller not supported or defined" diff --git a/glcd_devices.h b/glcd_devices.h index 6fb292e..6e6cd72 100644 --- a/glcd_devices.h +++ b/glcd_devices.h @@ -3,7 +3,7 @@ \brief Functions specific to certain devices (microcontrollers). These are functions are defined in devices/yourdevice.c \author Andy Gock - */ + */ /* Copyright (c) 2012, Andy Gock @@ -53,6 +53,9 @@ #include #include #include +#elif defined(GLCD_DEVICE_PIC18H) + #include + #include #elif defined(GLCD_DEVICE_PIC32) #else #error "Device not supported or defined"