4x40 LCD Blinking Cursor CVAVR

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Anyone,

I need to have a blinking cursor on my 4x40 LCD and I need to
manually set the blink and cursor display bits on the corresponding
lcd controller control register.

I am using the Codevison low level Libraray functions in my main to do this:
#include // is at the top of the source (not in main)

LCD is aready initialized earlier

then

// top 2x40
_en1_msk=LCD_EN1;
_lcd_ready();
_lcd_write_data(0x0F);

// bottom 2x40
_en1_msk=LCD_EN2;
_lcd_ready();
_lcd_write_data(0x0F);

& I decide based off of desired cursor postion which one of the
display halves has the cursor and blink turned on.

The problem is
"undefined symbol _en1_msk" when I compile...

Any Ideas?

Erick

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello

try declaring the global variable:

extern unsigned char _en1_msk;

Regards,

Pavel Haiduc
HP InfoTech
www.hpinfotech.ro

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks Pavel,

That fixes the error but allows another one:
The compiler complains LCD_EN1 & LCD_EN2 are now undefined symbols. I can just redefine them in this file but why doesn't the #define for these symbols in the library cover this? Is it that the library is considered a different file so the #define is only valid it that? If so could you possibly move those #defines into the lcd*.h files so when I #include them in my source I have access to your definitions without having to redefine them myself?

Thanks again,

Erick

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

>If so could you possibly move those #defines into the lcd*.h files so >when I #include them in my source I have access to your definitions >without having to redefine them myself?

Yes, of course.

Pavel

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks Pavel!

Thats the great support we all know and love!

Erick

--
Erick L. Oberstar

Mechatronics Lab Manager
University of Wisconsin - Madison
1513 University Ave.
Madison, WI 53706

http://mechatronics.me.wisc.edu
ph: 608-262-6446
fax: 608-265-2316