Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

GPIO Questions!

2004-02-14 by David Bermingham

Hi,
Im trying to interface a magnetic reader to the LPC and im having a bit of trouble regarding the GPIO lines.
The code runs fine on OKI ARM 7 and hynix's ARM 7 so im pretty sure its not the code.The reader communicates with the micro via STROBE and DATA.
I have tried using pins 5,6 and 8,9 as the DATA,STROBE lines but it doesnt seem to read the data out of the buffers.
Anyway here are some of the things I cant seem to figure out....
 
1) The data Sheet says IOPIN register isnt Byte Accessable, does that mean I cant write macros to read specific bits of the register,eg...
 
#define DATA         (((PORT_32BIT_PTR)(IOPIN)->bits.bit8)
 
where PORT_32BIT_PTR is a bitfield.
Likewise with the strobe line, except that the pointer is to the IOSET or IOCLR register
If I cant do this is there another way to access specific bits of the IO Input Register? or do I have to read the entire port?
 
2) The reader has 10K pullups on the STROBE and DATA lines and I was wondering if these are to much?I know this question have been asked before so I apologise for asking somebody to repeat themselves!!!
 
The last question..(I Think!) is how fast can I strobe the IO lines, the reader has a maximum read speed of 10MBits/s so if i do some thing like....
        STROBE=0;
            Sleep(100);
       STROBE=1;
Is there is delay between clearing a bit and the like actually going low?

Thanks for any help, 
David
 
 


---------------------------------
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.