• AVR Freaks

AnsweredHot!LCD 16x2 with XC8

Page: 1234 > Showing page 1 of 4
Author
ArakelTheDragon
Starting Member
  • Total Posts : 86
  • Reward points : 0
  • Joined: 2016/12/11 07:12:00
  • Location: 0
  • Status: offline
2020/04/09 08:06:39 (permalink)
0

LCD 16x2 with XC8

Good day! I am trying to use and LCD in 4 bit mode, I see 10 instructions only to initializa the display. Is this really so hard? Is there some good documentation for doing this, I tried searching but there is nothing good and the examples don't work.
 
XC8 v2.10
Windows 10
 

 
 
 
/* Main.c file generated by New Project wizard
 *
 * Created:   Thu Mar 26 2020
 * Processor: PIC16F690
 * Compiler:  MPLAB XC8
 */
                                       //// Includes ////
#include <xc.h>
                                       //// Configuration register ////
__CONFIG(MCLRE_OFF, CP_OFF, WDT_OFF, OSC_IntRC, INTRCIO);    // Mclear ON, Code protect off, watchdog timer off, Internal RC oscilator with 1% factory calibrated accuracy, Oscilator pins as digital

               
                                       //// Definitions ////
#define RS PORTCbits.RC3
#define RW PORTCbits.RC4
#define EN PORTCbits.RC5
#define D4 PORTCbits.RC6
#define D5 PORTCbits.RC7
#define D6 PORTBbits.RB7
#define D7 PORTBbits.RB6

                                       /***** MAIN PROGRAM *****/
void main()
{
                                      //// Local variables and Initialisation ////
   unsigned int i = 0;
                                       // Initializa the TRIS registers.
           //TRISA = 0;                           // 1 = input, 0 = output.
        TRISB = 0;                           // 1 = input, 0 = output.
        TRISC = 0;                                 // 1 = input, 0 = output.
      
                                       // Initialize display 16x2 in 4 bit mode according to the datasheet
           PORTCbits.RC3 = 0;                       // Enable pin on the LCD.
           PORTCbits.RC4 = 0;                       // Read / write pin on the LCD.
           PORTCbits.RC5 = 0;                       // Reset pin on the LCD.

                                            //// Main loop ////
    for (;;)
    {
                                       //// LCD initialization ////
                           // Instruction 1
       RS = 0;                   // Send pin on the LCD.
       RW = 0;               // Send pin on the LCD.
       EN = 0;                   // Send pin on the LCD.
       D4 = 1;                   // Send pin on the LCD.
       D5 = 1;                   // Send pin on the LCD.
       D6 = 0;                   // Send pin on the LCD.
       D7 = 0;                   // Send pin on the LCD.
       _delay (15000);               // Wait atleast 15ms for the initialization to complete. Instruction clock = 4MHz / 4 = 1MHz, T = 1 / 1MHz = 0.000 000 1 S = 1uS.
 
                           // Instruction 2
       RS = 0;                   // Send pin on the LCD.
       RW = 0;               // Send pin on the LCD.
       EN = 0;                   // Send pin on the LCD.
       D4 = 1;                   // Send pin on the LCD.
       D5 = 1;                   // Send pin on the LCD.
       D6 = 0;                   // Send pin on the LCD.
       D7 = 0;                   // Send pin on the LCD.
       _delay (4100);               // Wait atleast 4.1mS for the initialization to complete. Instruction clock = 4MHz / 4 = 1MHz, T = 1 / 1MHz = 0.000 000 1 S = 1uS.

                           // Instruction 3
       RS = 0;                   // Send pin on the LCD.
       RW = 0;               // Send pin on the LCD.
       EN = 0;                   // Send pin on the LCD.
       D4 = 1;                   // Send pin on the LCD.
       D5 = 1;                   // Send pin on the LCD.
       D6 = 0;                   // Send pin on the LCD.
       D7 = 0;                   // Send pin on the LCD.
       _delay (100);               // Wait atleast 100uS for the initialization to complete. Instruction clock = 4MHz / 4 = 1MHz, T = 1 / 1MHz = 0.000 000 1 S = 1uS.
       
                           // Instruction 4
       RS = 0;                   // Send pin on the LCD.
       RW = 0;               // Send pin on the LCD.
       EN = 0;                   // Send pin on the LCD.
       D4 = 0;                   // Send pin on the LCD.
       D5 = 1;                   // Send pin on the LCD.
       D6 = 0;                   // Send pin on the LCD.
       D7 = 0;                   // Send pin on the LCD.
       _delay (4100);               // Wait atleast 4.1mS for the initialization to complete. Instruction clock = 4MHz / 4 = 1MHz, T = 1 / 1MHz = 0.000 000 1 S = 1uS.
       
                           // Instruction 5
       RS = 0;                   // Send pin on the LCD.
       RW = 0;               // Send pin on the LCD.
       EN = 0;                   // Send pin on the LCD.
       D4 = 0;                   // Send pin on the LCD.
       D5 = 1;                   // Send pin on the LCD.
       D6 = 0;                   // Send pin on the LCD.
       D7 = 0;                   // Send pin on the LCD.
       _delay (40);               // Wait atleast 4.1mS for the initialization to complete. Instruction clock = 4MHz / 4 = 1MHz, T = 1 / 1MHz = 0.000 000 1 S = 1uS.
       
                           // Instruction 6
       RS = 0;                   // Send pin on the LCD.
       RW = 0;               // Send pin on the LCD.
       EN = 0;                   // Send pin on the LCD.
       D4 = 0;                   // Send pin on the LCD.
       D5 = 0;                   // Send pin on the LCD.
       D6 = 0;                   // Send pin on the LCD.
       D7 = 0;                   // Send pin on the LCD.
       _delay (40);                      // Wait atleast 4.1mS for the initialization to complete. Instruction clock = 4MHz / 4 = 1MHz, T = 1 / 1MHz = 0.000 000 1 S = 1uS.
    
                           // Instruction 6 continued
       RS = 0;                   // Send pin on the LCD.
       RW = 0;               // Send pin on the LCD.
       EN = 0;                   // Send pin on the LCD.
       D4 = 0;                   // Send pin on the LCD.
       D5 = 1;                   // Send pin on the LCD.
       D6 = 0;                   // Send pin on the LCD.
       D7 = 1;                   // Send pin on the LCD.
       _delay (40);                     // Wait atleast 4.1mS for the initialization to complete. Instruction clock = 4MHz / 4 = 1MHz, T = 1 / 1MHz = 0.000 000 1 S = 1uS.    

                           // Instruction 7
       RS = 0;                   // Send pin on the LCD.
       RW = 0;               // Send pin on the LCD.
       EN = 0;                   // Send pin on the LCD.
       D4 = 0;                   // Send pin on the LCD.
       D5 = 0;                   // Send pin on the LCD.
       D6 = 0;                   // Send pin on the LCD.
       D7 = 0;                   // Send pin on the LCD.
       _delay (40);                      // Wait atleast 4.1mS for the initialization to complete. Instruction clock = 4MHz / 4 = 1MHz, T = 1 / 1MHz = 0.000 000 1 S = 1uS.
    
                           // Instruction 7 continued
       RS = 0;                   // Send pin on the LCD.
       RW = 0;               // Send pin on the LCD.
       EN = 0;                   // Send pin on the LCD.
       D4 = 1;                   // Send pin on the LCD.
       D5 = 0;                   // Send pin on the LCD.
       D6 = 0;                   // Send pin on the LCD.
       D7 = 0;                   // Send pin on the LCD.
       _delay (40);                     // Wait atleast 4.1mS for the initialization to complete. Instruction clock = 4MHz / 4 = 1MHz, T = 1 / 1MHz = 0.000 000 1 S = 1uS.    
     }
    }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

 
Answer:
@dan1138 solved the problem, his code can be easily studied and edited, he did the work of reading 100 datasheets for us. I cant upload the circuit for some reason check it from Dan's post. The answer is in post #57.

Here is the answer:
dan1138
I have quoted your post and cleaned it up.
ArakelTheDragon
I am not blaming Microchip for this device HD44780, just trying to motivate them to make better examples with XC8. I am also not blaming or insulting the people on the forum, but after so much discouraging, I just want a clear good example with explanations.

I am blaming those who have invented HD44780 (I know it's not Microchip), the search gives different data sheets, the first one is not the same as the second one, and they are all worthless, not that I didn't find a HD44780 data sheet. Google does not help, the documentation is badly structured, does not have good explanations and is for different HD44780 LCDs.

I did not mean to offend Microchip, I like them, but I am beginning to write as if I am neglected and discouraged. It can't be this hard. It took me less time to solve problems with BMW boot loader and ECU software. As for the examples they include this depreciated library #include "lcd.h", which I don't want to use. I just want the byte sequence, I manage to hit it once by mistake, but I can't repeat that.

EDIT:
For easier understanding please accept that PIN0 is RW, PIN1 is RS, PIN2 is Enable, PIN3 is DATA4, PIN4 is DATA5, PIN5 is DATA6, PIN6 is DATA7. The DATA0 to DATA3 pins are not used in 4bit mode.

All I need is this for the 4-bit mode(which is even harder to find examples and good documentation for), it does not matters if the circuit is parallel or serial with a shift register, at the end the pins receive the same:

1. Initialization
send 0x00
wait for pin RS to be high/low or just add delay of 2mS.
send 0x80
wait for pin RS to be high/low or just add delay of 2mS.
send 0x40
wait for pin RS to be high/low or just add delay of 2mS.

2. Command mode for clearing the display or moving the cursor
send 0x01
wait for pin RS to be high/low or just add delay of 2mS.
send 0x81
wait for pin RS to be high/low or just add delay of 2mS.
send 0x41
wait for pin RS to be high/low or just add delay of 2mS.

The command itself:
send 0x02
wait for pin RS to be high/low or just add delay of 2mS.
send 0x82
wait for pin RS to be high/low or just add delay of 2mS.
send 0x42
wait for pin RS to be high/low or just add delay of 2mS.

3. Data mode:
send 0x03
wait for pin RS to be high/low or just add delay of 2mS.
send 0x83
wait for pin RS to be high/low or just add delay of 2mS.
send 0x43
wait for pin RS to be high/low or just add delay of 2mS.

The data character itself
send 0x04
wait for pin RS to be high/low or just add delay of 2mS.
send 0x84
wait for pin RS to be high/low or just add delay of 2mS.
send 0x44
wait for pin RS to be high/low or just add delay of 2mS.

The formatting of your post blew up because the Java craplets that run this forum are insane. For reasons that seem unknowable sometimes the blank lines inside of code tags are duplicated.

The process described in your post does not perform the 4-bit mode initialization method as shown in the Hitachi HD44780 data sheet flowchart.

The initialization method I found to work reliably is:
/*
* - Set state on RS=0
* - Set state on E=0
* - Set state on data lines: D7=0,D6=0,D5=1,D4=1
* - Wait the maximum power on start time (100 milliseconds)
* - Set state on E=1
* - Wait 4 microseconds
* - Set state on E=0
* - Wait 40 microseconds
* - Set state on E=1
* - Wait 4 microseconds
* - Set state on E=0
* - Wait 40 microseconds
* - Set state on E=1
* - Wait 4 microseconds
* - Set state on E=0
* - Wait 40 microseconds
* - Set state on data lines: D7=0,D6=0,D5=1,D4=0
* - Set state on E=1
* - Wait 4 microseconds
* - Set state on E=0
* - Wait 40 microseconds
*/

Only the command to clear the screen will take longer that 40 microseconds to complete.
 
When a clear screen command is sent the wait should be 20 milliseconds.

I determined these wait time by finding and reading over 100 data sheets for LCD ASCII character display module based on the HD44780 controller chip set. Your search fu is weak if you give up after finding the first 20 or so lame data sheets.

This code implements that method:
/*
 * File:     main.c
 * Target:   PIC16F648A
 * Compiler: XC8 v2.20
 * IDE:      MPLABX v5.40
 *
 * Description:
 *
 *              PIC16F648A or PIC16F628A
 *             +----------:_:----------+
 *        <> 1 : RA2               RA1 : 18 <>
 *    SCL <> 2 : RA3               RA0 : 17 <>
 *    SDA <> 3 : RA4          OSC1/RA7 : 16 <> LCD_RS
 *    VPP -> 4 : RA5/VPP      OSC2/RA6 : 15 <> LCD_EN
 *    GND -> 5 : VSS               VDD : 14 <- 5v0
 *        <> 6 : RB0/INT       PGD/RB7 : 13 <> LCD_D7 PGD
 *        <> 7 : RB1/RX/DT     PGC/RB6 : 12 <> LCD_D6 PGC
 *        <> 8 : RB2/RX/CK         RB5 : 11 <> LCD_D5
 *        <> 9 : RB3/CCP       PGM/RB4 : 10 <> LCD_D4
 *             +-----------------------:
 *                      DIP-18
 */

#pragma config FOSC = INTOSCIO  // Oscillator Selection bits (INTOSC oscillator: I/O function on RA6/OSC2/CLKOUT pin, I/O function on RA7/OSC1/CLKIN)
#pragma config WDTE = OFF       // Watchdog Timer Enable bit (WDT disabled)
#pragma config PWRTE = OFF      // Power-up Timer Enable bit (PWRT disabled)
#pragma config MCLRE = ON       // RA5/MCLR/VPP Pin Function Select bit (RA5/MCLR/VPP pin function is MCLR)
#pragma config BOREN = OFF      // Brown-out Detect Enable bit (BOD disabled)
#pragma config LVP = OFF        // Low-Voltage Programming Enable bit (RB4/PGM pin has digital I/O function, HV on MCLR must be used for programming)
#pragma config CPD = OFF        // Data EE Memory Code Protection bit (Data memory code protection off)
#pragma config CP = OFF         // Flash Program Memory Code Protection bit (Code protection off)

#include <xc.h>

#define _XTAL_FREQ 4000000

#define LCD_PORT PORTB
#define LCD_RS PORTAbits.RA7
#define LCD_EN PORTAbits.RA6

#define SATIR           2           // line
#define SUTUN          16           // column
#define ciftsatir      40           // double line
#define teksatir       32           // one line
#define sagayaz         6           // write right
#define solayaz         4           // write left
#define imlecgizle     12           // hide cursor
#define birincisatir  128           // first line
#define sil             1           // LCD clear

void lcd_baslat(void);              // LCD start
void lcd_komut(unsigned char c);    // LCD_command
void lcd_sil(void);                 // LCD_clear
void lcd_veri(unsigned char c);     // LCD_data
void lcd_lcdyaz(const char *s);     // LCD_write

void lcd_byte_out(unsigned char c){
    LCD_EN = 0;
    PORTB  = c & 0xF0u;
    LCD_EN = 1;
    __delay_us(4);
    LCD_EN = 0;
    __delay_us(40);
    c = (unsigned char)((c>>4)|(c<<4));
    PORTB  = c & 0xF0u;
    LCD_EN = 1;
    __delay_us(4);
    LCD_EN = 0;
    __delay_us(40);
}
void lcd_baslat(void){
    LCD_EN = 0;
    LCD_RS = 0;
    __delay_ms(100);                // LCD güç açma süresini bekleyin
    
    lcd_byte_out(0x33);             // 4 bit moduna zorla
    lcd_byte_out(0x32);             

    lcd_komut(ciftsatir);
    lcd_komut(sagayaz);
    lcd_komut(imlecgizle);
    lcd_sil();
    lcd_komut(birincisatir);
}
void lcd_komut(unsigned char c){    // LCD_command
    LCD_RS = 0;
    lcd_byte_out(c);
}
void lcd_sil(void){                 // LCD clear
    LCD_RS = 0;
    lcd_byte_out(sil);
    __delay_ms(20);
}
void lcd_veri(unsigned char c){     // LCD data
    LCD_RS = 1;
    lcd_byte_out(c);
}
void lcd_lcdyaz(const char *s){     // LCD_write
    while(*s){
        lcd_veri(*s++);
    }
}
void main(){
    CMCON = 0x07;       // karşılaştırıcı analog girişlerini kapat
    TRISB = 0b00001111;
    TRISA = 0b00111111;
    lcd_baslat();
    while(1){
        lcd_lcdyaz("LCD Test 1.0"); // LCD_write
        __delay_ms(500);
        lcd_sil();                  // LCDclear
        __delay_ms(500);
    }
}

The code was tested using a circuit built from the attached diagram.
 
Notes about this circuit:
The CD4066 is required when using Microchip device programmers (PICKit2, PICKit3, ICD3, RealICE etc.) to program the PIC16F648A in circuit because the LCD module data lines interfere with ICSP.
 
Warning:
The PICKit4 has a nasty spike on the VPP line when using high voltage programming, this tends to destroy these old PIC16F class parts. There is a technical bulletin about this on the Microchip web site.


post edited by ArakelTheDragon - 2020/06/23 14:55:52
#1
1and0
Access is Denied
  • Total Posts : 10906
  • Reward points : 0
  • Joined: 2007/05/06 12:03:20
  • Location: Harry's Gray Matter
  • Status: offline
Re: LCD 16x2 with XC8 2020/04/09 08:19:30 (permalink)
+1 (1)
ArakelTheDragon
Good day! I am trying to use and LCD in 4 bit mode, I see 10 instructions only to initializa the display. Is this really so hard? Is there some good documentation for doing this, I tried searching but there is nothing good and the examples don't work.

#define RS PORTCbits.RC3
#define RW PORTCbits.RC4
#define EN PORTCbits.RC5
#define D4 PORTCbits.RC6
#define D5 PORTCbits.RC7
#define D6 PORTBbits.RB7
#define D7 PORTBbits.RB6


       RS = 0;                   // Send pin on the LCD.
       RW = 0;               // Send pin on the LCD.
       EN = 0;                   // Send pin on the LCD.
       D4 = 1;                   // Send pin on the LCD.
       D5 = 1;                   // Send pin on the LCD.
       D6 = 0;                   // Send pin on the LCD.
       D7 = 0;                   // Send pin on the LCD.


You should really consider connecting D4 to D7 with consecutive pins on the SAME port. Setting and clearing those ports bits will likely cause RMW issue.
#2
Jim Nickerson
User 452
  • Total Posts : 6685
  • Reward points : 0
  • Joined: 2003/11/07 12:35:10
  • Location: San Diego, CA
  • Status: online
Re: LCD 16x2 with XC8 2020/04/09 08:21:51 (permalink)
+1 (1)
What does the documentation for the LCD say ?
#3
1and0
Access is Denied
  • Total Posts : 10906
  • Reward points : 0
  • Joined: 2007/05/06 12:03:20
  • Location: Harry's Gray Matter
  • Status: offline
Re: LCD 16x2 with XC8 2020/04/09 08:57:05 (permalink)
0
Looking at your code again, you are not toggling the EN connection.
#4
Joel_C
New Member
  • Total Posts : 14
  • Reward points : 0
  • Joined: 2019/12/28 14:13:53
  • Location: 0
  • Status: online
Re: LCD 16x2 with XC8 2020/04/09 09:41:13 (permalink)
0
As 1and0 said,  it is necessary to toggle the EN pin to latch the data into the LCD.
The delays given on the data sheets are minimum. Especially when starting out it is a good idea to use longer delays than called out on the data sheets. I would recommend at least twice as long.
 
Joel
 
#5
ArakelTheDragon
Starting Member
  • Total Posts : 86
  • Reward points : 0
  • Joined: 2016/12/11 07:12:00
  • Location: 0
  • Status: offline
Re: LCD 16x2 with XC8 2020/04/09 12:24:42 (permalink)
0
When you say toggle the enable bit, is this:

Instruction
EN bit goes from 0 -> 1
wait mS
EN bit goes from 1 -> 0

or

Instruction
EN bit goes from 0 -> 1
wait mS
 
Instruction
EN bit geos from 1 -> 0
wait mS

I know its a stupid question, but when I am looking at so many details and descriptions and I begin to doubt every step and detail.
#6
Joel_C
New Member
  • Total Posts : 14
  • Reward points : 0
  • Joined: 2019/12/28 14:13:53
  • Location: 0
  • Status: online
Re: LCD 16x2 with XC8 2020/04/09 12:44:43 (permalink)
0
I have the EN normally low.  I take the EN high for 1 microsecond and then take it back low. I know that my times may be longer than what is shown in the data sheets, but I want to be sure that everything is stable.  Twice the minimum times on LCDs has worked flawlessly for me for many years. 
 
Joel
 
#7
du00000001
Just Some Member
  • Total Posts : 3787
  • Reward points : 0
  • Joined: 2016/05/03 13:52:42
  • Location: Germany
  • Status: offline
Re: LCD 16x2 with XC8 2020/04/09 13:12:44 (permalink)
0
ArakelTheDragon
When you say toggle the enable bit, is this:

 
Instruction
 
EN bit goes from 0 -> 1
 
wait mS
 
EN bit goes from 1 -> 0
 

or

 
Instruction
 
EN bit goes from 0 -> 1
 
wait mS
 
 
 
Instruction
 
EN bit geos from 1 -> 0
 
wait mS
 

I know its a stupid question, but when I am looking at so many details and descriptions and I begin to doubt every step and detail.



Golden rule: if you have to ask: both !
Rule #2: . . . but check: some functions result in some dead time following the EN H->L transition. During the dead time, no new data can be processed. If new data had been written, this will be lost if the dead time is not respected.

PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
#8
Joel_C
New Member
  • Total Posts : 14
  • Reward points : 0
  • Joined: 2019/12/28 14:13:53
  • Location: 0
  • Status: online
Re: LCD 16x2 with XC8 2020/04/09 13:24:53 (permalink)
0
The data is latched into the LCD on the falling edge of the EN signal.  The data that you are sending to the LCD can be put on the PIC output pins before or after raising the EN line, but a delay of several hundred nanoseconds should be used to allow things to stabilize before dropping the EN line.
 
Joel
 
#9
1and0
Access is Denied
  • Total Posts : 10906
  • Reward points : 0
  • Joined: 2007/05/06 12:03:20
  • Location: Harry's Gray Matter
  • Status: offline
Re: LCD 16x2 with XC8 2020/04/09 13:32:58 (permalink)
+1 (1)
Open a random LCD datasheet here. It specifies Enable Cycle Time of 1200 ns min and Enable Pulse Width of 140 ns min. ;)
 
#10
ArakelTheDragon
Starting Member
  • Total Posts : 86
  • Reward points : 0
  • Joined: 2016/12/11 07:12:00
  • Location: 0
  • Status: offline
Re: LCD 16x2 with XC8 2020/04/10 04:48:57 (permalink)
0
You'd be surprised how hard it is to find a 4bit datasheet.
 
I can't upload the file so I give a dropbox link.
https://www.dropbox.com/s....Instructions.pdf?dl=0
#11
Jim Nickerson
User 452
  • Total Posts : 6685
  • Reward points : 0
  • Joined: 2003/11/07 12:35:10
  • Location: San Diego, CA
  • Status: online
Re: LCD 16x2 with XC8 2020/04/10 06:51:46 (permalink)
0
whom did you buy the LCD from ?
#12
ArakelTheDragon
Starting Member
  • Total Posts : 86
  • Reward points : 0
  • Joined: 2016/12/11 07:12:00
  • Location: 0
  • Status: offline
Re: LCD 16x2 with XC8 2020/04/10 06:53:24 (permalink)
0
Local electronics shop. I tried it with a different compiler and it works. Therefore the problem must be in the code?
#13
Jim Nickerson
User 452
  • Total Posts : 6685
  • Reward points : 0
  • Joined: 2003/11/07 12:35:10
  • Location: San Diego, CA
  • Status: online
Re: LCD 16x2 with XC8 2020/04/10 06:56:11 (permalink)
0
the LCD came with no documentation ?
which compiler did work ?
#14
ArakelTheDragon
Starting Member
  • Total Posts : 86
  • Reward points : 0
  • Joined: 2016/12/11 07:12:00
  • Location: 0
  • Status: offline
Re: LCD 16x2 with XC8 2020/04/10 06:58:23 (permalink)
0
CCS PIC C v5.81.
 
The code of CCS for the LCD driver is copyrighted, so I can't post it here?
#15
Jim Nickerson
User 452
  • Total Posts : 6685
  • Reward points : 0
  • Joined: 2003/11/07 12:35:10
  • Location: San Diego, CA
  • Status: online
Re: LCD 16x2 with XC8 2020/04/10 07:02:17 (permalink)
+1 (1)
Maybe you could study the CCS code, learn what each line of code does and "port" it to xc8.
If you do not understand what a line of code does you must research it till you understand.
You will "learn" nothing if you copy some existing code.
#16
ArakelTheDragon
Starting Member
  • Total Posts : 86
  • Reward points : 0
  • Joined: 2016/12/11 07:12:00
  • Location: 0
  • Status: offline
Re: LCD 16x2 with XC8 2020/04/10 07:03:40 (permalink)
+1 (1)
The CCS code is made on their built-in fuctions. It will be too hard to study it.
 
EDIT: someone on the forum must have used an LCD in 4bit mode before. How did you do it?
post edited by ArakelTheDragon - 2020/04/10 07:10:26
#17
Jim Nickerson
User 452
  • Total Posts : 6685
  • Reward points : 0
  • Joined: 2003/11/07 12:35:10
  • Location: San Diego, CA
  • Status: online
Re: LCD 16x2 with XC8 2020/04/10 07:07:17 (permalink)
0
since CCS uses "built-in" functions and do not share the source code it is quite true there is nothing to study.
In the future I would suggest you buy items like the LCD that come with documentation on how to use them
#18
ArakelTheDragon
Starting Member
  • Total Posts : 86
  • Reward points : 0
  • Joined: 2016/12/11 07:12:00
  • Location: 0
  • Status: offline
Re: LCD 16x2 with XC8 2020/04/10 07:08:40 (permalink)
0
Please read the edit on my previous post.
#19
Jim Nickerson
User 452
  • Total Posts : 6685
  • Reward points : 0
  • Joined: 2003/11/07 12:35:10
  • Location: San Diego, CA
  • Status: online
Re: LCD 16x2 with XC8 2020/04/10 07:16:24 (permalink)
+1 (1)
when is your assignment due ?
#20
Page: 1234 > Showing page 1 of 4
Jump to:
© 2020 APG vNext Commercial Version 4.5