Search This Blog

Sunday, December 07, 2008

RTOS Course, It was more than amazing

Peace be upon you

How are you guys? I have been busy for while in many things, I have just finished RTOS course, let us begin with simple thing which is What is RTOS? simply it is Real Time Operating System, the course was all about concepts and main ideas behind it, What I understand from this course is that it is all about time, time is most critical issue in the Real Time Operating System, Also Multitasking is very important issue, anyways I will write more detailed post about it, here is some photos taken from the lab.


This is the development kit that we use.

This is the output of the application that I have wrote, I have wrote it after doing the workshop, it was very tight as availability of time, 

My application was XBM reader, the XBM format is Array of image information, I have got this image form the internet, the other part of the application was gradient effect in the back ground, it is in lines each line wide is 40 pixel, it toggle lines, one start with Whites end with orange, and the other one starts with black ends with dark blue.

here is the code of the drawing function, this function is very effective because it has direct access to LCD  memory.

The nice thing about this thing is it is very fast, the OS starts in less than one second, also drawing was very fast because of the nature of the device, the device work by memory, which means, if you want to run anything you get to its memory location and start what ever you want, it is WIDE OPEN, waiting for whatever you want.

Thanks for your time, 

BR
Ahmed Essam

4 comments:

Anonymous said...

very cool, where is that course?

Ahmed Essam said...

The course is one of SECC courses
SECC is "Software Engineering Competence Center"
check this link

http://www.secc.org.eg/2008_Training_Embedded_2.asp

Anonymous said...

Don't you think you should have optimized this part of your code more :
for (i ..)
{
for (j .. 240 times)
{
i * .096875
}
}

since i never get changed in the inner loop, you should have pulled it outside the inner loop and saved 240*239 = 57,360 floating point multiplications!

I believe the compiler would do it for you if optimization is enabled.

Nevertheless, it seems a lot of fun to write code for these devices.

Ahmed Essam said...

Peace be upon you

Thanks for your very useful comment, I really like comments like that to check our understanding for things that we do.

anyways, regarding to the code.
If you notice that there is if statement that is decide which equation to use "i*.096875" or "0xffff-(i*096875)" this if statement based on j which is in the inner look, u r right in the manner of performance, it cost a lot to do this operation that amount of time,
it would be better if the I did i*.096875 in the outer loop and use the 0xffff-equation this is will be much faster.
Your comment is correct, but my target was make this thing run, I was not satisfied with the sold white LCD, in manner of performance , I was writing this code directly to the LCD buffer, which means, u almost feel any delay when you turn this thing on :D.

anyways, it was for fun, I should be careful with my loops :D

Thanks for your comment, I hope to see lots of it around :)