Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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: 276
  • LCD_Functions.c
    8.5 KB · Views: 248
  • LCD_TEST.c
    246 bytes · Views: 228
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
 
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 :D
 
Status
Not open for further replies.

Latest threads

Back
Top