Yahoo Groups archive

Lpc2000

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

Message

Re: [lpc2000] Re: Bit addressing

2006-03-01 by Mukund Deshmukh

Thanks for the mail.
I am porting huge code from 8052 involving lots of port and bit variable.
I just want to know how a pin/bit is defined in header file of LPC2138, so
that rest of my 8051 code remains unchanged.
In 8051 to set a bit we use
P1_7=1;

Best Regards,

Mukund Deshmukh.
Beta Computronics Pvt Ltd,
10/1, IT Park, Parsodi,
Nagpur-440022
Cell - 9422113746

----- Original Message -----
From: "Guillermo Prandi" <yahoo.messenger@...>
To: <lpc2000@yahoogroups.com>
Sent: Wednesday, March 01, 2006 4:06 PM
Subject: [lpc2000] Re: Bit addressing


In LPC21xx, GPIO SET/CLR registers are designed so you don't need to
read them in order to set/clear the corresponding GPIO bits:

GPIO0_IOSET |= (1<<15); <---- Unnecesary read
GPIO0_IOSET = (1<<15); <---- Changes (sets) only bit 15
GPIO0_IOSET = (1<<15)|(1<<4); <---- Changes (sets) bits 15 and 4
GPIO0_IOCLR = (1<<15); <---- Changes (clears) only bit 15
GPIO0_IOCLR = (1<<15)|(1<<4); <---- Changes (clears) bits 15 and 4

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.