View previous topic :: View next topic |
Author |
Message |
PAPALUJA
Joined: 12 Feb 2012 Posts: 6 Location: SOUTH AFRICA
|
flex_lcd driver error |
Posted: Sun Feb 12, 2012 10:03 am |
|
|
I just found out about flex_lcd.c driver. The only problem is that it does not compile with success as lcd.c does. The compile result is error 128 "flex_lcd.c" line 28(1,43):A #DEVICE required before this line. I did not change the code so the lines are the same as the author's. If I try to use it in the main project as #include file, I don't get any display on the LCD. Please help out I need to submit the project asap for my electronic engineering studies. ![Confused](images/smiles/icon_confused.gif) _________________ C CCS FOREVER! |
|
![](templates/subSilver/images/spacer.gif) |
temtronic
Joined: 01 Jul 2010 Posts: 9174 Location: Greensville,Ontario
|
|
Posted: Sun Feb 12, 2012 10:13 am |
|
|
It.s best to show us your code as well as telling us your compiler version and PIC being used. |
|
![](templates/subSilver/images/spacer.gif) |
PAPALUJA
Joined: 12 Feb 2012 Posts: 6 Location: SOUTH AFRICA
|
flex_lcd driver error |
Posted: Sun Feb 12, 2012 12:18 pm |
|
|
hi temtronic
The code is a CCS C code that I simply picked to simulate the driver.I am acually using PIC C COMPILER from CCS
Here is the code:
/////////////////////////////////////////////////////////////////////////
//// EX_LCDKB.C ////
++++++++++++++++++++++++++
Code deleted.
Reason: Forum rule #10
10. Don't post the CCS example code or drivers.
http://www.ccsinfo.com/forum/viewtopic.php?t=26245
- Forum Moderator
++++++++++++++++++++++++++ _________________ C CCS FOREVER! |
|
![](templates/subSilver/images/spacer.gif) |
temtronic
Joined: 01 Jul 2010 Posts: 9174 Location: Greensville,Ontario
|
|
Posted: Sun Feb 12, 2012 12:22 pm |
|
|
First you CANNOT post CCS copyrighted code here !!!! It's against the forum rules AND everyone here has it, so there is no need to show it anyway.
2nd, you say 'simulate'. Does this mean you're NOT using real hardware ??? |
|
![](templates/subSilver/images/spacer.gif) |
PAPALUJA
Joined: 12 Feb 2012 Posts: 6 Location: SOUTH AFRICA
|
flex_lcd driver error |
Posted: Sun Feb 12, 2012 1:54 pm |
|
|
I'm sorry for violating forum rules as I've just joined the forum I REALLY dont know where the rules are at in the forum.
I firstly compiled flex_lcd.c driver with the result as shown on the post and then lcd.c driver with successful results. I then included the flex driver in the test code provided to test flex_lcd.c driver. The text was not displayed on lcd as I was using PROTEUS ELECTRONICS for simulation. The same was done with ldc.c driver and the text was displayed on the lcd. The same results are obtained even if I use hardware which is ACE CCS DEVELOPMENT KIT.
Once again I apologise for violating forum rules. I'll locate them and go through them thoroughly. _________________ C CCS FOREVER! |
|
![](templates/subSilver/images/spacer.gif) |
dyeatman
Joined: 06 Sep 2003 Posts: 1924 Location: Norman, OK
|
|
Posted: Sun Feb 12, 2012 2:08 pm |
|
|
The problem is NOT with flex_lcd, you are doing something incorrectly.
If you included the file in your main and it compiled, but you got
no display, you have an error of some kind (h/w or s/w).
First, tell us what version of CCS compiler you are using. The
version number will be in the form 3.xxx or 4.xxx and will be found
at the top of your .LST file.
Second, show us your main project that compiles with <flex_lcd.c>
included.
BTW, forum rules are at the top of the Discussion forum listing. _________________ Google and Forum Search are some of your best tools!!!! |
|
![](templates/subSilver/images/spacer.gif) |
PAPALUJA
Joined: 12 Feb 2012 Posts: 6 Location: SOUTH AFRICA
|
flex_lcd.c driver error |
Posted: Sun Feb 12, 2012 2:23 pm |
|
|
I am using CCS PCM C Compiler, Version 4.104 _________________ C CCS FOREVER! |
|
![](templates/subSilver/images/spacer.gif) |
PAPALUJA
Joined: 12 Feb 2012 Posts: 6 Location: SOUTH AFRICA
|
flex_lcd driver error |
Posted: Sun Feb 12, 2012 2:59 pm |
|
|
wow!!!! I figured out the problem. I wrote #include <pic 16f877a.h> in the flex driver file by mistake. Maybe I thought I was writing on my main code. What a nice driver. It's so simple and straight forward. Thanx guys a lot. Can anyone tell me why the keypad does not change the lcd text for for ex22.c CCS example? Is the problem with the kbd.c driver or what? _________________ C CCS FOREVER! |
|
![](templates/subSilver/images/spacer.gif) |
|