9 years, 8 months ago.

p20 definition error on k64f

There are two lines for _ps and _cs that have a hard coded pin of p20 that don't compile for me. Any suggestions?

Question relating to:

Updated for more display types. Fixed memoryaddress confusion in address() method. Added new getAddress() method. Added support for UDCs, Backlight control and other features such as control through I2C and … HD44780, LCD, PCF2116, ST7032, ST7036, text, TextLCD, WS0010

1 Answer

9 years, 8 months ago.

Josh, not sure that I understand your problem. Are you referring to the example code for the bus interface to the LCD?

TextLCD lcd(p15, p16, p17, p18, p19, p20); 

This example is for the LPC1768. You should modify the pinnames to the pin definitions that are used by the k64f like PTC3 or D7 etc. I dont have the k64 so cant test on that platform.

Accepted Answer

No, it is in the lib file. I have my test code with K64 valid pin names. in TextLCD.cpp, lines 1854 and 2210 have pin names hard coded for the LPC1768 platform. So, on the K64 it throws an error.

I changed the pin names on these two lines to K64 valid pins that I don't plan on using and it compiles fine. I'm thinking that these lines are for testing purposes but I haven't dug into it much to verify.

My LCD should arrive tomorrow or Monday so I can finish testing.

posted by Josh Smith 28 Aug 2014

Ahh, I get it. Sorry about that. This was a leftover from some testing. I removed the error from the lib and published a fixed version. This new version also has some new features. I was holding off with an update until I had finished some more work, but this fix was more important. Please, update the lib in your project by right-clicking on it.

posted by Wim Huiskamp 28 Aug 2014

Awesome! Thank you!

Cheers.

posted by Josh Smith 28 Aug 2014