LCD Marquee using flowcode

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 2 and 3.

Moderators: Benj, Mods

Post Reply
True
Posts: 7
Joined: Wed Mar 04, 2009 11:56 am

LCD Marquee using flowcode

Post by True »

Hey there everyone!

I have only been using flowcode for the past week and have never before used microcontrollers or any sort of programming language, so bare with me if my question is a little silly or obvious. :oops:

I have been designing a simple security system which allows a user to gain access to a locked door via entering a pin code into the keypad. The code works both in the flowcode simulation and on the actual hardware. I have design a simple menu system that allows the user to navigate various options such as changing the pin code etc. The problem is that I am finding the LCD screen size a little restricting. I am using a 16x2 LCD and the E-Blocks hardware with an ATMEGA32 chip. The text I wish to display on the LCD will not fit within it's limited character limit and I wish to overcome this problem.

My question is: 'Is there a way to scroll or marquee text on an LCD component?' If possible without using c code as I have no experience with it.

An example of text I would wish to display marqueed along the LCD is "Press '2' to change your pin". I know I could shorten this to something along the lines of "2. Change Pin", however I wish to make the system as straight forward and user-friendly as possible.

Thanks for listening!

Richard :D

User avatar
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:

Re: LCD Marquee using flowcode

Post by Benj »

Hello Richard

It is possible to scroll the displays however this will not work for simulation and can be a bit tricky to get right.

An easier approach would be to fill string variables with the complete text you wish to display. Then create a new string variable 16 characters long to represent the string that will be sent to the display and use the string manipulation functions to take a part of the original text to display on the screen.

I have included a simple example.
Attachments
LCDscroll.fcf
(5 KiB) Downloaded 1113 times

True
Posts: 7
Joined: Wed Mar 04, 2009 11:56 am

Re: LCD Marquee using flowcode

Post by True »

Thank for the quick response BenJ.

What you said sounds very promosing! It seems like it may be the answer I am looking for! However, I am having trouble opening the file you attatched. I am using Flowcode V3 for AVR. Every other file I have used so far ends in '.fcf_avr', could this be the problem? I tried changing the extention but flowcode showed an error.

'Unable to create microcontroller 16F88 as the definition file 16F88.FCD is missing or corrupt. [0x200]'

I am not sure what this means...if it's any help I am using an ATMEGA32 chip.

Sorry to be such a bother!

Richard

User avatar
Steve
Matrix Staff
Posts: 3433
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times

Re: LCD Marquee using flowcode

Post by Steve »

Use the "file..import" facility in Flowcode to load the file.

User avatar
Dan81
Valued Contributor
Valued Contributor
Posts: 268
Joined: Sun Jan 15, 2006 4:07 pm
Location: Albi France
Been thanked: 60 times
Contact:

Re: LCD Marquee using flowcode

Post by Dan81 »

hello Richard

LCD (HD44780) has lot of instructions.
For scrolling, you can use the Flowcode LCD macro "command" and specify the value of :

0x18 to the LEFT
0x1C to the RIGHT

(not available in the simulation)

BUT all the 2 (3 or 4) lines are scrolling at the same time.

You can also "play" with the cursor (visible , invisible, ...).

If you use a 16x2 LCD , you can write up to 40 characters on the same line.


Take a look at the flowchart, there are some instructions.


Danie
Attachments
scroll.fcf
(12.5 KiB) Downloaded 989 times

Post Reply