Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Let there be light and there was none and I was confused...
PostPosted: Fri Jun 18, 2004 5:07 pm 
Offline

Joined: Fri Jun 18, 2004 3:47 pm
Posts: 7
Short Version

Using EB40A evaluation board.
Trying to interface with LEDS/SWITCHES.
Programming in Assembly.
Is there any way to directly interface with LEDS/SWITCHES?
How do I talk to the LEDS/SWITCHES

Long Version

I am new to the ARM. I am progamming in Assembly and trying to interface with the LEDS and SWITCHES.
I would like to work on polling first then work up to interrupts.

I have been over the LED SWING and INTERRUPT applications you can download, and there is too much information
for me to sort through. :shock:

So here's my question:

Do you have to include all the libraries, files etc... that come with the LED SWING and INTERRUPT applications,
or is there a simper way to light a LED with a switch?
(ie) direct/indirect addressing

Thanks in advance for your help.

Ethan


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 18, 2004 11:26 pm 
Offline

Joined: Thu Mar 25, 2004 12:10 am
Posts: 126
Location: Germany
Hi Psyberbob,
i do not have this board, but the things to get a led on/ off, which is connected to a gpio pin, is basicly the same for all controllers. :)
1. set the direction
2. set/ clear the pins (some controllers have one register for setting/ clearing, some controllers have separate registers for setting and clearing)

The source code you mean (i think) includes all the the things to power on the system (interrupt table, memory initializing and preparing the C-startup). This can be very different between the controllers. Atmel startet at very low frequency, which is a good solution for saving power. But you have to do more at startup (setting the frequency to higher values).

After the startup is done, you can control the led like described above. Note that the AT91 chips use one register the clear (level zero) and an other register to set the output. In a third register you can sample the actual status.

I suggest start programming, using the debugger (mostly Angel) inside. To connect it, you need the ARM SDK (it is quite extensiv but there is a 30 day demo version available) or the GNU debugger. The last one is free.

Write your programm, link it for the ram area, transfer it to the platform and run it.

Best regards,
Edi


Top
 Profile  
 
 Post subject: it's alive! It's Alive!!!!
PostPosted: Mon Jun 21, 2004 5:25 pm 
Offline

Joined: Fri Jun 18, 2004 3:47 pm
Posts: 7
Hey thanks EDDI, I owe ya one.
Your suggestion helped me TONNES with understanding what I needed to to do.

:D

Someday I hope to return the favour.

Until next time;

Psyberbob 8)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: Bing [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: