On May 21, 2008, at 2:12 PM, sweetkruzy16 wrote:
> Hi,
>
> I am new to the Linux environment and the Arm area, but I think I have
> been able to make some progress.
>
> I am working with the Ts-7260 through a windows xp computer. I have
> been to compile a simple hello world program in eclipse, send it over
> to the ts 7260 and execute it.
That's a pretty good start. This was too complex for me to set up,
so I just edit/compile/test my programs right on the board.
Doing it this way will probably make things easier, though its a
significant layer of complexity that can introduce mysteries later on...
>
> However, I am trying to use the lcd and ic-104 ports on the device.
>
> I've looked through the sample code that TS provides, especially the
> one with the LCD message (lcdmesg.c), but I do not understand (how and
> why) the functions that they use such as: open, mmap, and all the
> variables that they define.
Briefly:
To make I/O pins turn on and off from a user-space program, you need
to get access to the CPU's physical RAM and poke around with its
registers, which are all at specified offsets in the physical RAM.
Everything in Unix is a file, including the CPU's physical RAM. This
file is opened and then mmapped (memory-mapped). Mmapping is done
for efficient random-access to this file with all I/O being
"instantaneous". You should read a C manual about the mmap call.
GNU's standard C library reference is as good a document as any.
http://www.gnu.org/software/libc/manual/html_node/Memory_002dmapped-
I_002fO.html
Mmap is a "C" thing - not a Unix/Linux or Arm thing. And a very good
thing too!
After mmapping the physical RAM, the program sets certain values in
this space in order to turn the I/O pins on and off. It also has a
busy-wait loop to take care of the LCD display's timing
requirements. If you want to understand what the program is doing
step by step, you should read a manual for the HD44780, which is the
chip in virtually all character LCD displays. Once you have a manual
like this, its pretty easy to match up what the HD44780 needs and
what this program does. Or, you can just leave it as is and figure
out how to feed it text so that your Hello World ends up on the LCD.
http://home.iae.nl/users/pouweha/lcd/lcd.shtml
-Ilya
>
> I guess I do not how to go from the helloworld code to a the lcd code,
> apart from using it as it is.
>
> If someone can direct to how the coding process for the ts-7260 works
> or any references, I would really appreciate it!
>
> Thanks,
> - PB
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|