Blinking LCD Cursor
Blinking LCD Cursor
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
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
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- mytekcontrols
- Posts: 95
- Joined: Sun Aug 19, 2007 6:38 pm
- Location: Santa Rosa, California
- Has thanked: 4 times
- Been thanked: 7 times
- Contact:
Should Blinking cursor show up in Simulation?
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.To display the cursor and allow it to flash use a component macro to send the command 0x0F.
I am running Flowcode V3.21 Demo.
Michael St. Pierre
FlowCode V3&V4 Pro Registered User
Manufacture: Heat Load Controllers,
and a variety of other widgets.
FlowCode V3&V4 Pro Registered User
Manufacture: Heat Load Controllers,
and a variety of other widgets.
- mytekcontrols
- Posts: 95
- Joined: Sun Aug 19, 2007 6:38 pm
- Location: Santa Rosa, California
- Has thanked: 4 times
- Been thanked: 7 times
- Contact:
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
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
Michael St. Pierre
FlowCode V3&V4 Pro Registered User
Manufacture: Heat Load Controllers,
and a variety of other widgets.
FlowCode V3&V4 Pro Registered User
Manufacture: Heat Load Controllers,
and a variety of other widgets.
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- mytekcontrols
- Posts: 95
- Joined: Sun Aug 19, 2007 6:38 pm
- Location: Santa Rosa, California
- Has thanked: 4 times
- Been thanked: 7 times
- Contact:
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
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
Michael St. Pierre
FlowCode V3&V4 Pro Registered User
Manufacture: Heat Load Controllers,
and a variety of other widgets.
FlowCode V3&V4 Pro Registered User
Manufacture: Heat Load Controllers,
and a variety of other widgets.
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- mytekcontrols
- Posts: 95
- Joined: Sun Aug 19, 2007 6:38 pm
- Location: Santa Rosa, California
- Has thanked: 4 times
- Been thanked: 7 times
- Contact:
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.
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.
Michael St. Pierre
FlowCode V3&V4 Pro Registered User
Manufacture: Heat Load Controllers,
and a variety of other widgets.
FlowCode V3&V4 Pro Registered User
Manufacture: Heat Load Controllers,
and a variety of other widgets.
Cursor blinking alright!!!
Greetings,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.
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(
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!
Panos Labrakis
Greece
Greece
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel