blackflowers wrote on Friday, July 15, 2011:
hi there!, I’m trying to run an lcd with a pic24hj and freertos. I’m using the sourcecode
provided with the freertos project for pic24h.I have the harware connected (let’s suppose everything is right, since i have checked out several times)
But it doesn’t work, besides it’s very difficult to debug a project with an lcd.
The “main” code it’s here, i don’t know wether i’m doing it wright or not.
**int main( void )
{
/* Configure any hardware required for this demo. */
prvSetupHardware();
/* Start the task that will control the LCD. This returns the handle
to the queue used to write text out to the task. */
xLCDQueue = xStartLCDTask();
//xQueueSend( xLCDQueue, “hola”, portMAX_DELAY );
/* Finally start the scheduler. */
vTaskStartScheduler();
/* Will only reach here if there is insufficient heap available to start
the scheduler. */
return 0;
}**
I commented the xQueueSend line since the very first task it need to do is to init the lcd and it seems that it’s not doing it at all, so i don’t even
try to send data to the lcd.
Apart from this, i have three questions:
1- xLCDQueue = xStartLCDTask(); Is this function supposed to init the lcd?
2- Which of those functions do i use for writting to the lcd; **xQueueSend( xLCDQueue, “hola”, portMAX_DELAY ); **or prvLCDPutString( “www.FreeRTOS.org” );
3- Which is the clock source for the freertos? is it the internal rc oscilator?
thanks i wish i could at least check if there are any mistake, thanks!!