setup.c file discussion

0 views
Skip to first unread message

mpa...@gmail.com

unread,
Apr 15, 2009, 6:27:11 AM4/15/09
to Chieroth
Hello,
I added two files to the Files section: one concerns setup.c and
explains its basic structure, and another one tells about the GPIO, as
I had to research it a little, to know if the board can handle
interrupts already (and I think it can, so no hurry Claudio).
I also commented a little on my setup.c file. If you are trying to
sort out what it actually does, then maybe my comments and the Atmel
documentation which I added will be helpful.

Maybe we can put further discussion on setup.c in this thread? And I
suppose there might be more discussion about it...

Michal

Todor

unread,
Apr 17, 2009, 4:17:21 AM4/17/09
to Chieroth
Hi,

The Timer/Counter was (luckily) already registered in setup.c *phew*

So far it seems that there will be no changes in setup.c or ap700x.c
from this side.

Kind regards,
Todor

Claudio

unread,
Apr 18, 2009, 6:25:01 AM4/18/09
to Chieroth
Hi guys!

Some good news, at last!

I've been testing the GPIO for a couple of hours and it seems that I
can write values to the ports PA03, PA04 and PA05.

Nevertheless, the reading is much more confusing. When I attach the
wire, it becomes 0 for a moment, and then it goes
to 1 without pressing the button. However, I believe this has to do
with the PULLUP configuration of the button, since
I literally suck in configuring push-buttons and such devices.

To sum up, I got GPIO up and running. The problem is that I still have
to configure properly the push-buttons, since the
reading does not work, and it has a confusing behavior. But the LED
blinks when I want (:

Ok, I hope I can continue my work on Monday/Tuesday, and see you in
the next meeting on Tuesday at 10:30.

Have a nice weekend!

BR,


Claudio M. Camacho

Todor Vlaev

unread,
Apr 18, 2009, 7:02:38 AM4/18/09
to chie...@googlegroups.com
Hi Claudio,

Great work!

Now that I think, it seems that it's definitely the internal pull-up,
since when you don't press the button effectively there is nothing
connected to the pin. So, it's the internal pull-up that makes it go
to 1.

I have two ideas:
1. Disable the internal pull-up, there is a register for that. I think
the internal pull-ups are enabled by default.
2. Rewire the board, so that the button is connected directly to GND
and not to the 10k resistor.

Thank you all for your effort! Have a nice weekend and see you at
latest on Tuesday!

Kind regads,
Todor


2009/4/18 Claudio <claud...@gmail.com>:
--
Helsinki Metropolia University of Applied Sciences
Information Technology Programme

Todor Vlaev
Mobile: +358 50 935 0230
Reply all
Reply to author
Forward
0 new messages