Page 1 of 1
Blinking LCD Cursor
Posted: Mon Feb 26, 2007 2:34 am
by MW
Hi,
First of all let me say that Flowcode is a sensational product.
I am building an application which allows the user, after selecting the appropriate option, to enter data via a keypad. More specifically, when the 'enter data' button is pushed the LCD screen displays "Enter Number:" on the top line after which the actual numbers are displayed as they are typed on the bottom line. Then, when the 'enter data' button is pushed again the numbers are stored in EEPROM. Strangley enough this all works.
I then thought I would make the cursor on the bottom line blink while in data entry mode(only), but I cant get this to work. I had a look at the LCD data sheet and tried a few commands with the send command Macro but this did nothing. I am now starting to think that I have to reinitialise the LCD with the ASM or C code edited but I dont have a clue what or where these edits should be.
Any advice would be most welcome.
Cheers
Posted: Mon Feb 26, 2007 10:26 am
by Benj
Hello MW
To display the cursor and allow it to flash use a component macro to send the command 0x0F. Make sure you send it after the initialisation component macro and it should work fine.
Posted: Wed Feb 28, 2007 9:57 am
by MW
Thanks for the prompt response Ben. I haven't had a chance to run this yet but I will let you know how I get on when I do.
Posted: Tue Mar 27, 2007 11:51 am
by MW
Ben
This worked a treat.
Thanks
MW
Should Blinking cursor show up in Simulation?
Posted: Sun Aug 19, 2007 6:49 pm
by mytekcontrols
To display the cursor and allow it to flash use a component macro to send the command 0x0F.
I entered this as instructed, but the simulated LCD cursor does not blink. Haven't tried it on real hardware yet. Just curious before I do, if this and other such commands are simulated.
I am running Flowcode V3.21 Demo.
Posted: Wed Aug 22, 2007 12:40 am
by mytekcontrols
I'll answer my own question for the benefit of others.
The LCD simulation (at least in the latest V3 demo) does not reflect the blinking cursor. However it does blink when run on real hardware.
I did notice something interesting though. Just setting the cursor to blink without also using a cursor position macro either before, or after the blink command is sent, will result in no cursor appearing.
Just a few more tests, and verifications that this will work for what I want to do, and I'll be sending in my order for FlowCode V3 Pro. What I see so far looks very nice indeed

Posted: Wed Aug 22, 2007 11:14 am
by Benj
Hello
Thanks for the info. We will be making improvements to Flowcode so it is good that the people who use it are the people who are driving the improvements.
As for other LCD commands. There are a few more besides the flashing cursor command. These include:
Shift Display Left
Shift Display Right
Add Custom Characters
Auto Increment Off
Etc...
For a full list please refer to the datasheet for the Alphanumeric Display.
Posted: Wed Aug 22, 2007 5:38 pm
by mytekcontrols
Hi Ben,
I just discovered why I wasn't initially seeing the blinking cursor on the actual hardware LCD display.
Previous to setting the cursor to blink, I had printed a message on Line 1 of the display which used exactly 16 characters (the width of the display). So apparently what happened was that the screen X position pointer was set for the 17th character position on the first line. This meant that the cursor was actually outside of the viewable area. That is why repositioning it back to a viewable area either before or after setting it to blink, made it visible. I forgot this simple rule about LCD's... that being the fact that it is quite possible to write beyond the viewable area of the display (comes in handy for the Shift Display Left and Right commands you mentioned).
Although it would be great to have all the commands work under simulation the same as they would on the hardware, I think the most important would be the commands that actually influence character position. Cursor blinking, visible, or non-visible commands would seem very low on this priority list.
By the way... I'm really loving FlowCode, and fully intend to go PRO (early next month when I get my next check). I have plans to use it for a new version of an existing product I sell, which had the first version completely written in PIC 8051 style Assembly. This will be a complete re-write, but one that I feel is worthwhile, since changes in the original assembly are very painful. I've already written most all the FlowCode macros to mimic the SetPoint entry part of the program I require, including error checking and error message displays. Thus far it simulates beautifully. And hey, I just got started using FlowCode last weekend

Posted: Thu Aug 23, 2007 10:44 am
by Benj
Hello
Thats fantastic news glad your enjoying the product. I know what you mean about assembler it can be like banging your head against a brick wall sometimes. We are constantly looking for ways to improve Flowcode and your suggestions for the LCD component have been noted. However we have hundreds of improvements that we wish to make so it may be a while before we get around to it.
Posted: Thu Aug 30, 2007 6:00 pm
by mytekcontrols
Quick Update on using visible and/or blinking cursor on LCD hardware...
During display updates, the cursor visibility should be disabled (make it invisible). This can be done by using the LCD Component Macro to send a 0x0C command.
After the display update is completed, and the cursor has been re-positioned to where you want it, then it is OK to once again re-enable cursor visibility and/or blinking.
The reason behind this, is that writing data to the LCD hardware while the cursor remains visible, will produce a faint trace of the cursor moving on the display. If all you are doing is adding a character at the immediate cursor position, then this is not going to be seen. However if you are moving to other display positions, writing new data, and then sending the cursor back to it's previous display position, you will see a noticeable trace of the cursor flying across the display as it moves between each new position.
Cursor blinking alright!!!
Posted: Sun Nov 25, 2007 3:11 am
by Panourias
Benj wrote:Hello MW
To display the cursor and allow it to flash use a component macro to send the command 0x0F. Make sure you send it after the initialisation component macro and it should work fine.
Greetings,
Recently i wanted to do a similar thing as MW.Sadly i wasn't able to send a command to the LCD to make the cursor blink.I knew that it was needed a command like 11110000 in binary for the LCD to get the command but that didn't work.I even tried to enter the Decimal number '240' to the command parameters box(

).I couldn't get help from Flowcode's Help.
So after a little search in the Forum,here i am.I already test this command and it works!Finally the cursor blinks!!!
But the issue is:
All the needed commands for the LCD should be put in Hexadecimal number?
It would be great to have more options on the LCD,like blinking,shifting,etc.
So if someone needs an extra function for the LCD,it should convert the binary number(into Hexadecimal) found in the LCD's datasheet and then enter it in the command parameter box,right?
And one last question...
A part from the FlowCourse is there any book(or something like that) available with more extensive details about FlowCode, commands,variables,explanations,etc?
Thanks!
Posted: Mon Nov 26, 2007 2:55 pm
by Benj
Hello
Yes to use the commands stated in the LCD datasheet you simply have to use the command number. This can be input in Binary, hex or decimal. You may have to refer to the help file for how to use binary numbers.
Do you have further questions about FLowcode. You can always ask in the Forums. I think there is a book due to be coming out soon but currently it is unavailable.