Microchip | The Embedded Control Solutions Company Register Login
Browse All
MAGETEX
 6 Code Snippets

Graphics library for the driver UC1601s (MPLAB XC16)

MAGETEX

Library dlya rabotы with LCD Driver indikatorami UC1601s designed dlya ispolyzovaniya 16 razryadnыmi pic-kontrollerami. The library also includes a minimum set of functions to work with the devices via I 2 C. Tested and developed with the use of the indicator RDX077-GC. Version of the compiler MPLAB XC16 v1.11 .

About this Code Example

Для работы с I2C:
void I2C_Open (unsigned int FCLOCK);// инициализация, значение частоты шины в килогерцах (100, 300, 400)
void i2c_stop (void); // формирование стоп

the formation of the state of the start and restart at the same time sending the device address management and low bits 
unsigned char i2c_start (unsigned char adres, C_D unsigned char, unsigned char R_W); 
unsigned char i2c_restart (unsigned char adres, C_D unsigned char, unsigned char R_W);

unsigned char i2c_write (unsigned char data); //запись байта
unsigned char i2c_read_ack (void); //чтение с подтверждением
unsigned char i2c_read_noack (void); //чтение без подтверждения

For text:
void int_LCD (void); / / initialize the display 
void clear_LCD (char Tip); / / ochiske entire display 
/ / set the cursor 
void curcorG_LCD (unsigned char X, unsigned char Y); 
/ / output lines 
void String_LCD ( const char * str, unsigned char inv, unsigned char width, unsigned char height, char X, unsigned char Y) ;/ /, char cstroka, width, height, alignment (22 characters per line) 
void Stringp_LCD (const char * str, INV unsigned char, unsigned char width, unsigned char height); 
/ / output a character or number 
void symbol_LCD (unsigned char cod, Tip unsigned char, unsigned char INV, shi unsigned char, unsigned char vis); 
/ / ticker 
void ticker_LCD ( char * str, unsigned char start, unsigned char ends, unsigned char Y);

Для работы с графикой:
void point ( int tip, int X, int Y); // рисование точки
void line( int tip, int x0, int y0, int x1, int y1); // рисование линии по 4 координатам
где, tip – тип линии 0-9.

рисование прямоугольника
void rectangle (unsigned int ugl, unsigned int tip,unsigned int zal,unsigned int tipzal, unsigned int x0, unsigned int y0, unsigned int x1, unsigned int y1);
параметры ugl – тип угла (0-1), tip – тип линии (0-9), zal - тип заливки, x0 и y0 точка нижнего левого угла, x1 и y1 – длина и высота прямоугольника

drawing indicators load void strip (ugl unsigned int, unsigned int, unsigned int tipzal, unsigned int x0, y0, unsigned int, unsigned int sh, int vs unsigned, unsigned char vol) parameters ugl - type angle (0-1), type - the type of line (0-9), tipzal-type Pouring, x0 and y0 point nižnego left corner, sh, vs - width, height, Vol - value indicators.

Categories

Release History

  • Oct 22, 2013

    Version: 1.0.1

    library

  • Oct 22, 2013

    Version: 1.0.0

    design, wiring diagram

Download Contact the Developer

*Required Fields


  • Current Version:1.0.1
  • Created:Oct 22, 2013
  • Updated:Apr 17, 2015
  • Downloads:4938
  • MPLAB Version:MPLAB X 1.90
  • C Compiler:xc16, v1.11
  • Development Tools:ICD3, Pickit 3
  • Supported Devices:PIC24

Corporate News

Resources

Stay Connected

Stay up to date with the latest news from Microchip Technology.