Bit manipulation

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hi,

are there some assembler-instructions for AT91SAMs to manipulate IO-bit
(Pins).
Something like BSET (to set a pin) or BCLR (to clear a pin).
I can set/clear one whole port in assembler, but I need to set/clear jus
one Port-pin without masking the rest of Port-pins.

Thanks,
Dejan


        
This message was sent using the comp.arch.embedded web interface o
www.EmbeddedRelated.com

Re: Bit manipulation
comp.arch.embedded:

Quoted text here. Click to load it

I'll answer your question, if you answer one of mine!  My question is:
why do people post to usenet through web sites like
embeddedrelated.com and dsprelated.com instead of using a newsreader
and posting directly?

In any case, the Atmel ARM microcontrollers contain hardware in the
PIO and UPIO interfaces themselves that does this in hardware.

Each peripheral register has corresponding "_SODR" and "_CODR"
registers.  To turn one or more output bits, write a word with the
corresponding bits turned on, and the other bits turned off, to the
"SODR" (Set Output Data Register).  To turn off one or more bits,
write a word with the corresponding bits turned on, and the other bits
turned off, to the corresponding "CODR" (Clear Output Data Register).

When you write to either of these registers, where you write a 1 bit
the corresponding output pin is set to 1 or cleared to 0, if it is
programmed as an output.  Any bits that are 0 in the word you write do
not change the level of the corresponding output pin.

--
Jack Klein
Home: http://JK-Technology.Com
We've slightly trimmed the long signature. Click to see the full one.
Re: Bit manipulation
Quoted text here. Click to load it

..and the new Philips LPC210x  devices, put the 'Port SFR's mapped onto
the Faster Local BUS, not the APB, and they claim 17.5MHz
toggle rate -  see

http://www.standardics.philips.com/news/lpc210x /

- but to answer your original question, no, the ARMs lack inherent
BIT opcodes/BIT mapped SFRs, and so this band-aid HW design overcomes
that shortcomming - it was, after all, never designed as an
embedded microcontroller but as a CPU.

-jg


Re: Bit manipulation
Thanks Jim,
that's what I wanted to know. I'm a little bit disappoint of ARM as not
design to be an embedded microcontroller.


Re: Bit manipulation
Hi Jack,
thanks, but to answer your Question.
I have no possibility to use direct some newsreader beacouse of our
Proxy. It blocks that service. So I need to use some work out, in this
case WWW Newsgroup interface.


Re: Bit manipulation

Quoted text here. Click to load it

There are usenet servers that can be over ports normally reserved for
http. Specifically for people who normally only have the common
ports for http open.


Regards
  Anton Erasmus




Re: Bit manipulation
Hi Jack,
thanks, but to answer your Question.
I have no possibility to use direct some newsreader because of our
Proxy. It blocks that service. So I need to use some work out, in this
case WWW Newsgroup interface.


Site Timeline