David and et al, Well if I did this correctly I have now managed to setup the USB=20 clock for high speed operation and the PIC is running at 4 MHz. It was=20 running at 1 MHz. And the LCD still initializes correctly. Thanks, rich! On 10/22/2015 8:47 PM, David Duffy (AVD) wrote: > Shouldn't those defines be: > > #define LCD_rs LATAbits.RA0 //Pin 2 LCD pin 4 > #define LCD_rw LATAbits.RA1 //Pin 3 LCD pin 5 > #define LCD_e LATAbits.RA2 //Pin 4 LCD pin 6 > > David... > > On 23/10/2015 11:32 AM, Richard R. Pope wrote: >> David, >> Sure. Here is the cmd and the data routines: >> extern void LCD_Send_cmd(unsigned char va= lue) >> { >> LCD_data =3D value; >> LCD_rs =3D 0; >> LCD_rw =3D 0; >> LCD_e =3D 1; >> wait_ms(30); >> LCD_e =3D 0; >> } >> >> extern void LCD_Send_data(unsigned char va= lue) >> { >> LCD_data =3D value; >> LCD_rs =3D 1; >> LCD_rw =3D 0; >> LCD_e =3D 1; >> wait_ms(30); >> LCD_e =3D 0; >> } >> You call them for sending either cmds or data to the LCD. The >> initialize routine uses the cmd routine. Feel free to ask whatever >> questions you think are necessary. I appreciate the help! >> Thanks, >> rich! >> >> On 10/22/2015 8:18 PM, David Duffy (AVD) wrote: >>> Can you give me a few lines of how you're using them in the code? >>> >>> On 23/10/2015 11:01 AM, Richard R. Pope wrote: >>>> David, >>>> Here are the pins used. >>>> #define LCD_rs RA0 //Pin 2 LCD = pin 4 >>>> #define LCD_rw RA1 //Pin 3 LCD p= in 5 >>>> #define LCD_e RA2 //Pin 4 LCD = pin 6 >>>> #define LCD_data LATAD 19-22 and pins 27-30 >>>> Notice that LATAD works with the LCD_data definition! I don't= get it. >>>> Thanks, >>>> rich! >>>> >>>> On 10/22/2015 7:45 PM, David Duffy (AVD) wrote: >>>>> Ah.... I hadn't been playing along. :) >>>>> >>>>> So, what actual port pin is RS on ? >>>>> David... >>>>> >>>>> On 23/10/2015 10:08 AM, Richard R. Pope wrote: >>>>>> David, >>>>>> Let's try this again. I decided to use a 18f4550 instead = of the >>>>>> 16f877a. Sorry about that. The PIC and LCD initialize but I can't ge= t >>>>>> the LCD to accept and display any data such as a or b or hello there= and >>>>>> so forth. I have been discussing the 4550 all along and you were und= er >>>>>> the impression that I was using a 877. My fault. >>>>>> > --=20 Richard R. Pope President Reedsburg Area Model Railroad Club, RAMRC 1230 19th Street #5 Reedsburg, WI 53959 608-768-7448 mechanic_2@charter.net --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .