Problems with an initial start on an LCD library using MPLAB xc8...

Status
Not open for further replies.

si2030

Member
Hi there

I am in the process of building an LCD library that I can use in other projects. The idea is to have most variables in a header file and all the functions in a C file. the problem is, it will not compile even when I strip out most of the functions. I don't understand why and I think it might have something to do with the #includes at the start of each file.

I am in the habit of over documenting my files as I do not program regularly enough to remember why I have done what I have done when I revisit the code in one or more years time.

All I have is an LCD initialisation function and it refuses to compile.

I have included all three files (the third is a test file once it has enough functions written to run it)

I am hoping someone might have a look and see (hopefully a rookie mistake) and let me know.

Kind Regards

Simon
 

Attachments

  • LCD_Header.h
    5.4 KB · Views: 277
  • LCD_Functions.c
    8.5 KB · Views: 249
  • LCD_TEST.c
    246 bytes · Views: 229
It won't compile as you haven't finished the library..

You are using LCD Busy() and LCDCommand() and others, but you haven't written them!!!

Also to use __delay_ms() you need to define the crystal frequency.... # define _XTAL_FREQ '[frequency]'
 
"Also to use __delay_ms() you need to define the crystal frequency.... # define _XTAL_FREQ '[frequency]'"

What compiler error does this give Ian? If you don't use the #define
 
It will complain that __delay_ms() and __delay_us() are not defined...
 
i think we have one answer why LG's code isn't working ,
he has the #include but osc frequency defined. if i keep him off the laptop for the day, then i can look smart for 24 hours
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…