James, You are correct. Remember I ported this code from a 16f84a and the=20 ports are different. Also the names of the ports and the bits are in a=20 different format. I had to get the character and string routines working=20 before I could go forward. Now it is just a matter of fixing things like=20 the busy flag testing routine, timing issues, and other things. I really=20 appreciate all of the help and I am open to suggestions. Thanks, rich! On 10/23/2015 5:24 AM, James Cameron wrote: > Summary: in read_busy_flag you are switching the wrong TRIS > > That you removed the call to LCD_set_position and it worked suggests > something that function does is wrong. > > Looking at that function, I'm puzzled by the first two lines; > > extern void LCD_set_position(unsigned char position) { > unsigned int data; > LCD_data =3D data; > > It doesn't seem necessary to write the uninitialised variable to the > register. But it is probably harmless. > > Last thing in the function is to call read_busy_flag, a misnamed > function because it does more than read, it loops until DB7 is > true. > > Now since all bits in TRISD are cleared, and never set, the read of > RD7 will fetch the output register bit only, which if it is LOW will > loop at that point forever, but if it is HIGH will return from > read_busy_flag prematurely, before the LCD has finished what you asked > it to do. > > Perhaps you intended to modify TRISD instead of TRISA twice in > read_busy_flag? > > On Fri, Oct 23, 2015 at 04:47:20AM -0500, Richard R. Pope wrote: >> David and et al, >> Success, success!! I commented out the cursor position line and I >> just left the print character 'a' line. I have an a on the LCD. I really >> appreciate all of the help everybody. >> Thanks a bunch, >> rich! >> >> On 10/23/2015 4:02 AM, David Duffy (AVD) wrote: >>> Also add this line at the top of the main function: ADCON1 =3D 0x0F; >>> >>> This will disable the analog inputs. The data sheet says analog won't >>> override a pin set as output, but I'd add that line to make sure. >>> David... >>> >>> On 23/10/2015 6:48 PM, Richard R. Pope wrote: >>>> Alan, >>>> I probably have but I can't find it. This PIC is a lot more >>>> complicated than a 16f84a. So I have turned to you folks for help and >>>> guidance. I have poured through the datasheets and the code over and >>>> over. I suspect that when we find it it will be one of those ah, how d= id >>>> I ever miss that? >>>> Thanks, >>>> rich! >>>> >>>> On 10/23/2015 3:38 AM, alan.b.pearce@stfc.ac.uk wrote: >>>>> I haven't the time to look through your code, but I am wondering if y= ou have messed up the RA port initialisation so that the rs pin is open col= lector without a pullup. >>>>> >>>>> --=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 .