sequel strings

Tips, Tricks and methods for programming, learn ways of making your programming life easier, and share your knowledge with others.

Moderators: Benj, Mods

Post Reply
brandonb
Posts: 438
Joined: Mon Aug 29, 2011 12:26 am
Location: arizona
Has thanked: 175 times
Been thanked: 173 times
Contact:

sequel strings

Post by brandonb »

here's a video of operation of below flowchart (did convert switches to interrupts for video)
shows scrolling both directions, and count rollover smooth operation
http://youtu.be/DpyipAt3eOQ
a quick way of entering strings is to use a look up table, to do this here is the format
rom char* name of pointer =" ";
this means that you can have many strings in one table then can access them with a common number,
think of it as strings with in strings
to do this there are a couple things to do to access the string,
you have to point to the beginning of each sub string
and you have to have a way to terminate the string
then a way to either print it directly to the lcd by sending ascii chars or by converting it to a string variable,
when using string variable you have to write a 0 to the string[ ] position where the '.' was written as a null,
note instead of using a look up table you can also use a extra long string[256] variable to do the same thing,
when you write the string table after each sub string put in a special character, like i used a '.'
that is your string terminator,
i'll let you guys have a crack at it before i go into explaining a bunch and confuse everyone :lol:
here is the string table and how i get the pointer values for each position very easy
STRING POINTER CALCULATOR.fcf
(14.87 KiB) Downloaded 415 times
here is a flowchart that works on hardware with my mini44 board
matrix single string menu.fcf
(22.11 KiB) Downloaded 386 times
here is a cool little string positioning tool to center your string and vary the pot to move the string and get the cursor number to put in a lut
char lcd postitioner.fcf
(10.5 KiB) Downloaded 385 times

Kenrix2
Flowcode v5 User
Posts: 211
Joined: Tue Feb 19, 2013 9:51 pm
Has thanked: 72 times
Been thanked: 177 times
Contact:

Re: sequel strings

Post by Kenrix2 »

The use of the period to separate the names and using a slash for end of string is very cleaver idea.
Thank you for sharing that with us. What is a mini44, was that it in your video?

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Has thanked: 474 times
Been thanked: 458 times
Contact:

Re: sequel strings

Post by dazz »

Hi Kenrix
The mini44 is a very nifty board brandon has designed nice small and neat, heres a couple of pics, i'm sure brandon wont mind me showing them here, if you want more details send brandon a pm

Regards
Dazz
front board values.jpg
front board values.jpg (116.64 KiB) Viewed 4741 times
100_1342.JPG
100_1342.JPG (129.7 KiB) Viewed 4741 times
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php

Post Reply