ts-7000
[Top] [All Lists]

Re: [ts-7000] ts 7260 Coding Help

To:
Subject: Re: [ts-7000] ts 7260 Coding Help
From: Ilya Goldberg <>
Date: Tue, 27 May 2008 22:43:15 -0400
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/

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU