Yahoo Groups archive

Lpc2000

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

Thread

GPIO Questions!

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

Re: [lpc2100] GPIO Questions!

2004-02-14 by Robert Adsett

At 06:14 AM 2/14/04 -0800, you wrote:
>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.

I expect that would work but I'd want to verify it, unless IOPIN is not 
defined as a pointer. On the other hand if IOPIN is not a pointer this 
would work a lot better.

#define DATA ((IOPIN & MASK_DBIT) >> BIT_OFFSET)

or

#define DATA (((PORT_32BIT_PTR)(&IOPIN))->bits.bit8)

The more I think of it the less likely I see IOPIN being defined as a 
pointer unless you defined it that way yourself.

>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?

Using this structure for IOSET and IOCLR is probably not a good idea.  It 
will translate to a read-modify-write sequence which will work fine for 
IOSET but since IOCLR is a write only register it's not clear what will 
happen to it.  I'd use something like

#define STROBE_BIT_MASK (0x100)
#define STROBE_HIGH() (IOSET = STROBE_BIT_MASK)
#define STROBE_LOW() (IOCLR = STROBE_BIT_MASK)

I suspect you will end up reading the entire port regardless of how you 
write the code.  It will not make any difference to the timing or behaviour 
in any case.

>
>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!!!

10K always strikes me as weak.  I'm using 4K7 without any problems.

>
>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?

We actually had a discussion of this earlier in the group.  See 
http://groups.yahoo.com/group/lpc2100/message/37 The fastest I have managed 
to set and clear a pin is on the order of 120ns.  Add in some non-linear 
code and some decision making and I doubt you'll have too much trouble 
restraining yourself :)


Robert


" 'Freedom' has no meaning of itself.  There are always restrictions,
be they legal, genetic, or physical.  If you don't believe me, try to
chew a radio signal. "

                         Kelvin Throop, III

Re: [lpc2100] GPIO Questions!

2004-02-14 by J.C. Wren

Pullup selection are dependent on where they are going, and how fast 
a rise time you need.  The smaller the pullup value, the more current 
you're using when it's low.  For a signal going off-board, 10K may not 
be sufficient.  For connecting an average device on the same board, it's 
plenty.  At 3.3V, 10K is 330ua.   For 4.7K, it's 702ua.  Which you 
select also depends on the normal state of the line.  If the line is low 
the majority of the time, and you don't need fast rise times, you're 
wasting power with unnecessary stiff pullups. 

    Most of our 3.3V designs use 10K pullups, and it's never been an 
issue.  That being said, my experiences do not yet include the LPC2100.  
Reading the port specs, they don't seem out of line, so I'd select a 10K 
in most cases (I'd like to find out who designed the port architecture 
on the LPC2100, and viciously beat them about the head and shoulders 
with a golf club.  You'd think Philips would know SOMETHING about port 
design, given their 8051 experience.  No selectable internal pullups?  
What WERE they thinking?) .

    In the olden days of slower TTL logic and lower noise immunities, 
4.7K pullups on 5V logic was pretty much the norm.  These days, stiff 
pullups for "normal" signals (parts with good current sink capability, 
better immunity to noise, etc) aren't really necessary.

    --jc

Robert Adsett wrote:
Show quoted textHide quoted text
> [snip]
>
> >
> >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!!!
>
> 10K always strikes me as weak.  I'm using 4K7 without any problems.
>
> [snip]
>
>
> Robert

New LPC2xxx chips

2004-02-14 by Robert Buadu

http://my.semiconductors.philips.com/pip/LPC2194JBD64.html
http://my.semiconductors.philips.com/pip/LPC2210FBD144.html
http://my.semiconductors.philips.com/pip/LPC2214FBD144.html
http://my.semiconductors.philips.com/pip/LPC2290FBD144.html
http://my.semiconductors.philips.com/pip/LPC2292FBD144.html

Re: [lpc2100] GPIO Questions!

2004-02-14 by Robert Adsett

At 12:48 PM 2/14/04 -0500, you wrote:
>     Most of our 3.3V designs use 10K pullups, and it's never been an
>issue.  That being said, my experiences do not yet include the LPC2100.
>Reading the port specs, they don't seem out of line, so I'd select a 10K
>in most cases (I'd like to find out who designed the port architecture
>on the LPC2100, and viciously beat them about the head and shoulders
>with a golf club.  You'd think Philips would know SOMETHING about port
>design, given their 8051 experience.  No selectable internal pullups?
>What WERE they thinking?) .

I don't know, I've found internal pullups to cause almost as much trouble 
as they prevent. I'm will to spend a few cents on external resistors.  Of 
course if you are really tight for space....  At least they didn't 
implement QBDs.  It may be a matter of keeping the I/O cell small enough to 
include other features.  That's a tradeoff I'll certainly take.


>     In the olden days of slower TTL logic and lower noise immunities,
>4.7K pullups on 5V logic was pretty much the norm.  These days, stiff
>pullups for "normal" signals (parts with good current sink capability,
>better immunity to noise, etc) aren't really necessary.

I think you may be dating me. :)  The bigger reason I still prefer 4K7 
pullups is that the HW I've played around with in the recent past is 
throwing around 100's of Amps relatively close to the micro.  I'll take all 
the noise immunity I can get :)

Nonetheless 10K pullups certainly should not cause a problem.



" 'Freedom' has no meaning of itself.  There are always restrictions,
be they legal, genetic, or physical.  If you don't believe me, try to
chew a radio signal. "

                         Kelvin Throop, III

Re: [lpc2100] New LPC2xxx chips

2004-02-15 by Alex Gibson

Robert Buadu wrote:
> http://my.semiconductors.philips.com/pip/LPC2194JBD64.html
> http://my.semiconductors.philips.com/pip/LPC2210FBD144.html
> http://my.semiconductors.philips.com/pip/LPC2214FBD144.html
> http://my.semiconductors.philips.com/pip/LPC2290FBD144.html
> http://my.semiconductors.philips.com/pip/LPC2292FBD144.html

Any ideas on availability ?

Still having trouble getting lpc2106's here in Sydney.

Minimum order quanities are multiple trays.

Been told its a months wait for samples for lpc2106

Alex

Re: [lpc2100] New LPC2xxx chips

2004-02-15 by microbit

> Robert Buadu wrote:
> > http://my.semiconductors.philips.com/pip/LPC2194JBD64.html
> > http://my.semiconductors.philips.com/pip/LPC2210FBD144.html
> > http://my.semiconductors.philips.com/pip/LPC2214FBD144.html
> > http://my.semiconductors.philips.com/pip/LPC2290FBD144.html
> > http://my.semiconductors.philips.com/pip/LPC2292FBD144.html

Does anyone know when we can expect parts similar to this (68 pin is enough
actually) but that are fully code protected ?
I was told Q2-Q3 2004 but I'm not sure...

-- Kris

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.