Assuming the LED control register (DIO ?) has a memory mapped address,
it's pretty simple to access from user-space.
You can use the mmap function with /dev/mem and the correct
offset to the LED register to get a valid user-space pointer.
Once you have the pointer, it's trivial to sleep and toggle.
Or set a timer for more precise control over the timing intervals.
If you haven't used mmap before, definitely do the man page, but
the following code snippet is something I have used when teaching classes:
int fd;
char *ledPtr;
fd = open("/dev/mem", O_WRONLY);
ledPtr = mmap(0, sizeof(LED_AREA), PROT_WRITE, MAP_SHARED, fd, LED_ADDRESS);
Only root can open /dev/mem for writing...
Cheers,
T.mike
Quoting francis joss <>:
> Okay i have made some progress with this
>
> i now have the ethernet working and can now telnet into the board
> and access the web browser, my lecteur has gave me a task to complete
>
> he wants a L.E.D to blink on and off, simple i know he wants me to
> connet an led to the Di/o terminals and write a piece of code that
> when run will cause it to bloink at different rates, any ideas
>
> thanks
>
> francis
>
> "Don W. Carr" <> wrote:
> To transfer files to the 7200 you should use FTP, but you need to get
> the ethernet connection going first. You really only need to set the
> IP on your computer to a fixed IP using the same address range as the
> 7200 default, such as 192.168.0.5. The default IP of the 7200 should
> be 192.168.0.50.
>
> Actually, from the command prompt, type "ifconfig" to verify the
> default IP of your 7200 is in fact 192.168.0.50.
>
> Once you have the ethernet connection working, you can also telnet to
> the 7200. Of course in a browser window, type in http://192.168.0.50
> and you should see the default TS web page.
>
> Well, you need to look for someone locally that has experience with
> Linux or Unix in general. We can't help you with everything via the
> email list.
>
> Also, if you describe you application, you will get a lot more
> helpfull suggestions.
>
> Don.
>
> On 4/21/06, francis joss <> wrote:
>> hi
>>
>> i dont really know how to transfer files to the sbc
>>
>> so far i have
>>
>> powered up the board using hyperterminal and got to the stage where i am
>> asked for a login to the ts 7200 i log in as root and the busybox built in
>> shell loads, i am havng trouble connecting the board by ethernet and i was
>> also wondering, how i get the webserver up and running i know apache has
>> started once the board has reached this stage.
>>
>> my problem is that i dont know the basic steps to follow next as i am very
>> knew to this product and the language etc any help would be amazing
>>
>> all i want to do at this stage is get the board up and running with
>> everything installedbready to run an application
>>
>> "Don W. Carr" <> wrote:
>> We would like to help, but need more information about the application.
>>
>> You will as a minimum need to set up a ramdisk to hold the real-time
>> data, but should probably consider battery backed RAM to hold the
>> real-time data so that you won't lose data in the event of a power
>> failure. TS is working on making their battery backed RAM appear as a
>> mounted disk drive.
>>
>> Remember, do NOT write continuously to flash, it has limited write
>> cycles. Though, TS uses a special file system for flash to distribute
>> the writes, with a 1 GB flash, you would probably last years writing
>> 100 bytes per second and that might be cheaper and easier than buying
>> battery backed RAM. I am actually considering this because the the
>> battery backed RAM boards are very bulking and cost over $100 for 2
>> meg. I would take 3 years to fill a 1 GB flash writing 100 bytes per
>> second.
>>
>> To get started, I would reccomend generating straight html for your
>> real-time displays. If you add the following to the top of your file,
>> this will force a refresh every second.
>>
>> <META HTTP-EQUIV="refresh" CONTENT="1">
>> <meta http-equiv="pragma" content="no-cache">
>>
>> Also, you should use Firefox since it works so much better for
>> real-time displays. Internet Explorer insists on scrolling to the top
>> of the page on refresh, rather than leaving you where you were, and
>> also gives a lot of blink. With Firefox, you don't get all the blink.
>>
>> You can also use overlapping images to create interesting animations,
>> though you can not rotate. You can even use transparency with png
>> images. Here is an example:
>>
>> <div style="position:absolute; top:50px; left:0px;">
>> <img SRC=Line1_1024.png>
>> </div>
>>
>> <div style="position:absolute; top:95px; left:26px; z-index:2">
>> <img SRC=square10x10.png>
>> </div>
>>
>>
>> Well, give us some more information and we can help you.
>>
>> Do you know how to use the C compiler and transfer files to the SBC?
>> Do you understand the basics of Apache? Apache is turned on by
>> default.
>>
>> Don.
>>
>> On 4/21/06, francisjoss1981 <> wrote:
>> > i am currently under taking a project for university using a TS 7200
>> > to set up a data aquisition system usin a web browser but i havent got
>> > a clue wee to start
>> >
>> > so far i have connects the board to my laptop using the serial port on
>> > the board and used hyperterminal to boot into it
>> >
>> > this has been successful and i am able to log in as root but from here
>> > i have not a clue were to go there is no file system or anything on
>> > the board any help as to how to take the next step would be great
>> >
>> > thanks
>> >
>> > francis
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > ________________________________
>> > YAHOO! GROUPS LINKS
>> >
>> >
>> > Visit your group "ts-7000" on the web.
>> >
>> > To unsubscribe from this group, send an email to:
>> >
>> >
>> > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>> >
>> > ________________________________
>> >
>>
>>
>> --
>> Dr. Don W. Carr
>> J. G. Montenegro 2258
>> Guadalajara, Mexico
>> +52-333-630-0704
>> +52-333-836-4500 ext 2930
>>
>>
>>
>> ________________________________
>> 24 FIFA World Cup tickets to be won with Yahoo! Mail. Learn more
>>
>>
>> ________________________________
>> YAHOO! GROUPS LINKS
>>
>>
>> Visit your group "ts-7000" on the web.
>>
>> To unsubscribe from this group, send an email to:
>>
>>
>> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>>
>> ________________________________
>>
>>
>>
>>
>
>
> --
> Dr. Don W. Carr
> J. G. Montenegro 2258
> Guadalajara, Mexico
> +52-333-630-0704
> +52-333-836-4500 ext 2930
>
>
> ---------------------------------
> YAHOO! GROUPS LINKS
>
>
> Visit your group "ts-7000" on the web.
>
> To unsubscribe from this group, send an email to:
>
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>
>
> ---------------------------------
>
>
>
>
>
> ---------------------------------
> Yahoo! Messenger NEW - crystal clear PC to PC calling worldwide with
> voicemail
>
> ---------------------------------
> Yahoo! Messenger NEW - crystal clear PC to PC calling worldwide with
> voicemail
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|