CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Menu/UI

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
aodj



Joined: 20 Dec 2006
Posts: 40
Location: Reading, UK

View user's profile Send private message

Menu/UI
PostPosted: Wed Jul 04, 2007 1:59 am     Reply with quote

I have a display comprised of a 3 character, 7 segment display. The UI i'm building into the product at the moment is based around a switch/case statement, where, by pressing a button, a value increments/decrements and so increases the value of the variable in the switch statement.

Is this the best way to craft a menu system, or does anyone else know of anything that has a smaller ROM footprint?
inservi



Joined: 13 May 2007
Posts: 128

View user's profile Send private message

PostPosted: Tue Jul 10, 2007 2:57 am     Reply with quote

Hello,

I'm sorry to reply so later but i'm back from 1 week holiday.
You can make a very simple UI with 3 buttons and a display.
I often use this UI for applications. I use a loop in main procedure with a switch for 'modal' programing structure. That work well and it is easy to debug.

dro.
_________________
in médio virtus
aodj



Joined: 20 Dec 2006
Posts: 40
Location: Reading, UK

View user's profile Send private message

PostPosted: Wed Jul 11, 2007 1:38 am     Reply with quote

I don't understand what you mean by modal. The hardware for this menu I understand, it's simply the software that I'm having some concerns about, since my switch statement becomes quite elaborate, with each logical test.

Hence why I am wondering if anything else is more efficient.
future



Joined: 14 May 2004
Posts: 330

View user's profile Send private message

PostPosted: Wed Jul 11, 2007 7:04 am     Reply with quote

Take a look at
http://www.booyaka.com/~tymm/avr/tinymenu.tgz
aodj



Joined: 20 Dec 2006
Posts: 40
Location: Reading, UK

View user's profile Send private message

PostPosted: Wed Jul 11, 2007 7:59 am     Reply with quote

That code appears to be written to make use of an LCD.
future



Joined: 14 May 2004
Posts: 330

View user's profile Send private message

PostPosted: Wed Jul 11, 2007 5:40 pm     Reply with quote

The way it does the output does not matter. Modify the lcd calls to your own display library.

Can you show strings on your display already?

If you are looking for a program that match exactly your needs I think you will wait forever.
aodj



Joined: 20 Dec 2006
Posts: 40
Location: Reading, UK

View user's profile Send private message

PostPosted: Thu Jul 12, 2007 7:06 am     Reply with quote

Ok, let me explain.

As I said in my opening post, I have a 3 digit, 7 segment display. Now, I can display any number of characters to it, and have a working menu system that makes use of four push to make buttons, bound as "Next Menu", "Root Menu", "Increment" and "Decrement". I can pass both numbers and text to the display, and have 4 LED's additionally to display supplementary information on the status of 2 timers and 2 relays.

With me so far?

The menu system I have, is based around a switch examining a variable called vMenu, which, when "Next Menu" is pressed, increments, thus accessing the next entry in the switch and siplaying the corresponding menu.

This is reasonably ROM intensive, and I was wondering if anyone knew of a method which would reduce the amount of ROM that is being used.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group