• AVR Freaks

Helpful ReplyHot!8x2 Alphanumeric display programming with PIC16F1704

Author
Almurray42
New Member
  • Total Posts : 11
  • Reward points : 0
  • Joined: 2019/05/29 14:01:24
  • Location: 0
  • Status: offline
2019/06/01 06:37:29 (permalink)
0

8x2 Alphanumeric display programming with PIC16F1704

Hi All
 
I have project that I would like to complete which involves displaying text on an 8X2 character display which I have. I am struggling to find any guides or code to successfully initialise and send data to the display.
 
I am new to PIC programming So I do apologise if any of my questions are simple. I have done searching around the forums and on google but cannot seem to figure it out.
 
The display that I am trying to use is: Winstar WH0802A-NYG-JT
I am using a PIC16F1704 and utilising MPLABX with XC8 compiler. I have a PICKIT 3 to program the device.
 
1: Are there readily available LCD display header files available for free or for purchase that I can use? Surely someone has done this before?
2: I have tried numerous LCD.h files from across the web and none seem to initialise, I always have a BLANK lcd.
 
Is anyone aware of any LCD interfacing tutorials or guides that I can use for reference? Any help would be appreciated.
 
Regards;
AL
#1
pcbbc
Super Member
  • Total Posts : 1096
  • Reward points : 0
  • Joined: 2014/03/27 07:04:41
  • Location: 0
  • Status: offline
Re: 8x2 Alphanumeric display programming with PIC16F1704 2019/06/03 09:19:24 (permalink)
+3 (3)
4-bit or 8 bit mode?
 
If the display isn't initialising (blank) then pay particular attention to the required delays - see datasheet pages 18 and 19.
 
It is always better to start with excessively long delays, and then reduce them once you have the display actually working.
 
People do occasionally post libraries, but I'm afraid this isn't Arduino where you can easily find ready rolled solutions.  Libraries do get you started quickly as a beginner, but they often aren't that great when you get down to actually writing production code.  For example it is difficult to write a truely portable library for a PIC when you do not know what IO pins the user is going to use for thier display.  Often portabilty comes at the expense of compactness or speed.
 
Finally, post your code if you want more help as to why what you have isn't working.
#2
typematrix
New Member
  • Total Posts : 13
  • Reward points : 0
  • Joined: 2019/03/04 08:11:26
  • Location: 0
  • Status: offline
Re: 8x2 Alphanumeric display programming with PIC16F1704 2019/06/03 14:04:38 (permalink)
+1 (1)
I have done a lot of work with HDD44780 LCD, similar but different and much more common, and  have various working libraries available. I did a quick bit of research and found this thread.
It is from 2012 but still some good info here.
he is trying to connect a PIC24 to a  model winstar wh1601L this LCD uses same control IC as yours ST7066
 
https://www.microchip.com/forums/m695480.aspx
 
Also A search on github for ST7066 reveals this
 
https://github.com/sbenne...430-ST7066-HD44780-Lib
 
#3
dan1138
Super Member
  • Total Posts : 3120
  • Reward points : 0
  • Joined: 2007/02/21 23:04:16
  • Location: 0
  • Status: offline
Re: 8x2 Alphanumeric display programming with PIC16F1704 2019/06/03 16:37:29 (permalink)
+3 (3)
@Almurray42,
 
This is one possible way to drive the Winstar WH0802A-NYG-JT display using a PIC16F1704:
/*
 * File:     main.c
 * Author:   dan1138
 * Target:   PIC16F1704
 * Compiler: XC8 v2.05
 * IDE:      MPLABX v5.10
 *
 * Created on June 3, 2019, 2:47 PM
 *
 *                              PIC16F1704
 *                           +-------_-------+
 *                5v0   -> 1 : VDD       VSS : 14 <- GND
 *                      <> 2 : RA5   PGD/RA0 : 13 <> ICD_PGD
 *                      <> 3 : RA4   PGC/RA1 : 12 <> ICD_PGC
 *              ICD_VPP -> 4 : MCLRn     RA2 : 11 <> LCD_RW
 *              LCD_E   <> 5 : RC5       RC0 : 10 <> LCD_D4
 *              LCD_RS  <> 6 : RC4       RC1 : 9  <> LCD_D5
 *              LCD_D7  <> 7 : RC3       RC2 : 8  <> LCD_D6
 *                           +---------------+
 *                                 DIP-14
 */

// CONFIG1
#pragma config FOSC = INTOSC    // Oscillator Selection Bits (INTOSC oscillator: I/O function on CLKIN pin)
#pragma config WDTE = OFF       // Watchdog Timer Enable (WDT disabled)
#pragma config PWRTE = OFF      // Power-up Timer Enable (PWRT disabled)
#pragma config MCLRE = ON       // MCLR Pin Function Select (MCLR/VPP pin function is MCLR)
#pragma config CP = OFF         // Flash Program Memory Code Protection (Program memory code protection is disabled)
#pragma config BOREN = OFF      // Brown-out Reset Enable (Brown-out Reset disabled)
#pragma config CLKOUTEN = OFF   // Clock Out Enable (CLKOUT function is disabled. I/O or oscillator function on the CLKOUT pin)
#pragma config IESO = OFF       // Internal/External Switchover Mode (Internal/External Switchover Mode is disabled)
#pragma config FCMEN = OFF      // Fail-Safe Clock Monitor Enable (Fail-Safe Clock Monitor is disabled)

// CONFIG2
#pragma config WRT = OFF        // Flash Memory Self-Write Protection (Write protection off)
#pragma config PPS1WAY = OFF    // Peripheral Pin Select one-way control (The PPSLOCK bit can be set and cleared repeatedly by software)
#pragma config ZCDDIS = OFF     // Zero-cross detect disable (Zero-cross detect circuit is enabled at POR)
#pragma config PLLEN = OFF      // Phase Lock Loop enable (4x PLL is enabled when software sets the SPLLEN bit)
#pragma config STVREN = ON      // Stack Overflow/Underflow Reset Enable (Stack Overflow or Underflow will cause a Reset)
#pragma config BORV = LO        // Brown-out Reset Voltage Selection (Brown-out Reset Voltage (Vbor), low trip point selected.)
#pragma config LPBOR = OFF      // Low-Power Brown Out Reset (Low-Power BOR is disabled)
#pragma config LVP = OFF        // Low-Voltage Programming Enable (High-voltage on MCLR/VPP must be used for programming)

#include <xc.h>
#include <stdint.h>

#define _XTAL_FREQ (32000000ul)
/*
 * LCD Interface
 */
/* Define the LCD interface and character size */
#define LCD_FORMAT (FOUR_BIT & LINES_5X7)

/* Define the LCD port pins */
#define E_PIN               LATCbits.LATC5
#define RW_PIN              LATAbits.LATA2
#define RS_PIN              LATCbits.LATC4
#define LCD_DATA_BITS       0x0F
#define LCD_PORT_IN         PORTC
#define LCD_PORT_OUT        LATC

#define E_PIN_DIR           TRISCbits.TRISC5
#define RW_PIN_DIR          TRISAbits.TRISA2
#define RS_PIN_DIR          TRISCbits.TRISC4
#define LCD_PORT_DIR        TRISC

/* Clear display command */
#define CLEAR_DISPLAY 0b00000001

/* Return home command */
#define RETURN_HOME 0b00000010

/* Display ON/OFF Control defines */
#define DON         0b00001111   /* Display on      */
#define DOFF        0b00001011   /* Display off     */
#define CURSOR_ON   0b00001111   /* Cursor on       */
#define CURSOR_OFF  0b00001101   /* Cursor off      */
#define BLINK_ON    0b00001111   /* Cursor Blink    */
#define BLINK_OFF   0b00001110   /* Cursor No Blink */

/* Cursor or Display Shift defines */
#define SHIFT_CUR_LEFT    0b00010011   /* Cursor shifts to the left   */
#define SHIFT_CUR_RIGHT   0b00010111   /* Cursor shifts to the right  */
#define SHIFT_DISP_LEFT   0b00011011   /* Display shifts to the left  */
#define SHIFT_DISP_RIGHT  0b00011111   /* Display shifts to the right */

/* Function Set defines */
#define FOUR_BIT   0b00101111   /* 4-bit Interface               */
#define EIGHT_BIT  0b00111111   /* 8-bit Interface               */
#define LINE_5X7   0b00110011   /* 5x7 characters, single line   */
#define LINE_5X10  0b00110111   /* 5x10 characters               */
#define LINES_5X7  0b00111011   /* 5x7 characters, multiple line */

/* Start address of each line */
#define LINE_ONE    0x00
#define LINE_TWO    0x40

void LCD_Init(void);
void LCD_SetCGRamAddr(uint8_t data);
void LCD_SetDDRamAddr(uint8_t data);
void LCD_WriteCmd(uint8_t data);
void LCD_WriteData(uint8_t data);
void LCD_WriteConstString(const char * prString);
void LCD_WriteString(char * pString);

#if (LCD_DATA_BITS == 0x0F)
  #define LCD_DATA_ON_LOW_4_BITS
#else
  #if (LCD_DATA_BITS == 0xF0)
    #define LCD_DATA_ON_HIGH_4_BITS
  #else
    #error LCD interface supports 4-bit mode only on high or low 4-bits of one port
  #endif
#endif

static uint8_t LCD_BusyBit;

static const char CGRAM_Table[] =
{
    0b10000000, /* CGRAM character 8 */
    0b10000100,
    0b10000010,
    0b10001111,
    0b10000010,
    0b10000100,
    0b10000000,
    0b10011111,

    0b10001110, /* CGRAM character 9 */
    0b10010001,
    0b10010000,
    0b10010000,
    0b10010001,
    0b10001110,
    0b10000000,
    0b10011111,

    0b10001110, /* CGRAM character 10 */
    0b10010001,
    0b10010000,
    0b10010011,
    0b10010001,
    0b10001110,
    0b10000000,
    0b10011111,

    0b10000000, /* CGRAM character 11 */
    0b10001110,
    0b10001010,
    0b10001010,
    0b10001110,
    0b10000000,
    0b10000000,
    0b10011111,

    0b10011110, /* CGRAM character 12 */
    0b10010001,
    0b10010001,
    0b10011110,
    0b10010010,
    0b10010001,
    0b10000000,
    0b10011111,

    0b10001110, /* CGRAM character 13 */
    0b10010001,
    0b10010001,
    0b10011111,
    0b10010001,
    0b10010001,
    0b10000000,
    0b10011111,

    0b10010001, /* CGRAM character 14 */
    0b10011011,
    0b10010101,
    0b10010101,
    0b10010001,
    0b10010001,
    0b10000000,
    0b10011111,

    0b10000000, /* CGRAM character 15 */
    0b10000100,
    0b10001000,
    0b10011110,
    0b10001000,
    0b10000100,
    0b10000000,
    0b10011111,

    0b00000000  /* End of table marker */
};

static void LCD_E_Pulse(void)
{
    E_PIN = 1;
    __delay_us(4);
    E_PIN = 0;
    __delay_us(4);
}

static void LCD_DelayPOR(void)
{
    __delay_ms(15);
}

static void LCD_Delay(void)
{
    __delay_ms(5);
}

static uint8_t LCD_GetByte(void)
{
    uint8_t LCD_Data;
    
    LCD_PORT_DIR |= LCD_DATA_BITS; /* make LCD data bits inputs */
    RW_PIN = 1;
    
    E_PIN = 1;
    __delay_us(4);
    LCD_Data = LCD_PORT_IN & LCD_DATA_BITS;
    E_PIN = 0;
    __delay_us(4);
    
    LCD_Data = ((LCD_Data >> 4) | (LCD_Data << 4));
    
    E_PIN = 1;
    __delay_us(4);
    LCD_Data |= LCD_PORT_IN & LCD_DATA_BITS;
    E_PIN = 0;
    __delay_us(4);

#ifdef LCD_DATA_ON_HIGH_4_BITS
    LCD_Data = ((LCD_Data >> 4) | (LCD_Data << 4));
#endif
    return LCD_Data;
}

static void LCD_PutByte(uint8_t LCD_Data)
{
#ifdef LCD_DATA_ON_HIGH_4_BITS
    LCD_Data = ((LCD_Data >> 4) | (LCD_Data << 4));
#endif

    LCD_PORT_DIR &= ~LCD_DATA_BITS; /* make LCD data bits outputs */
    RW_PIN = 0;
    
    /* send first nibble */
    LCD_PORT_OUT &= ~LCD_DATA_BITS;
    LCD_PORT_OUT |= ((LCD_Data >> 4) | (LCD_Data << 4)) & LCD_DATA_BITS;
    LCD_E_Pulse();
    
    LCD_PORT_OUT &= ~LCD_DATA_BITS;
    LCD_PORT_OUT |= (LCD_Data) & LCD_DATA_BITS;
    LCD_E_Pulse();

    LCD_PORT_DIR |= LCD_DATA_BITS; /* make LCD data bits inputs */
}

static void LCD_Busy(void)
{
    if (LCD_BusyBit)
    {
        uint8_t LCD_Data;
    
        LCD_PORT_DIR |= LCD_DATA_BITS; /* make LCD data bits inputs */
        LCD_Data = 0;

        RS_PIN = 0;
        RW_PIN = 1;
        do
        {
            LCD_Data = LCD_GetByte();
        } while (LCD_Data & LCD_BusyBit);
    }
    else
    {
        LCD_Delay(); /* use 5ms delay when busy bit is unknown */
    }
}

void LCD_Init(void)
{
    uint8_t LCD_Data;
    
    LCD_BusyBit = 0;
    LCD_PORT_DIR &= ~LCD_DATA_BITS; /* make LCD data bits outputs */
    E_PIN_DIR = 0;                  /* make LCD Enable strobe an output */
    RW_PIN_DIR = 0;                 /* make LCD Read/Write select an output */
    RS_PIN_DIR = 0;                 /* make LCD Register select an output */
    E_PIN = 0;                      /* set LCD Enable strobe to not active */
    RW_PIN = 0;                     /* set LCD Read/Write select to Write */
    RS_PIN = 0;                     /* set LCD Register select to command group */
    LCD_PORT_OUT &= ~LCD_DATA_BITS; /* set LCD data bits to zero */
    LCD_DelayPOR();                 /* wait for LCD power on to complete */

    /* Force LCD to 8-bit mode */
    LCD_PORT_OUT &= ~LCD_DATA_BITS; /* set LCD data bits to zero */
    LCD_PORT_OUT |= (0b00110011 & LCD_DATA_BITS);
    LCD_E_Pulse();
    LCD_Delay();
    LCD_E_Pulse();
    LCD_Delay();
    LCD_E_Pulse();
    LCD_Delay();
    
    /* Set LCD to 4-bit mode */
    LCD_PORT_OUT &= ~LCD_DATA_BITS; /* set LCD data bits to zero */
    LCD_PORT_OUT |= (0b00100010 & LCD_DATA_BITS);
    LCD_E_Pulse();
    LCD_Delay();

    /* Initialize LCD mode */
    LCD_WriteCmd(LCD_FORMAT);

    /*
     * Find position of busy bit.
     * Required when using 4-bit mode.
     */
    LCD_SetDDRamAddr(LINE_ONE+1);
    LCD_Busy();
    RS_PIN = 0;
    LCD_Data = LCD_GetByte();

    if (LCD_Data == 0x01)
    {
        LCD_BusyBit = 0x80;
    }
    else
    {
        if (LCD_Data == 0x10)
        {
            LCD_BusyBit = 0x08;
        }
    }

    /* Turn on display, Setup cursor and blinking */
    LCD_WriteCmd(DOFF & CURSOR_OFF & BLINK_OFF);
    LCD_WriteCmd(DON & CURSOR_OFF & BLINK_OFF);
    LCD_WriteCmd(CLEAR_DISPLAY);
    LCD_WriteCmd(SHIFT_CUR_LEFT);

    /* Initialize the character generator RAM */
    LCD_SetCGRamAddr(0);
    LCD_WriteConstString(CGRAM_Table);
    
    /* Set first position on line one, left most character */
    LCD_SetDDRamAddr(LINE_ONE);
}

void LCD_SetCGRamAddr(uint8_t data)
{
    LCD_Busy();
    RS_PIN = 0;            
    LCD_PutByte((data & 0x3F) | 0x40);
}

void LCD_SetDDRamAddr(uint8_t data)
{
    LCD_Busy();
    RS_PIN = 0;
    LCD_PutByte((data & 0x7F) | 0x80);
}

void LCD_WriteCmd(uint8_t data)
{
    LCD_Busy();
    RS_PIN = 0;
    LCD_PutByte(data);
}

void LCD_WriteData(uint8_t data)
{
    LCD_Busy();
    RS_PIN = 1;
    LCD_PutByte(data);
    RS_PIN = 0;
}

void LCD_WriteConstString(const char * prString)
{
    if (prString) while(*prString)
    {
        LCD_WriteData(*prString);
        prString++;
    }
}

void LCD_WriteString(char * pString)
{
    if (pString) while(*pString)
    {
        LCD_WriteData(*pString);
        pString++;
    }
}

/*
 * Initialize this PIC
 */
void PIC_Init(void)
{
    INTCON = 0;     // Disable all interrupt sources
    PIE1 = 0;
    PIE2 = 0;
    OSCCON = 0xF0;  // Enable 4x PLL with 8MHz internal oscillator
    ANSELA = 0;     // Make all GPIO pins digital I/O
    ANSELC = 0;
    
}
/*
 * Display version of application
 */
void ShowVersion(void)
{
    char Buf[9] = { 8,9,10,11,12,13,14,15,0 };
    
    /* Show application version */
    LCD_SetDDRamAddr(LINE_ONE);
    LCD_WriteConstString("Ver  1.0");
    
    /* Show patterns in character generator RAM */
    LCD_SetDDRamAddr(LINE_TWO);
    LCD_WriteString(Buf);
}
/*
 * Main application
 */
void main(void)
{
    PIC_Init();
    LCD_Init();
    ShowVersion();
    for(;;);
}

 
#4
Almurray42
New Member
  • Total Posts : 11
  • Reward points : 0
  • Joined: 2019/05/29 14:01:24
  • Location: 0
  • Status: offline
Re: 8x2 Alphanumeric display programming with PIC16F1704 2019/06/07 14:53:30 (permalink)
0
Hi all, thank you very much for the responses. Apologies I couldn't get back to reply sooner.
 
I will paste my code in below, if anyone can shed some light on why this could be not initialising the LCD I would be very grateful!
 
I tried to put my code into a codebox like you guys have but couldn't figure it out so I have attached the header and main c files. These can be opened in Notepad. :)
 
The Hardware connections are good.
The Contrast is set so that I can *JUST* see the Block boxes on the top row of the LCD.
 
Any pointers appreciated!
 
Best Regards;
Al
 
EDIT:
I am using 4 BIT mode, and am externally powering the circuit.
 
post edited by Almurray42 - 2019/06/07 14:55:09
#5
dan1138
Super Member
  • Total Posts : 3120
  • Reward points : 0
  • Joined: 2007/02/21 23:04:16
  • Location: 0
  • Status: offline
Re: 8x2 Alphanumeric display programming with PIC16F1704 2019/06/07 17:48:20 (permalink) ☄ Helpfulby Almurray42 2019/06/18 13:17:54
+2 (2)
Almurray42
... if anyone can shed some light on why this could be not initializing the LCD I would be very grateful!
 
Any pointers appreciated!

  1. The GPIO pins you use for the LCD interface are not configured for digital I/O.
    (Read about the ANSELA and ANSELC registers)
  2. The files you posted are not organized to build as a complete project
  3. There may be bugs in you LCD interface implementation
You could just try the code in post #4 and report if it works for you or not.
#6
Almurray42
New Member
  • Total Posts : 11
  • Reward points : 0
  • Joined: 2019/05/29 14:01:24
  • Location: 0
  • Status: offline
Re: 8x2 Alphanumeric display programming with PIC16F1704 2019/06/18 13:17:46 (permalink)
0
dan1138
  1. interface are not configured for digital I/O.
    (Read about the ANSELA and ANSELC registers)
  2. The files you posted are not organized to build as a complete project
  3. There may be bugs in you LCD interface implementation
You could just try the code in post #4 and report if it works for you or not.




Hi Dan

It's been a busy month and I am Finally back on this project. Great news is that My display now initialises. The ANSELC=0 Command seems to have worked... To an extent. 
 
The display Initialises, and is trying to display something, but definitely not what I tell it to! I appear to have Garbled Characters. I have Displayed "Hello" on position 1,1 and "TEST" on position 2,1 and i See: "||e_o" on the top row and "TUT" on the bottom! I'm going to try looking into the datasheet and why it may be doing this but as always, any help from you guys would be much appreciated! :)
 
Best Regards;
Al
#7
Almurray42
New Member
  • Total Posts : 11
  • Reward points : 0
  • Joined: 2019/05/29 14:01:24
  • Location: 0
  • Status: offline
Re: 8x2 Alphanumeric display programming with PIC16F1704 2019/06/18 13:47:00 (permalink)
0
UPDATE::
 
After some playing I have found that by DISABLING the PLL Setting in config has fixed this random character generation. :) Thanks To All who have contributed to this thread. I really do appreciate the friendliness and help given!
 
Best Regards;
Al 
 
#8
ric
Super Member
  • Total Posts : 22677
  • Reward points : 0
  • Joined: 2003/11/07 12:41:26
  • Location: Australia, Melbourne
  • Status: online
Re: 8x2 Alphanumeric display programming with PIC16F1704 2019/06/18 15:11:34 (permalink)
0
Almurray42
UPDATE::
 
After some playing I have found that by DISABLING the PLL Setting in config has fixed this random character generation. 



That would imply that one of the delays in your code is not long enough.
What speed do you  intend running at?
Your main() function starts with
    OSCCONbits.IRCF = 0b111;
which selects the 500kHz oscillator. With PLL enabled that would give you a 2MHz clock, but you have told the compiler you are running the clock at 8MHz.
 
Or, this might just be read/modify/write problems on your IO pins.
If you haven't already, change
#define RS RC2
#define EN RC3
#define D4 RC4
#define D5 RC5
#define D6 RC0
#define D7 RC1

to
#define RS LATC2
#define EN LATC3
#define D4 LATC4
#define D5 LATC5
#define D6 LATC0
#define D7 LATC1


I also post at: PicForum
Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
NEW USERS: Posting images, links and code - workaround for restrictions.
To get a useful answer, always state which PIC you are using!
#9
Almurray42
New Member
  • Total Posts : 11
  • Reward points : 0
  • Joined: 2019/05/29 14:01:24
  • Location: 0
  • Status: offline
Re: 8x2 Alphanumeric display programming with PIC16F1704 2019/06/18 15:24:48 (permalink)
0
Thanks for the response.

I am now using an external 8Mhz oscillator, and want the clock running as fast as possible as I will be using the pic and lcd to measure and display the response time of an optocoupler which I am expecting to be in the range of 3-10uS.

The Bulk of the code is not written by me, I paid a small amount for a software engineer to produce it for me, but would like to gain a deeper understanding of what it is doing as I am planning on writing the remainder of the code myself.

Ultimately I'll be using the Pic to output pulses into an opto, and timing how long it takes to see that pulse back on one of the input pins.

I am now going to research what the PLL is and what it does, and also why using "LAT" instead of "R" makes a difference.

I'll update this thread with my progress, as I'm sure I'll have more questions.

Best regards
Al
#10
ric
Super Member
  • Total Posts : 22677
  • Reward points : 0
  • Joined: 2003/11/07 12:41:26
  • Location: Australia, Melbourne
  • Status: online
Re: 8x2 Alphanumeric display programming with PIC16F1704 2019/06/18 15:32:05 (permalink)
0
Almurray42
I am now going to research what the PLL is and what it does,

It simply multiplies the clock four times when enabled, so an 8 MHz clock becomes 32 MHz.
It is your job to update the "#define _XTAL_FREQ" line in your code to match the actual clock rate in use.
 

and also why using "LAT" instead of "R" makes a difference.

That magic words are "read-modify-write" which describes how single bit operations on ports work.
Those commands first read the whole 8 bits, then modify the one bit selected, then write the whole 8 bits back to the port.
If you address "RA0" then the read operation reads the actual pin voltages.
If you address "LATA0" it just reads the state of the internal port latch.
 
The RA0 version is sensitive to analog affects on the pins. i.e. when a processor is running at 32MHz, if you execute two pin changes instructions in sequence, the physical pin might still be changing from the first instruction when you execute the second instruction, so the value read from the pin is bogus.
Using the LATA0 version avoids this problem.
 

I also post at: PicForum
Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
NEW USERS: Posting images, links and code - workaround for restrictions.
To get a useful answer, always state which PIC you are using!
#11
Almurray42
New Member
  • Total Posts : 11
  • Reward points : 0
  • Joined: 2019/05/29 14:01:24
  • Location: 0
  • Status: offline
Re: 8x2 Alphanumeric display programming with PIC16F1704 2019/06/18 15:38:06 (permalink)
0
Ric

What an excellent explanation, thank you!

I'll be going through and checking the code over tomorrow, making tweaks as I go. I'm not satisfied that simply Disabling this 4x Clock multiplier has "fixed" the fault; it appears to have simply not caused the symptom.

I'll be changing to LAT instructions as well for this.

Thanks again for taking the time to explain.

Best Regards
Al
#12
dan1138
Super Member
  • Total Posts : 3120
  • Reward points : 0
  • Joined: 2007/02/21 23:04:16
  • Location: 0
  • Status: offline
Re: 8x2 Alphanumeric display programming with PIC16F1704 2019/06/18 18:15:00 (permalink)
0
Almurray42
The Bulk of the code is not written by me, I paid a small amount for a software engineer to produce it for me ...

Based on the code you have posted that the amount paid was perhaps too small.
 
It seems you only just got your moneys worth.
#13
Jump to:
© 2019 APG vNext Commercial Version 4.5