Sign in

username:

password:



Not a member?

Search LPC900_users



Search tips

Subscribe to LPC900_users



Ads

Discussion Groups

Discussion Groups | LPC900 | bit control by assembler

Find help, specifications and source code for the LPC900. The LPC900 challenges Microchip and AVR based on the worlds most popular 8-bit architecture the 80C51. With a 2-clock core the LPC900 series is a high performance, very flexible and low cost 8-bit microcontroller family. Designers using or interested in these devices are encouraged to share their know-how and ask questions.

bit control by assembler - yen0yuki - Dec 26 21:31:00 2005

Dear all,

Ax51 CPU has bit control instruction that is CLR and SETB.
LPC900 family have register are A,B,PSW,DPTR(DPH,DPL),SP,R0-R7*4
I confirmed the register bit was able to be controlled by instruction
(CLR,SETB) excluding R0-R7.

Does anyone know whether to R0-R7 register is able to be conrolled?




(You need to be a member of LPC900_users -- send a blank email to LPC900_users-subscribe@yahoogroups.com )


Re: bit control by assembler - ar_e_sys - Dec 30 16:57:00 2005

--- In lpc900_users@lpc9..., "yen0yuki" <tadayuki@r...> wrote:
>
> Dear all,
>
> Ax51 CPU has bit control instruction that is CLR and SETB.
> LPC900 family have register are A,B,PSW,DPTR(DPH,DPL),SP,R0-R7*4
> I confirmed the register bit was able to be controlled by instruction
> (CLR,SETB) excluding R0-R7.
>
> Does anyone know whether to R0-R7 register is able to be conrolled?
>
Dear yenOyuki,

SETB/CLR opcode are suitable only in bit segment 20H-2FH and in
SFR area for all address multiple of 8H ( eg. ACC B PSW Pn etc.)
To set/clear bit(s) for all other direct memory address (including
register area), you can use ORL direct,#bit / ANL direct,#!bit




(You need to be a member of LPC900_users -- send a blank email to LPC900_users-subscribe@yahoogroups.com )

Asm inside C code - gandolfix - Jan 10 14:49:00 2006

Hello!!

I want to put some asm code inside the main.c file!! Like:
for(j = 0; j < 13; j++){
MOV A, #LOW display
RLC A
INC A
}

------------
If it isn't possible... I would like a substitute for RLC A, because
I can't find a function that use this instruction.

Thaks in advance!!





(You need to be a member of LPC900_users -- send a blank email to LPC900_users-subscribe@yahoogroups.com )

Re: Asm inside C code - Ian bell - Jan 10 15:05:00 2006

gandolfix wrote:
> Hello!!
>
> I want to put some asm code inside the main.c file!! Like:
> for(j = 0; j < 13; j++){
> MOV R0, #display
> RLC @R0
> INC R0
> } Check your C compiler documentation. it should tell you how to do this.

> ------------
> If it isn't possible... I would like a substitute for RLC @R0, because
> I can't find a function that use this instruction.
There is no assembly instruction RLC @R0. RLC operates only on the
accumulator. You will need to do:

MOV A,@R0
RLC A
MOV @R0,A

I don't see the reason for going round the loop 13 times because R0
gets reset each time through.

Ian





(You need to be a member of LPC900_users -- send a blank email to LPC900_users-subscribe@yahoogroups.com )