FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [January 2015 Threads]
Hi,
I'm having issues where my HD44780 LCD screen is displaying garbage. Every now and then after reset part of my message will show up with garbled junk in it, otherwise it's always junk. Has anyone done this with FreeRTOS/does anyone know how to do this in a way that will work? I believe it is a timing issue. I'm using vTaskDelay to control the timing for the pulses on the control lines. My understanding is that the HD44780 operates on a clock-locked signal so as I understand it the extra delays introduced by vTaskDelay/the kernel shouldn't impact it functioning. Please correct me if I'm wrong. I figure someone will know something about this since this is a very common display controller.
Here's the datasheet: https://www.sparkfun.com/datasheets/LCD/HD44780.pdf
Hi Pugglewuggle,
Has anyone done this with FreeRTOS
Yes I wrote drivers for many different LCD displays, mostly 'under' FreeRTOS, sometimes Linux.
Using vTaskDelay(): for the timing it is economical, but depending on your configTICK_RATE_HZ
, the delays will be veeery long.
Your display has an Enable Cycle Time (tcycE) of 1 us. I would first replace vTaskDelay() with delay(), a function that spins for a number of ns.
Try to mimic the timings from the manual, plus a little to make sure you're not too fast.
Once you have it working with delay(), you might want to find less blocking ways to control the LCD.
The lines between MCU and LCD, are they being shared with other devices? With SDRAM or flash? Are you driving those lines like GPIO pins, or as a databus?
Can you read the LCD status correctly? Does your code always wait for DB7 to go low before any instruction ? Do you see it becoming high right after sending an instruction if you poll it continuously?
Getting the display into the correct mode (4- or 8-bits) is tricky: make sure you follow the protocol exactly as described in the manual. If possible, start this operation with a hard display reset.
Good luck.
I have some drivers for this display in the microchip pic24 section on the
freertos website that work...
this will give you a good starting point...
http://www.freertos.org/InteractiveFrames/OpenFrames.html?http://interactive.freertos.org/forums
On Tue, Jan 6, 2015 at 9:03 AM, Hein Tibosch heinbali01@users.sf.net
wrote:
Hi Pugglewuggle,
Has anyone done this with FreeRTOS
Yes I wrote drivers for many different LCD displays, mostly 'under'
FreeRTOS, sometimes Linux.
Using vTaskDelay(): for the timing it is economical, but depending on your
configTICKRATEHZ, the delays will be veeery long.
Your display has an Enable Cycle Time (tcycE) of 1 us. I would first
replace vTaskDelay() with delay(), a function that spins for a number of ns.
Try to mimic the timings from the manual, plus a little to make sure
you're not too fast.
Once you have it working with delay(), you might want to find less
blocking ways to control the LCD.
The lines between MCU and LCD, are they being shared with other devices?
With SDRAM or flash? Are you driving those lines like GPIO pins, or as a
databus?
Can you read the LCD status correctly? Does your code always wait for DB7
to go low before any instruction ? Do you see it becoming high right
after sending an instruction if you poll it continuously?
Getting the display into the correct mode (4- or 8-bits) is tricky: make
sure you follow the protocol exactly as described in the manual. If
possible, start this operation with a hard display reset.
Good luck.
FreeRTOS HD44780 LCD driver
Sent from sourceforge.net because you indicated interest in
https://sourceforge.net/p/freertos/discussion/382005/
To unsubscribe from further messages, please visit
https://sourceforge.net/auth/subscriptions/
~~ _/) ~~~~ _/) ~~~~ _/) ~~~~ _/) ~~
Tom Lafleur
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.