Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[ARM] How to create a simple menu on FreRTOS ?

Status
Not open for further replies.

bianchi77

Advanced Member level 4
Advanced Member level 4
Joined
Jun 11, 2009
Messages
1,313
Helped
21
Reputation
44
Reaction score
20
Trophy points
1,318
Location
California
Visit site
Activity points
9,442
Guys,

Does anyone of you have experience on creating a simple menu on FreeRTOS ?
I want display a menu on 20x4 LCD,

Thanks
 

Been there, done that, what did you want to know?

I used one thread for the LCD control, blocking on a queue so I could send lcd commands from the rest of the system without blocking while the lcd updated.
I used a second thread to run a 10ms keyboard read routine which did typematic rate and put the keypresses into a keyboard queue, the state machine for this is not hard.
Finally the menu thread blocked on the keyboard and did the usual state machine thing to parse the input and update the displays and system state as appropriate.

Nothing to it really, once you have the LCD and keyboard routines working correctly.

Regard, Dan.
 

I have LCD routine ready to go, but the keypad still on the way, how can I make them working on the task ?
I haven't made a lot of task inside it because I want to know how to relate between keypad (button) and LCD,

for example I have,

Menu A <<
Menu B
Menu C

and MCU waiting for the user for pushing the button selecting which Menu he wants,
Up and down button will scroll "<<" up and down and another button for selecting the menu.....any ideas ?
I have a task like this on freeRTOS

Code:
int main(void)
{
  prvSetupHardware();
  xTaskCreate( vLCDTask , ( signed char * ) NULL , LCD_TASK_STACK_SIZE , NULL , LCD_TASK_PRIORITY , NULL );

  /* Start the scheduler. */
  vTaskStartScheduler();	

  return 0;
}

for
Code:
#define LCD_TASK_STACK_SIZE			( configMINIMAL_STACK_SIZE )
#define LCD_TASK_PRIORITY			( tskIDLE_PRIORITY + 1 )
if I put +2, is it higher priority or lower ?

Thanks
 

I have created :

Code:
#define LCD_TASK_STACK_SIZE			( configMINIMAL_STACK_SIZE )
#define LCD_TASK_PRIORITY			( tskIDLE_PRIORITY + 1 )

#define LCD_RTC_TASK_STACK_SIZE			( configMINIMAL_STACK_SIZE )
#define LCD_RTC_TASK_PRIORITY			( tskIDLE_PRIORITY +0 )


 xTaskCreate( vLCDTask , ( signed char * ) NULL , LCD_TASK_STACK_SIZE , NULL , LCD_TASK_PRIORITY , NULL );
 xTaskCreate( vRTC_LCDTask , ( signed char * ) NULL , LCD_RTC_TASK_STACK_SIZE , NULL , LCD_RTC_TASK_PRIORITY , NULL );
but it's stopping on vRTC_LCDTask....any ideas, is it because of the priority ?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top