Here is the Pin connection detail.
http://dl.dropbox.com/u/23986639/Schematic.JPG
LPC2468 GPIO as a Input query
Started by ●January 2, 2013
Reply by ●January 3, 20132013-01-03
Reply by ●January 3, 20132013-01-03
@ Timo,
Using IOxDIR
Device detects SD card properly but saving is not working. Same as previous
one it saves fine again in programming mode.
Using IOxDIR
Device detects SD card properly but saving is not working. Same as previous
one it saves fine again in programming mode.
Reply by ●January 3, 20132013-01-03
On 03.01.2013 13:15, Harshad (Madhav) wrote:
> @ Timo,
>
> Using IOxDIR
>
> void main()
> {
> IODIR0 = 0;
> PINMODE0 = 0; PINMODE1 = 0; PINMODE2 = 0;
> while(1);
> }
>
> Device detects SD card properly but saving is not working. Same as
> previous one it saves fine again in programming mode.
So, summing up: this is fine:
but this is not:
If that is true, then there is something very fishy going on somewhere.
'IODIR0 = 0;' should not do any difference because the reset value of
the register is already zero.
I'm running out of ideas but I suggest you to check the definitions of
the register accessor macros against the user manual - definitely in
this case the definition of IODIR0 macro.
BTW, shouldn't IODIR0 be IO0DIR. At least in user manual it is spelled
like that.
BTW2, there is always startup code which gets linked in. It at least
initializes your variables and calls your main() function. Depending on
your tool set it might do something more which may have something to do
with your problem or maybe not.
--
Timo
> @ Timo,
>
> Using IOxDIR
>
> void main()
> {
> IODIR0 = 0;
> PINMODE0 = 0; PINMODE1 = 0; PINMODE2 = 0;
> while(1);
> }
>
> Device detects SD card properly but saving is not working. Same as
> previous one it saves fine again in programming mode.
So, summing up: this is fine:
but this is not:
If that is true, then there is something very fishy going on somewhere.
'IODIR0 = 0;' should not do any difference because the reset value of
the register is already zero.
I'm running out of ideas but I suggest you to check the definitions of
the register accessor macros against the user manual - definitely in
this case the definition of IODIR0 macro.
BTW, shouldn't IODIR0 be IO0DIR. At least in user manual it is spelled
like that.
BTW2, there is always startup code which gets linked in. It at least
initializes your variables and calls your main() function. Depending on
your tool set it might do something more which may have something to do
with your problem or maybe not.
--
Timo
Reply by ●January 3, 20132013-01-03